|
@@ -6,7 +6,8 @@ create table t_system_property
|
|
prop_key varchar(50) not null comment '属性键',
|
|
prop_key varchar(50) not null comment '属性键',
|
|
prop_value varchar(500) not null comment '属性值',
|
|
prop_value varchar(500) not null comment '属性值',
|
|
org_id bigint comment '所属机构ID(学校)',
|
|
org_id bigint comment '所属机构ID(学校)',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ UNIQUE KEY IDX_01 (org_id, prop_key)
|
|
) comment '系统属性表';
|
|
) comment '系统属性表';
|
|
|
|
|
|
|
|
|
|
@@ -34,7 +35,10 @@ create table t_user
|
|
mobile varchar(20) comment '联系方式',
|
|
mobile varchar(20) comment '联系方式',
|
|
category_id bigint comment '所属教学点ID,角色为教学点管理员,必填',
|
|
category_id bigint comment '所属教学点ID,角色为教学点管理员,必填',
|
|
org_id bigint not null comment '所属机构ID(学校)',
|
|
org_id bigint not null comment '所属机构ID(学校)',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ UNIQUE KEY IDX_01 (org_id, login_name),
|
|
|
|
+ KEY IDX_02 (role),
|
|
|
|
+ KEY IDX_03 (category_id)
|
|
) comment '用户表';
|
|
) comment '用户表';
|
|
|
|
|
|
|
|
|
|
@@ -56,7 +60,10 @@ create table t_student
|
|
category_id bigint not null comment '所属教学点ID',
|
|
category_id bigint not null comment '所属教学点ID',
|
|
apply_number int not null comment '允许预约时段数量',
|
|
apply_number int not null comment '允许预约时段数量',
|
|
apply_finished bit(1) not null comment '预约时段是否全部完成',
|
|
apply_finished bit(1) not null comment '预约时段是否全部完成',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ UNIQUE KEY IDX_01 (apply_task_id, student_code),
|
|
|
|
+ UNIQUE KEY IDX_02 (open_id, uid),
|
|
|
|
+ KEY IDX_03 (category_id)
|
|
) comment '考生表';
|
|
) comment '考生表';
|
|
|
|
|
|
|
|
|
|
@@ -72,7 +79,10 @@ create table t_category
|
|
name varchar(50) not null comment '分类名称',
|
|
name varchar(50) not null comment '分类名称',
|
|
level int not null comment '层级,第一级值为1',
|
|
level int not null comment '层级,第一级值为1',
|
|
capacity int null default 0 comment '容量',
|
|
capacity int null default 0 comment '容量',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ UNIQUE KEY IDX_01 (org_id, code),
|
|
|
|
+ KEY IDX_02 (parent_id),
|
|
|
|
+ KEY IDX_03 (level)
|
|
) comment '数据分类表';
|
|
) comment '数据分类表';
|
|
|
|
|
|
|
|
|
|
@@ -88,7 +98,8 @@ create table t_exam_site
|
|
capacity int comment '机房容量',
|
|
capacity int comment '机房容量',
|
|
address varchar(200) comment '考点地址',
|
|
address varchar(200) comment '考点地址',
|
|
guide longtext comment '考点指引',
|
|
guide longtext comment '考点指引',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ UNIQUE KEY IDX_01 (category_id, code)
|
|
) comment '考点表';
|
|
) comment '考点表';
|
|
|
|
|
|
|
|
|
|
@@ -103,7 +114,8 @@ create table t_exam_room
|
|
exam_site_id bigint not null comment '所属考点ID',
|
|
exam_site_id bigint not null comment '所属考点ID',
|
|
address varchar(200) comment '考场地址',
|
|
address varchar(200) comment '考场地址',
|
|
capacity int comment '机房容量',
|
|
capacity int comment '机房容量',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ UNIQUE KEY IDX_01 (exam_site_id, code)
|
|
) comment '考场表';
|
|
) comment '考场表';
|
|
|
|
|
|
|
|
|
|
@@ -122,7 +134,8 @@ create table t_apply_task
|
|
open_apply_start_time bigint not null comment '开放式预约起始时间,可以在不同教学点间预约',
|
|
open_apply_start_time bigint not null comment '开放式预约起始时间,可以在不同教学点间预约',
|
|
open_apply_end_time bigint not null comment '开放式预约截止时间,可以在不同教学点间预约',
|
|
open_apply_end_time bigint not null comment '开放式预约截止时间,可以在不同教学点间预约',
|
|
notice longtext comment '考试说明',
|
|
notice longtext comment '考试说明',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ KEY IDX_01 (org_id)
|
|
) comment '预约任务表';
|
|
) comment '预约任务表';
|
|
|
|
|
|
|
|
|
|
@@ -134,7 +147,10 @@ create table t_time_period
|
|
apply_task_id bigint not null comment '所属预约任务ID',
|
|
apply_task_id bigint not null comment '所属预约任务ID',
|
|
start_time bigint not null comment '预约起始时间',
|
|
start_time bigint not null comment '预约起始时间',
|
|
end_time bigint not null comment '预约截止时间',
|
|
end_time bigint not null comment '预约截止时间',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ KEY IDX_01 (apply_task_id),
|
|
|
|
+ KEY IDX_02 (start_time),
|
|
|
|
+ KEY IDX_03 (end_time)
|
|
) comment '预约任务的时段表';
|
|
) comment '预约任务的时段表';
|
|
|
|
|
|
|
|
|
|
@@ -143,15 +159,18 @@ create table t_student_apply
|
|
id bigint not null auto_increment,
|
|
id bigint not null auto_increment,
|
|
create_time bigint not null comment '创建时间',
|
|
create_time bigint not null comment '创建时间',
|
|
update_time bigint not null comment '更新时间',
|
|
update_time bigint not null comment '更新时间',
|
|
- student_id bigint not null comment '考生ID',
|
|
|
|
exam_site_id bigint not null comment '预约的考点ID',
|
|
exam_site_id bigint not null comment '预约的考点ID',
|
|
- exam_room_id bigint not null comment '预约的考场ID',
|
|
|
|
time_period_id bigint not null comment '预约时段ID',
|
|
time_period_id bigint not null comment '预约时段ID',
|
|
|
|
+ student_id bigint not null comment '考生ID',
|
|
cancel bit(1) not null comment '是否取消预约',
|
|
cancel bit(1) not null comment '是否取消预约',
|
|
|
|
+ exam_room_id bigint not null comment '预约的考场ID',
|
|
ticket_number varchar(50) comment '准考证号',
|
|
ticket_number varchar(50) comment '准考证号',
|
|
seat_number varchar(20) comment '座位号',
|
|
seat_number varchar(20) comment '座位号',
|
|
operate_id bigint comment '操作人ID',
|
|
operate_id bigint comment '操作人ID',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ UNIQUE KEY IDX_01 (exam_site_id, time_period_id, student_id),
|
|
|
|
+ KEY IDX_02 (exam_room_id),
|
|
|
|
+ KEY IDX_03 (ticket_number)
|
|
) comment '考生预约记录表';
|
|
) comment '考生预约记录表';
|
|
|
|
|
|
|
|
|
|
@@ -166,7 +185,10 @@ create table t_student_import_task
|
|
status varchar(20) not null comment '执行状态',
|
|
status varchar(20) not null comment '执行状态',
|
|
file_path varchar(200) not null comment '导入文件相对路径',
|
|
file_path varchar(200) not null comment '导入文件相对路径',
|
|
message text comment '执行结果信息',
|
|
message text comment '执行结果信息',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ KEY IDX_01 (apply_task_id),
|
|
|
|
+ KEY IDX_02 (type),
|
|
|
|
+ KEY IDX_03 (status)
|
|
) comment '考生导入任务表';
|
|
) comment '考生导入任务表';
|
|
|
|
|
|
|
|
|
|
@@ -178,7 +200,9 @@ create table t_operate_log
|
|
operate_id bigint not null comment '操作人ID',
|
|
operate_id bigint not null comment '操作人ID',
|
|
event_type varchar(20) not null comment '事件类型,如:考生取消预约、用户登录等',
|
|
event_type varchar(20) not null comment '事件类型,如:考生取消预约、用户登录等',
|
|
content text comment '操作内容(JSON)',
|
|
content text comment '操作内容(JSON)',
|
|
- PRIMARY KEY (id)
|
|
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ KEY IDX_01 (event_type),
|
|
|
|
+ KEY IDX_02 (operate_id)
|
|
) comment '操作日志表';
|
|
) comment '操作日志表';
|
|
|
|
|
|
|
|
|