1. 数据库表设计
1.1 课程轮播图表
CREATE TABLE ` course_banners` (
` id` int ( 11 ) unsigned NOT NULL AUTO_INCREMENT COMMENT '轮播图主键' ,
` image_url` varchar ( 255 ) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图图片链接' ,
` title` varchar ( 255 ) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '标题' ,
` description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '描述' ,
` link_url` varchar ( 255 ) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '跳转链接' ,
` order_index` int ( 11 ) NOT NULL DEFAULT '0' COMMENT '排序,倒序' ,
` is_active` tinyint ( 1 ) NOT NULL DEFAULT '1' COMMENT '1显示,0隐藏' ,
` created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
` updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
PRIMARY KEY ( ` id` )
) ENGINE = InnoDB AUTO_INCREMENT = 4 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程轮播图' ;
1.2 课程分类表
CREATE TABLE ` course_categories` (
` id` int ( 11 ) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键' ,
` category_name` varchar ( 255 ) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程分类名称' ,
` description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '课程分类描述' ,
` created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间戳' ,
` updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后更新时间戳' ,
PRIMARY KEY ( ` id` )
) ENGINE = InnoDB AUTO_INCREMENT = 5 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程分类表' ;
1.3 课程表
CREATE TABLE ` course_courses` (
` id` int ( 11 ) unsigned NOT NULL AUTO_INCREMENT COMMENT '课程主键' ,
` title` varchar ( 255 ) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程标题' ,
` description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '课程描述' ,
` cover_image_url` varchar ( 512 ) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '课程封面图片链接' ,
` category_id` int ( 11 ) unsigned DEFAULT NULL COMMENT '课程分类主键' ,
` created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建的时间戳' ,
` updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录最后更新的时间戳' ,
PRIMARY KEY ( ` id` ) ,
KEY ` fk_category_id` ( ` category_id` )
) ENGINE = InnoDB AUTO_INCREMENT = 7 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程表' ;
1.4 课程章节表
CREATE TABLE ` course_chapters` (
` id` int ( 11 ) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键' ,
` title` varchar ( 255 ) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程章节标题' ,
` description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '课程章节内容' ,
` course_id` int ( 11 ) unsigned NOT NULL COMMENT '课程外键' ,
` orderd` int ( 11 ) NOT NULL DEFAULT '0' COMMENT '排序,倒序' ,
` created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间' ,
` updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间' ,
PRIMARY KEY ( ` id` )
) ENGINE = InnoDB AUTO_INCREMENT = 14 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程章节表' ;
2. 后台管理系统
2.1 轮播图增删改查导出
2.2 课程分类增删改查导出
2.3 课程列表增删改查导出
2.4 课程章节增删改查导出
3. 用户端
3.1 首页
3.2 课程章节列表页
3.3 课程章节详情页