Files
hldrCenter/server/sql/course_content.sql
2025-10-31 13:24:44 +08:00

11 lines
999 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_content` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '内容ID主键',
`course_id` int NOT NULL COMMENT '关联课程ID',
`parent_id` int DEFAULT 0 COMMENT '父级ID0表示章节>0表示小节关联自身id',
`title` varchar(255) NOT NULL COMMENT '章节/小节标题',
`content` text COMMENT '内容详情(如视频地址、图文内容等)',
`sort` int DEFAULT 0 COMMENT '排序(数字越小越靠前)',
PRIMARY KEY (`id`),
KEY `idx_course_id` (`course_id`) COMMENT '按课程查询内容',
KEY `idx_parent_id` (`parent_id`) COMMENT '按父级查询子内容'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='课程内容表(章节/小节)';