imetting/backend/sql/client_downloads.sql

150 lines
3.7 KiB
MySQL
Raw Permalink Normal View History

-- 客户端下载管理表
CREATE TABLE IF NOT EXISTS client_downloads (
id INT AUTO_INCREMENT PRIMARY KEY COMMENT '主键ID',
platform_type ENUM('mobile', 'desktop') NOT NULL COMMENT '平台类型mobile-移动端, desktop-桌面端',
platform_name VARCHAR(50) NOT NULL COMMENT '具体平台ios, android, windows, mac_intel, mac_m, linux',
version VARCHAR(50) NOT NULL COMMENT '版本号,如: 1.0.0',
version_code INT NOT NULL DEFAULT 1 COMMENT '版本代码,用于版本比较',
download_url TEXT NOT NULL COMMENT '下载链接',
file_size BIGINT COMMENT '文件大小(字节)',
release_notes TEXT COMMENT '更新说明',
is_active BOOLEAN DEFAULT TRUE COMMENT '是否启用',
is_latest BOOLEAN DEFAULT FALSE COMMENT '是否为最新版本',
min_system_version VARCHAR(50) COMMENT '最低系统版本要求',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
created_by INT COMMENT '创建人ID',
FOREIGN KEY (created_by) REFERENCES users(user_id) ON DELETE SET NULL,
INDEX idx_platform (platform_type, platform_name),
INDEX idx_version (version_code),
INDEX idx_active (is_active, is_latest)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='客户端下载管理表';
-- 插入初始数据(示例版本)
INSERT INTO client_downloads (
platform_type,
platform_name,
version,
version_code,
download_url,
file_size,
release_notes,
is_active,
is_latest,
min_system_version,
created_by
) VALUES
-- iOS 客户端
(
'mobile',
'ios',
'1.0.0',
1000,
'https://apps.apple.com/app/imeeting/id123456789',
52428800, -- 50MB
'初始版本发布
-
-
- ',
TRUE,
TRUE,
'iOS 13.0',
1
),
-- Android 客户端
(
'mobile',
'android',
'1.0.0',
1000,
'https://play.google.com/store/apps/details?id=com.imeeting.app',
45088768, -- 43MB
'初始版本发布
-
-
- ',
TRUE,
TRUE,
'Android 8.0',
1
),
-- Windows 客户端
(
'desktop',
'windows',
'1.0.0',
1000,
'https://download.imeeting.com/clients/windows/iMeeting-1.0.0-Setup.exe',
104857600, -- 100MB
'初始版本发布
-
-
- AI
- ',
TRUE,
TRUE,
'Windows 10 (64-bit)',
1
),
-- Mac Intel 客户端
(
'desktop',
'mac_intel',
'1.0.0',
1000,
'https://download.imeeting.com/clients/mac/iMeeting-1.0.0-Intel.dmg',
94371840, -- 90MB
'初始版本发布
-
-
- AI
- ',
TRUE,
TRUE,
'macOS 10.15 Catalina',
1
),
-- Mac M系列 客户端
(
'desktop',
'mac_m',
'1.0.0',
1000,
'https://download.imeeting.com/clients/mac/iMeeting-1.0.0-AppleSilicon.dmg',
83886080, -- 80MB
'初始版本发布
-
-
- AI
-
- Apple Silicon',
TRUE,
TRUE,
'macOS 11.0 Big Sur',
1
),
-- Linux 客户端
(
'desktop',
'linux',
'1.0.0',
1000,
'https://download.imeeting.com/clients/linux/iMeeting-1.0.0-x64.AppImage',
98566144, -- 94MB
'初始版本发布
-
-
- AI
-
- Linux',
TRUE,
TRUE,
'Ubuntu 20.04 / Debian 10 / Fedora 32 或更高版本',
1
);