|
@@ -71,16 +71,17 @@ create table t_student
|
|
|
|
|
|
create table t_category
|
|
create table t_category
|
|
(
|
|
(
|
|
- id bigint not null auto_increment,
|
|
|
|
- create_time bigint not null comment '创建时间',
|
|
|
|
- update_time bigint not null comment '更新时间',
|
|
|
|
- enable bit(1) not null comment '是否启用',
|
|
|
|
- org_id bigint not null comment '所属机构ID(学校)',
|
|
|
|
- parent_id bigint not null default 0 comment '父级ID,顶级值为0',
|
|
|
|
- code varchar(20) not null comment '分类代码',
|
|
|
|
- name varchar(50) not null comment '分类名称',
|
|
|
|
- level int not null comment '层级,第一级值为1',
|
|
|
|
- capacity int null default 0 comment '容量',
|
|
|
|
|
|
+ id bigint not null auto_increment,
|
|
|
|
+ create_time bigint not null comment '创建时间',
|
|
|
|
+ update_time bigint not null comment '更新时间',
|
|
|
|
+ enable bit(1) not null comment '是否启用',
|
|
|
|
+ org_id bigint not null comment '所属机构ID(学校)',
|
|
|
|
+ parent_id bigint not null default 0 comment '父级ID,顶级值为0',
|
|
|
|
+ code varchar(20) not null comment '分类代码',
|
|
|
|
+ name varchar(50) not null comment '分类名称',
|
|
|
|
+ level int not null comment '层级,第一级值为1',
|
|
|
|
+ capacity int null default 0 comment '容量',
|
|
|
|
+ self_apply_enable bit(1) null default 1 comment '针对教学点,是否开启考生自主预约',
|
|
PRIMARY KEY (id),
|
|
PRIMARY KEY (id),
|
|
UNIQUE KEY IDX_01 (org_id, code),
|
|
UNIQUE KEY IDX_01 (org_id, code),
|
|
KEY IDX_02 (parent_id),
|
|
KEY IDX_02 (parent_id),
|
|
@@ -208,6 +209,53 @@ create table t_operate_log
|
|
KEY IDX_02 (operate_id)
|
|
KEY IDX_02 (operate_id)
|
|
) comment '操作日志表';
|
|
) comment '操作日志表';
|
|
|
|
|
|
|
|
+create table t_async_task
|
|
|
|
+(
|
|
|
|
+ id bigint NOT NULL AUTO_INCREMENT,
|
|
|
|
+ create_time bigint NOT NULL COMMENT '创建时间',
|
|
|
|
+ update_time bigint NOT NULL COMMENT '更新时间',
|
|
|
|
+ operate_id bigint NOT NULL COMMENT '操作人ID',
|
|
|
|
+ type varchar(50) NOT NULL COMMENT '任务类型',
|
|
|
|
+ status varchar(10) NOT NULL COMMENT '执行状态任务状态,INIT:未开始,RUNNING:进行中,FINISH:已完成',
|
|
|
|
+ result varchar(10) NULL COMMENT '执行结果,SUCCESS:成功,ERROR:失败',
|
|
|
|
+ import_file_name varchar(100) NULL COMMENT '导入文件名称',
|
|
|
|
+ import_file_path varchar(500) NULL COMMENT '导入文件路径',
|
|
|
|
+ export_file_path varchar(500) NULL COMMENT '导出文件路径',
|
|
|
|
+ summary text NULL COMMENT '执行摘要',
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ INDEX IDX_01 (type),
|
|
|
|
+ INDEX IDX_02 (status),
|
|
|
|
+ INDEX IDX_03 (result)
|
|
|
|
+) COMMENT = '异步任务表';
|
|
|
|
+
|
|
|
|
+create table t_student_course
|
|
|
|
+(
|
|
|
|
+ id bigint NOT NULL AUTO_INCREMENT,
|
|
|
|
+ create_time bigint NOT NULL COMMENT '创建时间',
|
|
|
|
+ update_time bigint NOT NULL COMMENT '更新时间',
|
|
|
|
+ student_id bigint NOT NULL COMMENT '考生ID',
|
|
|
|
+ course_code varchar(20) NOT NULL COMMENT '科目代码',
|
|
|
|
+ course_name varchar(50) NULL COMMENT '科目名称',
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ UNIQUE INDEX IDX_01 (course_code, student_id),
|
|
|
|
+ INDEX IDX_02 (student_id)
|
|
|
|
+) COMMENT = '考生科目表';
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+create table t_time_period_exam_site
|
|
|
|
+(
|
|
|
|
+ id bigint NOT NULL AUTO_INCREMENT,
|
|
|
|
+ create_time bigint NOT NULL COMMENT '创建时间',
|
|
|
|
+ update_time bigint NOT NULL COMMENT '更新时间',
|
|
|
|
+ operate_id bigint NOT NULL COMMENT '操作人',
|
|
|
|
+ exam_site_id bigint NOT NULL COMMENT '考点ID',
|
|
|
|
+ time_period_id bigint NOT NULL COMMENT '预约时段ID',
|
|
|
|
+ enable bit(1) NOT NULL COMMENT '是否开启',
|
|
|
|
+ PRIMARY KEY (id),
|
|
|
|
+ UNIQUE INDEX IDX_01 (exam_site_id, time_period_id),
|
|
|
|
+ INDEX IDX_02 (time_period_id)
|
|
|
|
+) COMMENT = '考点预约时段表';
|
|
|
|
+
|
|
|
|
|
|
-- 基础数据
|
|
-- 基础数据
|
|
insert into t_org(id, name, enable, create_time, update_time)
|
|
insert into t_org(id, name, enable, create_time, update_time)
|
|
@@ -218,7 +266,7 @@ values (1, 'CATEGORY_LEVEL', '[{"level":1,"title":"城市"},{"level":2,"title":"
|
|
unix_timestamp() * 1000);
|
|
unix_timestamp() * 1000);
|
|
|
|
|
|
insert into t_user (org_id, role, name, login_name, password, mobile, category_id, enable, create_time, update_time)
|
|
insert into t_user (org_id, role, name, login_name, password, mobile, category_id, enable, create_time, update_time)
|
|
-values (1, 'ADMIN', '学校管理员', 'admin', UPPER(SHA2('qmty87863577', 256)), null, null, 1, unix_timestamp() * 1000,
|
|
|
|
|
|
+values (1, 'ADMIN', '学校管理员', 'admin', UPPER(SHA2('qmth87863577', 256)), null, null, 1, unix_timestamp() * 1000,
|
|
unix_timestamp() * 1000);
|
|
unix_timestamp() * 1000);
|
|
|
|
|
|
-- 城市初始化
|
|
-- 城市初始化
|