Files
hldrCenter/server/sql/course/course_activity/course_activity.sql
2025-11-01 23:48:14 +08:00

14 lines
1.1 KiB
SQL
Raw Permalink 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_activity` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '活动ID主键自增',
`course_id` int(11) NOT NULL COMMENT '关联课程ID关联course表的id',
`title` varchar(255) NOT NULL COMMENT '活动标题如“第1章作业”“期中测试”',
`activity_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '活动类型1-作业2-考试3-讨论4-直播)',
`content` text COMMENT '活动详情(如作业要求、考试说明)',
`start_time` datetime COMMENT '活动开始时间(如直播时间、作业发布时间)',
`end_time` datetime COMMENT '活动结束时间(如作业截止时间)',
`sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序(数值越小越靠前)',
PRIMARY KEY (`id`),
KEY `idx_course_id` (`course_id`) COMMENT '按课程ID查询活动的索引优化关联查询'
-- 移除外键约束语句goctl不支持
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='学生活动表(存储课程相关的作业、考试、讨论等活动)';