受 “ 课程分类” 表的启发,
drop table if exists course_category;
create table course_category (id char(8) not null default ‘’ comment ‘id’,course_id char(8) comment ‘课程|course.id’,category_id char(8) comment ‘分类|course.id’,
primary key (id)
) engine=innodb default charset=utf8mb4 comment=‘课程分类’;
我个人觉得 course_content_file表
drop table if exists course_content_file;
create table course_content_file (id char(8) not null default ‘’ comment ‘id’,course_id char(8) not null comment ‘课程id’,url varchar(100) comment ‘地址’,name varchar(100) comment ‘文件名’,size int comment ‘大小|字节b’,
primary key (id)
) engine=innodb default charset=utf8mb4 comment=‘课程内容文件’;
改成course_file表更好一点,
drop table if exists course_file;
create table course_file (id char(8) not null default ‘’ comment ‘id’,course_id char(8) comment ‘课程id|course.id’,file_id char(8) comment ‘文件id|file.id’,
primary key (id)
) engine=innodb default charset=utf8mb4 comment=‘课程文件’;
想听听老师的想法?