mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-19 01:48:47 +08:00
96 lines
3.5 KiB
SQL
96 lines
3.5 KiB
SQL
create schema mall-tams-core;
|
||
|
||
set
|
||
character set utf8mb4;
|
||
create table t_classroom
|
||
(
|
||
id bigint auto_increment
|
||
primary key,
|
||
name varchar(30) default '' not null comment '名称',
|
||
enable_state int unsigned default 1 not null comment '停启用状态,1启用 2停用'
|
||
) comment '教室';
|
||
|
||
create table t_color
|
||
(
|
||
id bigint auto_increment comment 'id'
|
||
primary key,
|
||
name varchar(30) default '' not null comment '名称',
|
||
value char(7) default '' not null comment '值'
|
||
) comment '颜色';
|
||
|
||
create table t_course
|
||
(
|
||
id bigint auto_increment comment 'id'
|
||
primary key,
|
||
name varchar(30) default '' not null comment '名称',
|
||
enable_state int unsigned default 1 not null comment '停启用状态,1启用 2停用',
|
||
duration int unsigned null comment '课程时长,单位分钟',
|
||
background_color char(7) default '' not null comment '背景颜色'
|
||
) comment '课程';
|
||
|
||
create table t_course_scheduling
|
||
(
|
||
id bigint auto_increment comment 'id'
|
||
primary key,
|
||
classroom_id bigint default 0 not null comment '教室id',
|
||
course_id bigint default 0 not null comment '课程id',
|
||
teacher_id bigint default 0 not null comment '教师id',
|
||
date date null comment '日期',
|
||
attend_time time null comment '上课时间',
|
||
finish_time time null comment '下课时间'
|
||
) comment '排课';
|
||
|
||
create table t_school
|
||
(
|
||
id bigint auto_increment comment 'id'
|
||
primary key,
|
||
名称 varchar(50) default '' not null comment '名称'
|
||
) comment '学校';
|
||
|
||
create table t_teacher
|
||
(
|
||
id bigint auto_increment comment 'id'
|
||
primary key,
|
||
name varchar(10) default '' not null comment '姓名',
|
||
enable_state int unsigned default 1 not null comment '停启用状态,1启用 2停用'
|
||
) comment '教师';
|
||
|
||
create table t_course
|
||
(
|
||
id bigint auto_increment comment 'id'
|
||
primary key,
|
||
name varchar(30) default '' not null comment '名称',
|
||
enable_state int unsigned default 1 not null comment '停启用状态,1启用 2停用',
|
||
duration int unsigned null comment '课程时长,单位分钟',
|
||
lesson double unsigned null comment '课时',
|
||
background_color char(7) default '' not null comment '背景颜色'
|
||
) comment '课程';
|
||
|
||
|
||
create table t_registration
|
||
(
|
||
id bigint auto_increment comment 'id'
|
||
primary key,
|
||
student_id bigint not null comment '学员',
|
||
student_name varchar(50) null comment '学员名称',
|
||
student_phone varchar(20) null comment '学员电话',
|
||
course_id bigint not null comment '课程id',
|
||
course_name varchar(255) null comment '课程',
|
||
duration int null comment '课程时长,单位分钟',
|
||
lesson double null comment '课时',
|
||
class_time datetime null comment '上课时间',
|
||
create_time datetime null comment '创建时间',
|
||
enable_state int unsigned default 1 not null comment '停启用状态'
|
||
) comment '登记';
|
||
|
||
CREATE TABLE t_student
|
||
(
|
||
id bigint auto_increment comment '学号',
|
||
name varchar(50) not null comment '姓名',
|
||
phone varchar(20) not null comment '电话',
|
||
create_time datetime comment '创建时间',
|
||
enable_state int unsigned default 1 not null comment '停启用状态',
|
||
PRIMARY KEY (id)
|
||
) COMMENT ='学生信息表' CHARACTER SET utf8mb4
|
||
COLLATE utf8mb4_general_ci;
|