user course
This commit is contained in:
parent
bdd80deebe
commit
c7d80137a4
11
1782712612_create_user_course.up.sql
Normal file
11
1782712612_create_user_course.up.sql
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
CREATE TABLE `user_course` (
|
||||||
|
`id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '关联记录ID',
|
||||||
|
`user_id` INT NOT NULL COMMENT '用户ID',
|
||||||
|
`course_id` INT NOT NULL COMMENT '月度课程ID',
|
||||||
|
`status` TINYINT DEFAULT 1 COMMENT '学习状态:1-未开始 2-学习中 3-已完成',
|
||||||
|
`study_num` INT DEFAULT 0 COMMENT '已学习数量',
|
||||||
|
`total_num` INT DEFAULT 0 COMMENT '总视频数量',
|
||||||
|
`created_at` TIMESTAMP NUll DEFAULT NULL COMMENT '创建时间',
|
||||||
|
`updated_at` TIMESTAMP NUll DEFAULT NULL COMMENT '更新时间',
|
||||||
|
UNIQUE KEY `uk_user_course` (`user_id`, `course_id`)
|
||||||
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '用户与课程关联表';
|
||||||
Loading…
Reference in New Issue
Block a user