RuoYi-Vue-Plus/ruoyi-site/ruoyi-tams/sql/init_ddl.sql
2025-01-07 00:46:54 +08:00

96 lines
3.5 KiB
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 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;