Files
hldrCenter/server/sql/course_file.sql
2025-11-01 23:08:56 +08:00

12 lines
822 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 创建课程文件表
CREATE TABLE `course_file` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`content_id` int(11) NOT NULL COMMENT '关联的内容ID如课程章节ID等',
`title` varchar(255) NOT NULL COMMENT '文件标题',
`file_type` varchar(30) NOT NULL COMMENT '文件类型如pdf、video、doc等',
`file_url` varchar(255) NOT NULL COMMENT '文件存储URL',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间(自动更新)',
PRIMARY KEY (`id`),
KEY `idx_content_id` (`content_id`) COMMENT '按内容ID查询文件的索引'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='课程相关文件表(如课件、视频等)';