# ************************************************************
# Database: stmms_fenti
# Generation Time: 2017-10-31 06:43:10 +0000
# ************************************************************


# Dump of table b_school
# ------------------------------------------------------------
USE `stmms_ft`;
DROP TABLE IF EXISTS `b_school`;

CREATE TABLE `b_school`
(
    `id`            int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `name`          varchar(64) NOT NULL COMMENT '名称',
    `province`      varchar(16) NOT NULL COMMENT '省份',
    `city`          varchar(16) NOT NULL COMMENT '城市',
    `code`          varchar(64)  DEFAULT NULL COMMENT '代码',
	`parent_id`     int(11)      DEFAULT NULL COMMENT '父机构ID',
	`sub_code`      varchar(64)  DEFAULT NULL COMMENT '子机构代码',
    `address`       varchar(128) DEFAULT NULL COMMENT '地址',
    `phone`         varchar(32)  DEFAULT NULL COMMENT '电话',
    `logo_url`      text  DEFAULT NULL COMMENT '图片地址',
    `description`   varchar(128) DEFAULT NULL COMMENT '描述',
    `enable`        tinyint(1)  NOT NULL COMMENT '是否禁用',
	`double_track`  tinyint(1)  NOT NULL COMMENT '双评轨迹',
    `access_key`    varchar(64)  DEFAULT NULL COMMENT 'AccessKey',
    `access_secret` varchar(64)  DEFAULT NULL COMMENT 'AccessSecret',
    `group_delete_check` tinyint(1)  NOT NULL COMMENT '开启删除分组授权码',
    `create_time`   datetime    NOT NULL COMMENT '创建时间',
    `update_time`   datetime     DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`id`),
    UNIQUE KEY `index1` (`access_key`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='学校表';

  
# Dump of table b_sys_config
# ------------------------------------------------------------

DROP TABLE IF EXISTS `b_sys_config`;
CREATE TABLE `b_sys_config`
(
    `id`            int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `type`          varchar(64) NOT NULL COMMENT '类型',
    `description`   varchar(128) DEFAULT NULL COMMENT '描述',
    `update_time`   datetime     DEFAULT NULL COMMENT '修改时间',
    PRIMARY KEY (`id`),
    UNIQUE KEY `index1` (`type`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='配置表';
  
LOCK TABLES `b_sys_config` WRITE;

INSERT INTO `b_sys_config` (`id`, `type`, `description`, `update_time`)
VALUES (1, 'FILE_SERVER', 'http://192.168.10.42:9000/,http://192.168.10.42:9000/', '2021-08-09 15:38:58');
INSERT INTO `b_sys_config` (`id`, `type`, `description`, `update_time`)
VALUES (2, 'MARK_TIME', '30', '2021-08-09 15:38:58');
INSERT INTO `b_sys_config` (`id`, `type`, `description`, `update_time`)
VALUES (3, 'AUTO_REPORT', null, '2021-08-09 15:38:58');

UNLOCK TABLES;


# Dump of table b_sys_auth
# ------------------------------------------------------------
DROP TABLE IF EXISTS `b_sys_auth`;
CREATE TABLE `b_sys_auth` (
	`id`            int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
	`access_key` 	varchar(255) DEFAULT NULL COMMENT 'AccessKey',
	`access_secret` varchar(255) DEFAULT NULL COMMENT 'AccessSecret',
	`description` 	text		DEFAULT NULL COMMENT '离线授权证书',
	`type` 			varchar(16) NOT NULL COMMENT '授权类型',
    `update_time`   datetime    DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB 
	DEFAULT CHARSET = utf8mb4 COMMENT ='授权配置表';

  
# Dump of table b_user
# ------------------------------------------------------------

DROP TABLE IF EXISTS `b_user`;

CREATE TABLE `b_user`
(
    `id`                        int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `login_name`                varchar(64) NOT NULL COMMENT '登录名',
    `name`                      varchar(64) NOT NULL COMMENT '名称',
    `password`                  varchar(64) NOT NULL COMMENT '密码',
    `role`                      varchar(16) NOT NULL COMMENT '角色',
    `source`                    varchar(16) NOT NULL COMMENT '来源',
    `enable`                    tinyint(1)  NOT NULL COMMENT '是否启用',
    `school_id`                 int(11)     NOT NULL COMMENT '所属学校ID',
    `related_account`           varchar(64) DEFAULT NULL COMMENT '关联外部用户',
    `last_login_time`           datetime    DEFAULT NULL COMMENT '最后一次登录时间',
    `last_login_ip`             varchar(64) DEFAULT NULL COMMENT '最后一次登录IP',
    `created_time`              datetime    NOT NULL COMMENT '创建时间',
    `updated_time`              datetime    DEFAULT NULL COMMENT '修改时间',
    `access_token`              varchar(64) DEFAULT NULL COMMENT '访问令牌',
    `access_token_refresh_time` datetime    DEFAULT NULL COMMENT '访问令牌刷新时间',
    `scan_token`              	varchar(64) DEFAULT NULL COMMENT '扫描访问令牌',
    `scan_token_invalid_time` 	datetime    DEFAULT NULL COMMENT '扫描访问令牌刷新时间',
    `description` 				varchar(128) DEFAULT NULL COMMENT '描述',
    `empno` 					varchar(128) DEFAULT NULL COMMENT '工号',
    `random_password` 			varchar(64)  DEFAULT NULL COMMENT '随机密码',
    PRIMARY KEY (`id`),
    UNIQUE KEY `index1` (`login_name`),
    UNIQUE KEY `index2` (`school_id`, `related_account`),
    KEY `index3` (`school_id`, `role`, `source`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='用户表';

LOCK TABLES `b_user` WRITE;

INSERT INTO `b_user` (`id`, `login_name`, `name`, `password`, `role`, `source`, `enable`, `school_id`,
                      `created_time`, `updated_time`)
VALUES (1, 'admin', '超级管理员', 'd0e915689fc1f1e19e1a036c22bdfeab', 'SYS_ADMIN', 'INTERNAL', 1, 0,
        '2020-08-01 12:00:00', '2020-08-01 12:00:00');

UNLOCK TABLES;


# Dump of table eb_user_exam
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_user_exam`;

CREATE TABLE `eb_user_exam`
(
    `id`           int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `user_id`      int(11)     NOT NULL COMMENT '用户ID',
    `exam_id`	   int(11)	   NOT NULL COMMENT '考试ID',
    PRIMARY KEY (`id`),
    UNIQUE KEY `index1` (`user_id`, `exam_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='用户考试关联表';

  
# Dump of table eb_subject_user
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_subject_user`;

CREATE TABLE `eb_subject_user`
(
    `id`           int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `user_id`      int(11)     NOT NULL COMMENT '用户ID',
    `subject_code` varchar(32) NOT NULL COMMENT '科目代码',
    PRIMARY KEY (`id`),
    UNIQUE KEY `index1` (`user_id`, `subject_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='用户科目关联表';

# Dump of table eb_check_student
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_check_student`;
CREATE TABLE `eb_check_student`
(
    `student_id`   int(11)     NOT NULL COMMENT '学生ID',
    `exam_id`      int(11)     NOT NULL COMMENT '考试ID',
    `subject_code` varchar(32) NOT NULL COMMENT '科目代码',
    `type`         varchar(16) NOT NULL COMMENT '类型',
    `is_checked`   tinyint(1)  NOT NULL COMMENT '是否已处理',
    `update_time`  datetime DEFAULT NULL COMMENT '处理时间',
    PRIMARY KEY (`student_id`),
    KEY `index1` (`exam_id`, `subject_code`, `type`, `is_checked`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='审核学生表';

# Dump of table eb_data_sync
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_data_sync`;
CREATE TABLE `eb_data_sync`
(
    `examId`        int(11)      NOT NULL COMMENT '考试ID',
    `school_id`     int(11)      DEFAULT NULL COMMENT '学校ID',
    `cloud_exam_id` bigint(20)   NOT NULL COMMENT '云平台考试ID',
    `finished`      tinyint(1)   NOT NULL COMMENT '是否完成',
	`source`		varchar(16)  NOT NULL COMMENT '数据来源',
    `next_id`       bigint(20)   DEFAULT NULL COMMENT '下一位考生ID',
    `root_org_id`   varchar(32)  DEFAULT NULL COMMENT '机构ID',
    `subject_code`  varchar(32)  DEFAULT NULL COMMENT '科目代码',
    `app_id`        varchar(128) DEFAULT NULL COMMENT '项目ID',
	`access_key` 	varchar(64) DEFAULT NULL COMMENT '密匙',
  	`access_secret` varchar(64) DEFAULT NULL COMMENT '密钥',
    `student_url`   varchar(128) NOT NULL COMMENT '考生API URL',
    `subject_url`   varchar(128) NOT NULL COMMENT '科目API URL',
    `subject_paper_url` varchar(255) NOT NULL COMMENT '试卷详情API URL',
    `create_time`   datetime    DEFAULT NULL COMMENT '创建时间',
    `update_time`   datetime    DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`examId`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='数据同步表';

# Dump of table eb_exam
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_exam`;

CREATE TABLE `eb_exam`
(
    `id`                int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `name`              varchar(64) NOT NULL COMMENT '考试名称',
    `school_id`         int(11)     NOT NULL COMMENT '学校ID',
    `code`              varchar(64)  DEFAULT NULL COMMENT '考试代码',
    `exam_time`         datetime    NOT NULL COMMENT '考试时间',
    `type`              varchar(16) NOT NULL COMMENT '类型',
    `status`            varchar(16) NOT NULL COMMENT '状态',
    `card_type`         varchar(16)  DEFAULT NULL COMMENT '题卡类型',
    `force_special_tag` tinyint(1)  NOT NULL COMMENT '强制标记',
    `forbidden_info`    tinyint(1)  NOT NULL COMMENT '是否屏蔽个人信息',
    `forbidden_score`   tinyint(1)  NOT NULL COMMENT '是否屏蔽查询个人信息',
    `objective_status`  varchar(16) NOT NULL COMMENT '客观题统分状态',
    `sas_config`        text         DEFAULT NULL COMMENT '统计配置',
    `sheet_config`      text         DEFAULT NULL COMMENT '原图遮盖配置',
    `slice_config`      text         DEFAULT NULL COMMENT '裁切图坐标',
    `description`       varchar(128) DEFAULT NULL COMMENT '描述',
    `creator_id`        int(11)      DEFAULT NULL COMMENT '创建人',
    `create_time`       datetime     NOT NULL COMMENT '创建时间',
    `update_time`       datetime     DEFAULT NULL COMMENT '修改时间',
    `mark_start_time`   datetime     DEFAULT NULL COMMENT '考试开始时间',
    `mark_end_time`     datetime     DEFAULT NULL COMMENT '考试结束时间',
	`sheet_view`		tinyint(1)   NOT NULL COMMENT '原卷显示功能',
    `mark_mode`       	varchar(16)  DEFAULT NULL COMMENT '强制评卷模式',
	`scan_config`       text         DEFAULT NULL COMMENT '扫描配置',
    `auto_scroll`   	tinyint(1) 		NOT NULL COMMENT '评卷提交自动定位',
	`enable_split`   	tinyint(1)  	NOT NULL COMMENT '自动对切题卡',
	`show_reject`   	tinyint(1)  	NOT NULL COMMENT '显示打回前原分值',
	`inspect_unrepeated`   	tinyint(1)  	NOT NULL COMMENT '全卷多次复核时不能为同一账号',
	`inspect_scroll_bottom`   	tinyint(1)  	NOT NULL COMMENT '全卷复核时强制试卷拉到底部',
	`remark_count`   	int(11)  	DEFAULT NULL COMMENT '回评卷数',
	`show_objective_score`   	tinyint(1)  	NOT NULL COMMENT '是否显示客观分',
    PRIMARY KEY (`id`),
    UNIQUE KEY `index1` (`school_id`, `code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='考试表';



# Dump of table eb_exam_package
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_exam_package`;

CREATE TABLE `eb_exam_package`
(
    `exam_id`   int(11)     NOT NULL COMMENT '考试ID',
    `code`      varchar(64) NOT NULL COMMENT '试卷袋编号',
    `pic_count` int(11)     NOT NULL COMMENT '上传图片数量',
    PRIMARY KEY (`exam_id`, `code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='卷袋信息表';



# Dump of table eb_exam_question
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_exam_question`;

CREATE TABLE `eb_exam_question`
(
    `id`               int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`          int(11)     NOT NULL COMMENT '考试ID',
    `subject_code`     varchar(32) NOT NULL DEFAULT '' COMMENT '科目代码',
    `paper_type`       varchar(8)  NOT NULL COMMENT '试卷类型',
    `is_objective`     tinyint(1)  NOT NULL COMMENT '是否客观题',
    `group_number`     int(11)     DEFAULT NULL COMMENT '分组序号',
    `main_number`      int(11)     NOT NULL COMMENT '大题号',
    `sub_number`       varchar(32) NOT NULL COMMENT '小题号',
    `main_title`       varchar(128) NOT NULL COMMENT '大题名称',
    `name`       	   varchar(128) DEFAULT NULL COMMENT '名称',
    `answer`           varchar(16)          DEFAULT NULL COMMENT '正确答案',
    `total_score`      double      NOT NULL COMMENT '满分',
    `interval_score`   double      NOT NULL COMMENT '评卷间隔分',
    `objective_policy` varchar(16)          DEFAULT NULL COMMENT '客观题判分策略',
	`question_type`		varchar(32)         DEFAULT NULL COMMENT '题型',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`, `is_objective`, `main_number`, `sub_number`, `paper_type`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='小题信息表';



# Dump of table eb_exam_student
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_exam_student`;

CREATE TABLE `eb_exam_student`
(
    `id`                    int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`               int(11)     NOT NULL COMMENT '考试ID',
    `school_id`             int(11)     NOT NULL COMMENT '学校ID',
    `subject_code`          varchar(32) NOT NULL COMMENT '科目代码',
    `subject_name`          varchar(32) NOT NULL COMMENT '科目名称',
    `paper_type`            varchar(8)  NOT NULL COMMENT '试卷类型',
    `exam_number`           varchar(64) NOT NULL COMMENT '准考证号',
    `secret_number`         varchar(64) NOT NULL COMMENT '密号',
    `student_code`          varchar(64) NOT NULL COMMENT '学号',
    `name`                  varchar(64) NOT NULL COMMENT '姓名',
    `package_code`          varchar(64)  DEFAULT NULL COMMENT '试卷袋编号',
    `campus_name`           varchar(64)  DEFAULT NULL COMMENT '学习中心名称',
    `exam_site`             varchar(32)  DEFAULT NULL COMMENT '考点',
    `exam_room`             varchar(32)  DEFAULT NULL COMMENT '考场',
    `remark`                varchar(128) DEFAULT NULL COMMENT '备注',
    `batch_code`            varchar(32)  DEFAULT NULL COMMENT '扫描批次号',
    `sheet_count`           int(11)     NOT NULL COMMENT '原图数量',
    `slice_count`           int(11)     NOT NULL COMMENT '小图数量',
    `answers`               text COMMENT '客观题识别结果',
    `is_upload`             tinyint(1)  NOT NULL COMMENT '是否已上传',
    `is_absent`             tinyint(1)  NOT NULL COMMENT '是否缺考',
    `is_manual_absent`      tinyint(1)  NOT NULL COMMENT '是否人工指定缺考',
    `is_breach`             tinyint(1)  NOT NULL COMMENT '是否违纪',
    `is_exception`          tinyint(1)  NOT NULL COMMENT '是否数据异常',
    `is_trial`              tinyint(1)  NOT NULL COMMENT '是否试评',
    `upload_time`           datetime     DEFAULT NULL COMMENT '上传时间',
    `inspect_time`          datetime     DEFAULT NULL COMMENT '复核时间',
    `inspector_id`          int(11)      DEFAULT NULL COMMENT '复核人ID',
    `inspect_count`         int(11)      NOT NULL COMMENT '复核次数',
    `objective_score`       double       DEFAULT NULL COMMENT '客观总分',
    `objective_score_list`  text COMMENT '客观得分明细',
    `subjective_status`     varchar(16) NOT NULL COMMENT '主观题状态',
    `subjective_score`      double       DEFAULT NULL COMMENT '主观总分',
    `subjective_score_list` text COMMENT '主观得分明细',
    `subject_level`         varchar(64)  DEFAULT NULL COMMENT '层次',
    `subject_category`      varchar(64)  DEFAULT NULL COMMENT '专业类型',
    `college`               varchar(64) NOT NULL COMMENT '电厂',
    `class_name`            varchar(64) NOT NULL COMMENT '机组',
    `teacher`               varchar(64) NOT NULL COMMENT '老师',
    `card_number` 			int (11) 	DEFAULT NULL COMMENT '题卡号',
    `score_verify_user` 			int (11) 	DEFAULT NULL COMMENT '成绩校验人ID',
    `score_verify_time`          datetime     DEFAULT NULL COMMENT '成绩校验时间',
    `score_verify_flagged`             tinyint(1)  DEFAULT NULL COMMENT '成绩校验标记结果',
    `inspected`	tinyint(1) NOT NULL COMMENT '当前轮次是否已审核',
    PRIMARY KEY (`id`),
    UNIQUE KEY `index1` (`exam_id`, `exam_number`),
    UNIQUE KEY `index2` (`exam_id`, `secret_number`),
    KEY `index3` (`exam_id`, `subject_code`, `is_upload`, `is_absent`, `is_breach`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='考试考生库';

# Dump of table eb_inspect_history
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_inspect_history`;

CREATE TABLE `eb_inspect_history` 
(
	`id` 		INT (11) NOT NULL AUTO_INCREMENT COMMENT '主键',
	`exam_id`	INT (11) NOT NULL COMMENT '考试ID',
	`subject_code` 	VARCHAR (32) NOT NULL COMMENT '科目代码',
	`inspect_time` 	DATETIME NOT NULL COMMENT '复核时间',
	`inspector_id` 	INT (11) DEFAULT NULL COMMENT '复核人ID',
	`student_id` 	INT (11) DEFAULT NULL COMMENT '考生ID',
	`inspect_round` 	INT (11) NOT NULL COMMENT '复核轮数',
	PRIMARY KEY (`id`),
	UNIQUE KEY `index1` (`student_id`, `inspect_round`)
) ENGINE = INNODB 
	DEFAULT CHARSET = utf8mb4 COMMENT = '复核记录表';

# Dump of table eb_exam_subject
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_exam_subject`;

CREATE TABLE `eb_exam_subject`
(
    `exam_id`          int(11)     NOT NULL COMMENT '考试ID',
    `code`             varchar(32) NOT NULL COMMENT '科目代码',
    `name`             varchar(32) NOT NULL COMMENT '科目名称',
    `level`            varchar(64)  DEFAULT NULL COMMENT '层次',
    `category`         varchar(64)  DEFAULT NULL COMMENT '专业类型',
    `objective_score`  double      NOT NULL COMMENT '客观题满分',
    `subjective_score` double      NOT NULL COMMENT '主观题满分',
    `total_score`      double      NOT NULL COMMENT '全卷满分',
    `upload_count`     int(11)     NOT NULL COMMENT '已上传人数',
	`trial_count`      int(11)      DEFAULT NULL COMMENT '试评数量',
    `remark`           varchar(128) DEFAULT NULL COMMENT '备注',
    `slice_config`     text         DEFAULT NULL COMMENT '裁切图配置',
    `sheet_config`     text         DEFAULT NULL COMMENT '原图遮盖配置',
    `sas_config`       text         DEFAULT NULL COMMENT '统计配置',
    `card_type`        varchar(16)  DEFAULT NULL COMMENT '题卡类型',
    `paper_file_type`  varchar(16)  DEFAULT NULL COMMENT '试卷文件类型',
    `answer_file_type` varchar(16)  DEFAULT NULL COMMENT '标答文件类型',
	`auto_scroll`   	tinyint(1)	DEFAULT NULL COMMENT '评卷提交自动定位',
	`enable_split`   	tinyint(1)	DEFAULT NULL COMMENT '自动对切题卡',
	`display_question_name`   	tinyint(1)	NOT NULL COMMENT '显示题目昵称',
	`inspect_round` 	INT (11)	NOT NULL COMMENT '复核轮数',
	`selective` 		tinyint(1)  NOT NULL COMMENT '选做题科目',
    PRIMARY KEY (`exam_id`, `code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='考试科目表';

# Dump of table eb_marker
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_marker`;

CREATE TABLE `eb_marker`
(
    `id`           int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`      int(11)     NOT NULL COMMENT '考试ID',
    `subject_code` varchar(32) NOT NULL COMMENT '科目代码',
    `group_number` int(11)     NOT NULL COMMENT '分组编号',
    `user_id`      int(11)     NOT NULL COMMENT '用户ID',
    `enable`       tinyint(1)  NOT NULL COMMENT '是否启用',
    `mode`         varchar(16) DEFAULT NULL COMMENT '强制评卷模式',
    `top_count`    int(11)     DEFAULT NULL COMMENT '评卷数上限',
    `finish_count` int(11)     DEFAULT NULL COMMENT '完成数量',
    `valid_count`  int(11)     DEFAULT NULL COMMENT '有效数量',
    `reject_count` int(11) 	   DEFAULT NULL COMMENT '打回次数',
    `avg_score`    double      DEFAULT NULL COMMENT '平均分',
    `avg_speed`    double      DEFAULT NULL COMMENT '平均时长',
    `stdev_score`  double      DEFAULT NULL COMMENT '标准差',
    `mark_setting` text        DEFAULT NULL COMMENT '个性化评卷参数设置',
    PRIMARY KEY (`id`),
    KEY `index1` (`user_id`),
    KEY `index2` (`exam_id`, `subject_code`, `group_number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='评卷员表';


# Dump of table eb_marker_class
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_marker_class`;

CREATE TABLE `eb_marker_class`
(
    `id`         int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
    `user_id`    int(11) NOT NULL COMMENT '用户ID',
    `exam_id`    int(11) NOT NULL COMMENT '考试ID',
    `class_name` varchar(64) DEFAULT NULL COMMENT '机组名称',
    PRIMARY KEY (`id`),
    UNIQUE KEY `index1` (`user_id`, `exam_id`, `class_name`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='评卷员机组表';


# Dump of table eb_mark_group
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_mark_group`;

CREATE TABLE `eb_mark_group`
(
    `exam_id`             int(11)     NOT NULL COMMENT '考试ID',
    `subject_code`        varchar(32) NOT NULL COMMENT '科目代码',
    `number`              int(11)     NOT NULL COMMENT '序号',
    `pic_list`            text 		  DEFAULT NULL COMMENT '小图配置',
    `total_score`         double      NOT NULL COMMENT '满分',
    `double_rate`         double       DEFAULT NULL COMMENT '双评比例',
    `arbitrate_threshold` double       DEFAULT NULL COMMENT '仲裁阈值',
    `score_policy`        varchar(16)  DEFAULT NULL COMMENT '合分策略',
    `third_policy`        varchar(32)  DEFAULT NULL COMMENT '三评规则',
    `mark_mode`           varchar(16)  DEFAULT NULL COMMENT '强制评卷模式',
    `sheet_view`          tinyint(1)  NOT NULL COMMENT '是否允许查看原卷',
    `enable_all_zero`     tinyint(1)  NOT NULL COMMENT '是否启用全零分',
    `status`              varchar(16) NOT NULL COMMENT '评卷状态',
    `build_time`          datetime     DEFAULT NULL COMMENT '最后生成任务时间',
    `library_count`       int(11)     NOT NULL COMMENT '任务总量',
    `marked_count`        int(11)     NOT NULL COMMENT '已评数量',
    `left_count`          int(11)     NOT NULL COMMENT '剩余数量',
    `is_selective`        tinyint(1)  DEFAULT NULL COMMENT '是否选做题分组',
    PRIMARY KEY (`exam_id`, `subject_code`, `number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='评卷分组表';


# Dump of table eb_mark_group_student
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_mark_group_student`;

CREATE TABLE `eb_mark_group_student`
(
    `student_id`   int(11)     NOT NULL COMMENT '考生ID',
    `group_number` int(11)     NOT NULL COMMENT '分组ID',
    `exam_id`      int(11)     NOT NULL COMMENT '考试ID',
    `subject_code` varchar(32) NOT NULL COMMENT '科目代码',
    `status`       varchar(16) NOT NULL COMMENT '状态',
    PRIMARY KEY (`student_id`, `group_number`),
    KEY `index1` (`exam_id`, `subject_code`, `group_number`, `status`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='考生分组状态表';


# Dump of table eb_subjective_score
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_subjective_score`;

CREATE TABLE `eb_subjective_score`
(
    `student_id`   int(11)     NOT NULL COMMENT '考生ID',
    `main_number`  int(11)     NOT NULL COMMENT '大题号',
    `sub_number`   varchar(32) NOT NULL COMMENT '小题号',
    `exam_id`      int(11)     NOT NULL COMMENT '考试ID',
    `subject_code` varchar(32) NOT NULL COMMENT '科目代码',
    `group_number` int(11)     NOT NULL COMMENT '分组序号',
    `group_score`  double      NOT NULL COMMENT '分组得分',
    `main_score`   double      NOT NULL COMMENT '大题得分',
    `score`        double      NOT NULL COMMENT '小题得分',
    `unanswered_count`   	int(11)	NOT NULL COMMENT '未作答的步骤数量',
    `uncalculate`			tinyint (1) NOT NULL COMMENT '是否合分',
    `rejected`				tinyint (1) NOT NULL COMMENT '是否被打回',
    PRIMARY KEY (`student_id`, `main_number`, `sub_number`),
    KEY `index1` (`exam_id`, `subject_code`, `main_number`, `main_score`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='主观题得分明细表';

  
# Dump of table eb_selective_group
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_selective_group`;

CREATE TABLE `eb_selective_group`
(
    `exam_id`             int(11)     NOT NULL COMMENT '考试ID',
    `subject_code`        varchar(32) NOT NULL COMMENT '科目代码',
    `main_number`         int(11)     NOT NULL COMMENT '大题号',
    `selective_count`     int(11)     NOT NULL COMMENT '选做数量',
    `selective_index`     int(11)     NOT NULL COMMENT '选做分组序号',
    `selective_part` 	  int (11) 	  NOT NULL COMMENT '选做题分区号',
    `score_policy`		  varchar(64) DEFAULT NULL COMMENT '合分方式',
    PRIMARY KEY (`exam_id`, `subject_code`, `main_number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='选做题分组表';


# Dump of table eb_selective_student
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_selective_student`;

CREATE TABLE `eb_selective_student`
(
    `student_id`          int(11) 	  NOT NULL COMMENT '考生ID',
    `exam_id`             int(11)     NOT NULL COMMENT '考试ID',
    `subject_code`        varchar(32) NOT NULL COMMENT '科目代码',
	`muti_selective`		  tinyint (1) NOT NULL COMMENT '是否多选做',
	`less_selective`		  tinyint (1) NOT NULL COMMENT '是否少选做',
    PRIMARY KEY (`student_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='选做题考生状态表';
  
  
# Dump of table eb_operation_log
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_operation_log`;

CREATE TABLE `eb_operation_log`
(
    `id`          int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`     int(11)      DEFAULT NULL COMMENT '考试ID',
    `school_id`   int(11)     NOT NULL COMMENT '学校ID',
    `type`        varchar(16) NOT NULL COMMENT '类型',
    `menu`        varchar(128) DEFAULT NULL COMMENT '菜单',
    `description` varchar(128) DEFAULT NULL COMMENT '详情',
    `is_marker`   tinyint(1)  NOT NULL COMMENT '是否评卷员',
    `operator_id` int(11)     NOT NULL COMMENT '操作人ID',
    `login_name`  varchar(64) NOT NULL COMMENT '登录名',
    `ip_address`  varchar(128) DEFAULT NULL COMMENT '访问地址',
    `create_time` datetime    NOT NULL COMMENT '创建时间',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `school_id`, `type`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='考试操作记录表';


# Dump of table m_arbitrate_history
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_arbitrate_history`;

CREATE TABLE `m_arbitrate_history`
(
    `id`            int(11)     NOT NULL AUTO_INCREMENT COMMENT '自增主键',
    `exam_id`       int(11)     NOT NULL COMMENT '考试ID',
    `subject_code`  varchar(32) NOT NULL COMMENT '科目代码',
    `group_number`  int(11)     NOT NULL COMMENT '大题号',
    `exam_number`   varchar(64) NOT NULL COMMENT '准考证号',
    `secret_number` varchar(64) NOT NULL COMMENT '考生密号',
    `student_id`    int(11)     NOT NULL COMMENT '考生ID',
    `status`        varchar(16) NOT NULL COMMENT '状态',
    `user_id`       int(11)      DEFAULT NULL COMMENT '处理人ID',
    `total_score`   double       DEFAULT NULL COMMENT '总分',
    `score_list`    text		 DEFAULT NULL COMMENT '给分明细',
	`unanswered_count`  int(11)		 DEFAULT NULL COMMENT '未作答的步骤数量',
    `create_time`   datetime    NOT NULL COMMENT '创建时间',
    `update_time`   datetime     DEFAULT NULL COMMENT '处理时间',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`, `group_number`, `status`),
    KEY `index2` (`user_id`, `status`, `update_time`),
    KEY `index3` (`student_id`, `status`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='仲裁记录表';


# Dump of table m_library
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_library`;

CREATE TABLE `m_library`
(
    `id`                int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`           int(11)     NOT NULL COMMENT '考试ID',
    `subject_code`      varchar(32) NOT NULL COMMENT '科目代码',
    `group_number`      int(11)     NOT NULL COMMENT '大题号',
    `student_id`        int(11)     NOT NULL COMMENT '考生ID',
    `exam_number`       varchar(64) NOT NULL COMMENT '准考证号',
    `secret_number`     varchar(64) NOT NULL COMMENT '考生密号',
    `task_number`       int(11)     NOT NULL COMMENT '多评任务序号',
    `status`            varchar(16) NOT NULL COMMENT '状态',
    `marker_id`         int(11)      DEFAULT NULL COMMENT '评卷员ID',
    `marker_time`       datetime     DEFAULT NULL COMMENT '评卷时间',
    `marker_score`      double       DEFAULT NULL COMMENT '评卷总分',
    `marker_score_list` text		 DEFAULT NULL COMMENT '评卷给分明细',
    `marker_spent`      int(11)      DEFAULT NULL COMMENT '评卷时长',
    `header_id`         int(11)      DEFAULT NULL COMMENT '评卷组长ID',
    `header_time`       datetime     DEFAULT NULL COMMENT '评卷组长评卷时间',
    `header_score`      double       DEFAULT NULL COMMENT '评卷组长总分',
    `header_score_list` text		 DEFAULT NULL COMMENT '评卷组长给分明细',
    `unanswered_count`  int(11)		 DEFAULT NULL COMMENT '未作答的步骤数量',
    `reject_reason` 	varchar(128) DEFAULT NULL COMMENT '打回原因',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`, `group_number`, `status`),
    UNIQUE KEY `index2` (`student_id`, `group_number`, `task_number`),
    KEY `index3` (`marker_id`, `status`, `marker_time`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='评卷任务表';


# Dump of table m_reject_history
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_reject_history`;
CREATE TABLE `m_reject_history`
(
    `id`            int(11)     NOT NULL AUTO_INCREMENT COMMENT '自增主键',
    `exam_id`       int(11)     NOT NULL COMMENT '考试ID',
    `subject_code`  varchar(32) NOT NULL COMMENT '科目代码',
    `group_number`  int(11)     NOT NULL COMMENT '大题号',
    `exam_number`   varchar(64) NOT NULL COMMENT '准考证号',
    `secret_number` varchar(64) NOT NULL COMMENT '考生密号',
    `student_id`    int(11)     NOT NULL COMMENT '考生ID',
    `library_id`    int(11)     NOT NULL COMMENT '评卷任务ID',
    `marker_id`     int(11)     NOT NULL COMMENT '评卷员ID',
    `user_id`       int(11)      DEFAULT NULL COMMENT '打回人ID',
    `total_score`   double       DEFAULT NULL COMMENT '总分',
    `score_list`    text		 DEFAULT NULL COMMENT '打回时给分明细',
    `reject_score_list`    text		 DEFAULT NULL COMMENT '打回后给分明细',
	`reason` 	varchar(128) DEFAULT NULL COMMENT '打回原因',
    `create_time`   datetime    NOT NULL COMMENT '创建时间',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`, `group_number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='打回记录表';
  
  
# Dump of table m_special_tag
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_special_tag`;

CREATE TABLE `m_special_tag`
(
    `id`           int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `library_id`   int(11)     NOT NULL COMMENT '评卷任务ID',
    `tag_name`     varchar(64) NOT NULL COMMENT '标记内容',
    `position_x`   double      NOT NULL COMMENT 'X轴位置',
    `position_y`   double      NOT NULL COMMENT 'Y轴位置',
    `offset_index` int(11)     NOT NULL COMMENT '裁切图序号',
    `offset_x`     int(11)     NOT NULL COMMENT '裁切图X轴坐标',
    `offset_y`     int(11)     NOT NULL COMMENT '裁切图Y轴坐标',
    PRIMARY KEY (`id`),
    KEY `index1` (`library_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='特殊标记表';


# Dump of table m_track
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_track`;

CREATE TABLE `m_track`
(
    `library_id`      int(11)      NOT NULL COMMENT '评卷任务ID',
    `question_number` varchar(128) NOT NULL COMMENT '完整题号',
    `number`          int(11)      NOT NULL COMMENT '序号',
    `student_id`      int(11)      NOT NULL COMMENT '考生ID',
    `exam_id`         int(11)      NOT NULL COMMENT '考试ID',
    `subject_code`    varchar(32)  NOT NULL COMMENT '科目代码',
    `group_number`    int(11)      NOT NULL COMMENT '大题题号',
    `marker_id`       int(11)      NOT NULL COMMENT '评卷员ID',
    `score`           double       NOT NULL COMMENT '给分',
    `position_x`      double       NOT NULL COMMENT 'X轴位置',
    `position_y`      double       NOT NULL COMMENT 'Y轴位置',
    `offset_index`    int(11)      NOT NULL COMMENT '裁切图序号',
    `offset_x`        int(11)      NOT NULL COMMENT '裁切图X轴坐标',
    `offset_y`        int(11)      NOT NULL COMMENT '裁切图Y轴坐标',
    `unanswered`      tinyint(1)   NOT NULL COMMENT '未作答',
    PRIMARY KEY (`library_id`, `question_number`, `number`),
    KEY `index1` (`student_id`, `group_number`),
    KEY `index2` (`marker_id`),
    KEY `index3` (`exam_id`, `subject_code`, `group_number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='轨迹给分表';

  
# Dump of table m_header_tag
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_header_tag`;

CREATE TABLE `m_header_tag`
(
    `id`           int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `student_id`   int(11)     NOT NULL COMMENT '考生ID',
	`group_number` int(11)     NOT NULL COMMENT '大题题号',
	`user_id`      int(11)     NOT NULL COMMENT '用户ID',
    `tag_name`     varchar(64) NOT NULL COMMENT '标记内容',
    `position_x`   double      NOT NULL COMMENT 'X轴位置',
    `position_y`   double      NOT NULL COMMENT 'Y轴位置',
    `offset_index` int(11)     NOT NULL COMMENT '裁切图序号',
    `offset_x`     int(11)     NOT NULL COMMENT '裁切图X轴坐标',
    `offset_y`     int(11)     NOT NULL COMMENT '裁切图Y轴坐标',
    PRIMARY KEY (`id`),
    KEY `index1` (`student_id`,`group_number`),
	KEY `index2` (`user_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='组长特殊标记表';


# Dump of table m_header_track
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_header_track`;

CREATE TABLE `m_header_track`
(
	`student_id`      int(11)      NOT NULL COMMENT '考生ID',
    `question_number` varchar(128) NOT NULL COMMENT '完整题号',
    `number`          int(11)      NOT NULL COMMENT '序号',
    `exam_id`         int(11)      NOT NULL COMMENT '考试ID',
    `subject_code`    varchar(32)  NOT NULL COMMENT '科目代码',
    `group_number`    int(11)      NOT NULL COMMENT '大题题号',
    `user_id`         int(11)      NOT NULL COMMENT '用户ID',
    `score`           double       NOT NULL COMMENT '给分',
    `position_x`      double       NOT NULL COMMENT 'X轴位置',
    `position_y`      double       NOT NULL COMMENT 'Y轴位置',
    `offset_index`    int(11)      NOT NULL COMMENT '裁切图序号',
    `offset_x`        int(11)      NOT NULL COMMENT '裁切图X轴坐标',
    `offset_y`        int(11)      NOT NULL COMMENT '裁切图Y轴坐标',
    `unanswered`      tinyint(1)   NOT NULL COMMENT '未作答',
    PRIMARY KEY (`student_id`, `question_number`, `number`),
    KEY `index1` (`student_id`, `group_number`),
    KEY `index2` (`user_id`),
    KEY `index3` (`exam_id`, `subject_code`, `group_number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='组长轨迹给分表';


# Dump of table m_problem_type
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_problem_type`;
CREATE TABLE `m_problem_type`
(
    `id`        int(11)    NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`   int(11)    NOT NULL COMMENT '考试ID',
    `name`      varchar(64) DEFAULT NULL COMMENT '名称',
    `is_custom` tinyint(1) NOT NULL COMMENT '是否自定义',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='问题类型表';


# Dump of table m_problem_history
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_problem_history`;
CREATE TABLE `m_problem_history`
(
    `id`            int(11)     NOT NULL AUTO_INCREMENT COMMENT '自增主键',
    `exam_id`       int(11)     NOT NULL COMMENT '考试ID',
    `subject_code`  varchar(32) NOT NULL COMMENT '科目代码',
    `group_number`  int(11)     NOT NULL COMMENT '大题号',
    `exam_number`   varchar(64) NOT NULL COMMENT '准考证号',
    `secret_number` varchar(64) NOT NULL COMMENT '考生密号',
    `problem_id`    int(11)     NOT NULL COMMENT '问题ID',
    `student_id`    int(11)     NOT NULL COMMENT '考生ID',
    `library_id`    int(11)     NOT NULL COMMENT '评卷任务ID',
    `marker_id`     int(11)     NOT NULL COMMENT '评卷员ID',
    `status`        varchar(16)  DEFAULT NULL COMMENT '状态',
    `user_id`       int(11)      DEFAULT NULL COMMENT '处理人ID',
    `total_score`   double       DEFAULT NULL COMMENT '总分',
    `score_list`    text		 DEFAULT NULL COMMENT '给分明细',
	`unanswered_count`	int(11)	DEFAULT NULL COMMENT '未作答的步骤数量',
    `create_time`   datetime    NOT NULL COMMENT '创建时间',
    `update_time`   datetime     DEFAULT NULL COMMENT '处理时间',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`, `group_number`, `status`),
    KEY `index2` (`user_id`, `status`, `update_time`),
    KEY `index3` (`student_id`, `status`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='问题卷历史表';


# Dump of table m_trial_library
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_trial_library`;
CREATE TABLE `m_trial_library`
(
    `id`            int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`       int(11)     NOT NULL COMMENT '考试ID',
    `subject_code`  varchar(32) NOT NULL COMMENT '科目代码',
    `group_number`  int(11)     NOT NULL COMMENT '分组序号',
    `student_id`    int(11)     NOT NULL COMMENT '考生ID',
    `exam_number`   varchar(64) NOT NULL COMMENT '准考证号',
    `secret_number` varchar(64) NOT NULL COMMENT '考生密号',
	`marker_id`         int(11)      DEFAULT NULL COMMENT '评卷员ID',
    `marker_time`       datetime     DEFAULT NULL COMMENT '评卷时间',
    `marker_score`      double       DEFAULT NULL COMMENT '评卷总分',
    `marker_score_list` text		 DEFAULT NULL COMMENT '评卷给分明细',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`, `group_number`),
    UNIQUE KEY `index2` (`student_id`, `group_number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='试评任务表';


# Dump of table m_trial_tag
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_trial_tag`;
CREATE TABLE `m_trial_tag`
(
    `id`           int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `library_id`   int(11)     NOT NULL COMMENT '评卷任务ID',
    `marker_id`    int(11)     NOT NULL COMMENT '评卷员ID',
    `content`      varchar(64) NOT NULL COMMENT '标记内容',
    `position_x`   double      NOT NULL COMMENT 'X轴位置',
    `position_y`   double      NOT NULL COMMENT 'Y轴位置',
    `offset_index` int(11)     NOT NULL COMMENT '裁切图序号',
    `offset_x`     int(11)     NOT NULL COMMENT '裁切图X轴坐标',
    `offset_y`     int(11)     NOT NULL COMMENT '裁切图Y轴坐标',
    PRIMARY KEY (`id`),
    KEY `index1` (`library_id`, `marker_id`),
    KEY `index2` (`marker_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='试评特殊标记表';


# Dump of table m_trial_track
# ------------------------------------------------------------

DROP TABLE IF EXISTS `m_trial_track`;
CREATE TABLE `m_trial_track`
(
    `library_id`      int(11)     NOT NULL COMMENT '评卷任务ID',
    `marker_id`       int(11)     NOT NULL COMMENT '评卷员ID',
    `question_number` varchar(64) NOT NULL COMMENT '完整题号',
    `number`          int(11)     NOT NULL COMMENT '序号',
    `exam_id`         int(11)     NOT NULL COMMENT '考试ID',
    `subject_code`    varchar(32) NOT NULL COMMENT '科目代码',
    `group_number`    int(11)     NOT NULL COMMENT '大题题号',
    `student_id`      int(11)     NOT NULL COMMENT '考生ID',
    `score`           double      NOT NULL COMMENT '给分',
    `position_x`      double      NOT NULL COMMENT 'X轴位置',
    `position_y`      double      NOT NULL COMMENT 'Y轴位置',
    `offset_index`    int(11)     NOT NULL COMMENT '裁切图序号',
    `offset_x`        int(11)     NOT NULL COMMENT '裁切图X轴坐标',
    `offset_y`        int(11)     NOT NULL COMMENT '裁切图Y轴坐标',
    `unanswered`      tinyint(1)   NOT NULL COMMENT '未作答',
    PRIMARY KEY (`library_id`, `marker_id`, `number`, `question_number`),
    KEY `index1` (`exam_id`, `subject_code`, `group_number`),
    KEY `index2` (`student_id`),
    KEY `index3` (`marker_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='试评轨迹表';



# Dump of table s_basic_group
# ------------------------------------------------------------

DROP TABLE IF EXISTS `s_basic_class_group`;
CREATE TABLE `s_basic_class_group`
(
    `id`                   int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`              int(11)      DEFAULT NULL COMMENT '考试ID',
    `subject_code`         varchar(32)  DEFAULT NULL COMMENT '科目代码',
    `subject_name`         varchar(32)  DEFAULT NULL COMMENT '科目名称',
    `class_name`           varchar(64)  DEFAULT NULL COMMENT '机组名称',
    `discrimination`       double       DEFAULT NULL COMMENT '区分度',
    `objective`            tinyint(1)   DEFAULT NULL COMMENT '是否客观题',
    `group_name`           varchar(128) DEFAULT NULL COMMENT '大题名称',
    `group_number`         int(11)      DEFAULT NULL COMMENT '大题号',
    `question_count`       int(11)      DEFAULT NULL COMMENT '题目数量',
    `total_score`          double       DEFAULT NULL COMMENT '总分',
    `difficulity_level`    text         DEFAULT NULL COMMENT '难度分布',
    `discrimination_level` text         DEFAULT NULL COMMENT '区分度分布',
    `coefficient`          double       DEFAULT NULL COMMENT '差异系数',
    `difficulty`           double       DEFAULT NULL COMMENT '难度',
    `paper_type`           varchar(8)   DEFAULT NULL COMMENT '试卷类型',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='机组大题统计表';


# Dump of table s_basic_group
# ------------------------------------------------------------

DROP TABLE IF EXISTS `s_basic_group`;
CREATE TABLE `s_basic_group`
(
    `id`                   int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`              int(11)      DEFAULT NULL COMMENT '考试ID',
    `subject_code`         varchar(32)  DEFAULT NULL COMMENT '科目代码',
    `subject_name`         varchar(32)  DEFAULT NULL COMMENT '科目名称',
    `objective`            tinyint(1)   DEFAULT NULL COMMENT '是否客观题',
    `group_name`           varchar(128) DEFAULT NULL COMMENT '大题名称',
    `group_number`         int(11)      DEFAULT NULL COMMENT '大题号',
    `max_score`            double       DEFAULT NULL COMMENT '最高分',
    `min_score`            double       DEFAULT NULL COMMENT '最低分',
    `avg_score`            double       DEFAULT NULL COMMENT '平均分',
    `total_score`          double       DEFAULT NULL COMMENT '满分',
    `stdev`                double       DEFAULT NULL COMMENT '标准差',
    `coefficient`          double       DEFAULT NULL COMMENT '差异系数',
    `score_rate`           double       DEFAULT NULL COMMENT '得分率',
    `full_count`           int(11)      DEFAULT NULL COMMENT '满分人数',
    `zero_count`           int(11)      DEFAULT NULL COMMENT '零分人数',
    `difficulty`           double       DEFAULT NULL COMMENT '难度',
    `discrimination`       double       DEFAULT NULL COMMENT '区分度',
    `question_count`       int(11)      DEFAULT NULL COMMENT '题目数量',
    `reality_count`        int(11)      DEFAULT NULL COMMENT '有效数量',
    `difficulity_level`    text         DEFAULT NULL COMMENT '难度分布',
    `discrimination_level` text         DEFAULT NULL COMMENT '区分度分布',
    `paper_type`           varchar(8)   DEFAULT NULL COMMENT '试卷类型',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='大题统计表';


# Dump of table s_basic_question
# ------------------------------------------------------------

DROP TABLE IF EXISTS `s_basic_question`;
CREATE TABLE `s_basic_question`
(
    `id`              int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`         int(11)     DEFAULT NULL COMMENT '考试ID',
    `subject_code`    varchar(32) DEFAULT NULL COMMENT '科目代码',
    `subject_name`    varchar(32) DEFAULT NULL COMMENT '科目名称',
    `objective`       tinyint(1)  DEFAULT NULL COMMENT '是否客观题',
    `question_name`   varchar(64) DEFAULT NULL COMMENT '题目名称',
    `paper_type`      varchar(8)  DEFAULT NULL COMMENT '试卷类型',
    `main_number`     int(11) 	  NOT NULL COMMENT '大题号',
    `sub_number`      varchar(32) NOT NULL COMMENT '小题号',
    `avg_score`       double      DEFAULT NULL COMMENT '平均分',
    `total_score`     double      DEFAULT NULL COMMENT '满分',
    `stdev`           double      DEFAULT NULL COMMENT '标准差',
    `score_rate`      double      DEFAULT NULL COMMENT '得分率',
    `full_score_rate` double      DEFAULT NULL COMMENT '满分率',
    `coefficient`     double      DEFAULT NULL COMMENT '差异系数',
    `difficulty`      double      DEFAULT NULL COMMENT '难度',
    `discrimination`  double      DEFAULT NULL COMMENT '区分度',
    `max_score`       double      DEFAULT NULL COMMENT '最大分数',
    `min_score`       double      DEFAULT NULL COMMENT '最小分数',
    `reality_count`   int(11)     DEFAULT NULL COMMENT '有效数量',
    `zero_count`      int(11)     DEFAULT NULL COMMENT '零分数量',
    `options`         text        DEFAULT NULL COMMENT '选项',
    `answer`          varchar(16) DEFAULT NULL COMMENT '答案',
    `full_count`      int(11)     DEFAULT NULL COMMENT '满分数量',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='小题统计表';


# Dump of table s_basic_subject
# ------------------------------------------------------------

DROP TABLE IF EXISTS `s_basic_subject`;
CREATE TABLE `s_basic_subject`
(
    `id`                   int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`              int(11)     DEFAULT NULL COMMENT '考试ID',
    `subject_code`         varchar(32) DEFAULT NULL COMMENT '科目代码',
    `subject_name`         varchar(32) DEFAULT NULL COMMENT '科目名称',
    `absent_count`         int(11)     DEFAULT NULL COMMENT '缺考人数',
    `breach_count`         int(11)     DEFAULT NULL COMMENT '违纪人数',
    `pass_count`           int(11)     DEFAULT NULL COMMENT '及格人数',
    `pass_rate`            double      DEFAULT NULL COMMENT '及格率',
    `excellent_count`      int(11)     DEFAULT NULL COMMENT '优秀人数',
    `excellent_rate`       double      DEFAULT NULL COMMENT '优秀率',
    `reality_count`        int(11)     DEFAULT NULL COMMENT '有效人数',
    `max_score`            double      DEFAULT NULL COMMENT '最高分',
    `min_score`            double      DEFAULT NULL COMMENT '最低分',
    `avg_score`            double      DEFAULT NULL COMMENT '平均分',
    `total_count`          int(11)     DEFAULT NULL COMMENT '总人数',
    `score_range`          text 	   DEFAULT NULL COMMENT '分数分布',
    `options`              text        DEFAULT NULL COMMENT '选项',
    `difficulity_level`    text        DEFAULT NULL COMMENT '难度分布',
    `discrimination_level` text        DEFAULT NULL COMMENT '区分度分布',
    `range_level`          text        DEFAULT NULL COMMENT '高低分段统计',
    `coefficient`          double      DEFAULT NULL COMMENT '差异系数',
    `difficulty`           double      DEFAULT NULL COMMENT '难度',
    `discrimination`       double      DEFAULT NULL COMMENT '区分度',
    `full_count`           int(11)     DEFAULT NULL COMMENT '满分人数',
    `question_count`       int(11)     DEFAULT NULL COMMENT '题目数量',
    `stdev`                double      DEFAULT NULL COMMENT '方差',
    `total_score`          double      DEFAULT NULL COMMENT '满分',
    `zero_count`           int(11)     DEFAULT NULL COMMENT '零分数量',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='科目统计表';


# Dump of table s_basic_subject_class
# ------------------------------------------------------------

DROP TABLE IF EXISTS `s_basic_subject_class`;
CREATE TABLE `s_basic_subject_class`
(
    `id`                   int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`              int(11)     DEFAULT NULL COMMENT '考试ID',
    `subject_code`         varchar(32) DEFAULT NULL COMMENT '科目代码',
    `subject_name`         varchar(32) DEFAULT NULL COMMENT '科目名称',
    `class_name`           varchar(64) DEFAULT NULL COMMENT '机组名称',
    `excellent_count`      int(11)     DEFAULT NULL COMMENT '优秀人数',
    `excellent_rate`       double      DEFAULT NULL COMMENT '优秀率',
    `pass_count`           int(11)     DEFAULT NULL COMMENT '及格人数',
    `pass_rate`            double      DEFAULT NULL COMMENT '及格率',
    `max_score`            double      DEFAULT NULL COMMENT '最高分',
    `min_score`            double      DEFAULT NULL COMMENT '最低分',
    `avg_score`            double      DEFAULT NULL COMMENT '平均分',
    `coefficient`          double      DEFAULT NULL COMMENT '差异系数',
    `difficulty`           double      DEFAULT NULL COMMENT '难度',
    `score_range`          text        DEFAULT NULL COMMENT '分数分布',
    `stdev`                double      DEFAULT NULL COMMENT '方差',
    `difficulity_level`    text        DEFAULT NULL COMMENT '难度分布',
    `discrimination_level` text        DEFAULT NULL COMMENT '区分度分布',
    `range_level`          text        DEFAULT NULL COMMENT '高低分分布',
	`total_count`      	   int(11)     DEFAULT NULL COMMENT '报考人数',
    `reality_count`        int(11)     DEFAULT NULL COMMENT '有效人数',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='机组统计表';


# Dump of table s_basic_subject_college
# ------------------------------------------------------------

DROP TABLE IF EXISTS `s_basic_subject_college`;
CREATE TABLE `s_basic_subject_college`
(
    `id`              int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`         int(11)     DEFAULT NULL COMMENT '考试ID',
    `subject_code`    varchar(32) DEFAULT NULL COMMENT '科目代码',
    `subject_name`    varchar(32) DEFAULT NULL COMMENT '科目名称',
    `college_name`    varchar(64) DEFAULT NULL COMMENT '电厂名称',
	`total_count`      	 int(11)     DEFAULT NULL COMMENT '报考人数',    
    `reality_count`      int(11)     DEFAULT NULL COMMENT '有效人数',
    `excellent_count` int(11)     DEFAULT NULL COMMENT '优秀人数',
    `excellent_rate`  double      DEFAULT NULL COMMENT '优秀率',
    `pass_count`      int(11)     DEFAULT NULL COMMENT '及格人数',
    `pass_rate`       double      DEFAULT NULL COMMENT '及格率',
    `max_score`       double      DEFAULT NULL COMMENT '最高分',
    `min_score`       double      DEFAULT NULL COMMENT '最低分',
    `avg_score`       double      DEFAULT NULL COMMENT '平均分',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='电厂统计表';


# Dump of table s_basic_subject_teacher
# ------------------------------------------------------------

DROP TABLE IF EXISTS `s_basic_subject_teacher`;
CREATE TABLE `s_basic_subject_teacher`
(
    `id`                 int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`            int(11)     DEFAULT NULL COMMENT '考试ID',
    `subject_code`       varchar(32) DEFAULT NULL COMMENT '科目代码',
    `subject_name`       varchar(32) DEFAULT NULL COMMENT '科目名称',
    `teacher_name`       varchar(64) DEFAULT NULL COMMENT '老师',
    `excellent_count`    int(11)     DEFAULT NULL COMMENT '优秀人数',
    `excellent_rate`     double      DEFAULT NULL COMMENT '优秀率',
    `pass_count`         int(11)     DEFAULT NULL COMMENT '及格人数',
    `pass_rate`          double      DEFAULT NULL COMMENT '及格率',
    `max_score`          double      DEFAULT NULL COMMENT '最高分',
    `min_score`          double      DEFAULT NULL COMMENT '最低分',
    `avg_score`          double      DEFAULT NULL COMMENT '平均分',
    `total_count`      	 int(11)     DEFAULT NULL COMMENT '报考人数',    
    `reality_count`      int(11)     DEFAULT NULL COMMENT '有效人数',
    `relative_avg_score` double      DEFAULT NULL COMMENT '平均相对分',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='老师统计表';


# Dump of table s_basic_subject_teacher_class
# ------------------------------------------------------------

DROP TABLE IF EXISTS `s_basic_subject_teacher_class`;
CREATE TABLE `s_basic_subject_teacher_class`
(
    `id`                 int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`            int(11)     DEFAULT NULL COMMENT '考试ID',
    `subject_code`       varchar(32) DEFAULT NULL COMMENT '科目代码',
    `subject_name`       varchar(32) DEFAULT NULL COMMENT '科目名称',
    `teacher_name`       varchar(64) DEFAULT NULL COMMENT '老师',
    `class_name`         varchar(64) DEFAULT NULL COMMENT '机组名称',
    `excellent_count`    int(11)     DEFAULT NULL COMMENT '优秀人数',
    `excellent_rate`     double      DEFAULT NULL COMMENT '优秀率',
    `pass_count`         int(11)     DEFAULT NULL COMMENT '及格人数',
    `pass_rate`          double      DEFAULT NULL COMMENT '及格率',
    `max_score`          double      DEFAULT NULL COMMENT '最高分',
    `min_score`          double      DEFAULT NULL COMMENT '最低分',
    `avg_score`          double      DEFAULT NULL COMMENT '平均分',
    `reality_count`      int(11)     DEFAULT NULL COMMENT '有效人数',
    `relative_avg_score` double      DEFAULT NULL COMMENT '平均相对分',
    PRIMARY KEY (`id`),
    KEY `index1` (`exam_id`, `subject_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='老师机组统计表';
  

# Dump of table eb_import_query
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_import_query`;

CREATE TABLE `eb_import_query` 
(
  `id` 			int(11) 	NOT NULL AUTO_INCREMENT COMMENT '主键',
  `create_time` datetime    NOT NULL COMMENT '创建时间',
  `description` text 		DEFAULT NULL COMMENT '描述',
  `exam_id` 	int(11) 	NOT NULL COMMENT '考试ID',
  `type` 		varchar(16) NOT NULL COMMENT '类型',
  `user_id` 	int(11)  	NOT NULL COMMENT '用户ID',
  PRIMARY KEY (`id`),
  KEY `index1` (`exam_id`, `user_id`, `type`)
)  ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='导入查询表';
  
  
# Dump of table eb_answer_card
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_answer_card`;

CREATE TABLE `eb_answer_card` 
(
    `exam_id`			int(11)     NOT NULL COMMENT '考试ID',
    `code`				varchar(64) DEFAULT NULL COMMENT '混扫代码',
    `number`			int(11)     NOT NULL COMMENT '序号',
  	`need_adapte`		tinyint(1)  DEFAULT NULL COMMENT '强制适配',
  	`paper_count`		int(11) 	DEFAULT NULL COMMENT '试卷数量',
	`single_page`		tinyint(1)	DEFAULT NULL COMMENT '单页模式',
	`source`			varchar(16) NOT NULL COMMENT '来源',
	`md5`				varchar(255) DEFAULT NULL COMMENT '文件md5',
	`dpi`				int(11) 	 DEFAULT NULL COMMENT 'dpi',
	`slice_config` 		text 		 DEFAULT NULL COMMENT '裁切配置',
	`parameter`			varchar(255) DEFAULT NULL COMMENT '其他属性',
	`remark`			varchar(255) DEFAULT NULL COMMENT '备注',
    `update_time`  		datetime     DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`exam_id`,`number`)
)  ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='题卡卡格式表';

DROP TABLE IF EXISTS `eb_score_verify`;  
CREATE TABLE `eb_score_verify` 
(
	`id`			int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`		int(11)     NOT NULL COMMENT '考试ID',
  	`user_id`		int(11) 	NOT NULL COMMENT '操作人ID',
    `student_id`	int(11)     NOT NULL COMMENT '考生ID',
  	`flagged`		tinyint(1)  NOT NULL DEFAULT 0 COMMENT '是否被标记',
  	`viewed`		tinyint(1)  NOT NULL DEFAULT 0 COMMENT '是否被查看',
  	`create_time`	datetime    NOT NULL COMMENT '创建时间',
  	`verify_time`	datetime    DEFAULT NULL COMMENT '校验时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `index1` (`exam_id`,`user_id`,`student_id`)
)  ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='成绩校验';

  
# Dump of table eb_answer_card_subject
# ------------------------------------------------------------

DROP TABLE IF EXISTS `eb_answer_card_subject`;
CREATE TABLE `eb_answer_card_subject` 
(
	`id`           		int(11)     	NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`			int(11)     	NOT NULL COMMENT '考试ID',
    `card_number`		int(11)     	NOT NULL COMMENT '卡格式号',
  	`subject_code`		varchar(128)	NOT NULL COMMENT '科目代码',
  PRIMARY KEY (`id`),
  UNIQUE KEY `index1` (`exam_id`,`card_number`,`subject_code`)
)  ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='卡格式科目关联关系';
  
DROP TABLE IF EXISTS `eb_user_student`;
CREATE TABLE `eb_user_student`
(
    `id`			int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `user_id`		int(11)     NOT NULL COMMENT '用户ID',
    `exam_number` 	varchar(64)	NOT NULL COMMENT '考生ID',
    PRIMARY KEY (`id`),
    UNIQUE KEY `index1` (`user_id`, `exam_number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='用户考生关联表';
  
DROP TABLE IF EXISTS `b_role_info`;
CREATE TABLE `b_role_info`
(
    `id`             int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
    `school_id` 	 int(11)	 NOT NULL COMMENT '学校ID',
    `code`           varchar(64) NOT NULL COMMENT '角色CODE',
    `name`           varchar(64) NOT NULL COMMENT '名称',
    `seq`            int(11)     NOT NULL COMMENT '排序',
    `updater_id` 	 int(11)	 DEFAULT NULL COMMENT '更新人ID',
    `update_time`	 datetime    DEFAULT NULL COMMENT '更新时间', 
    PRIMARY KEY (`id`),
    UNIQUE KEY `IDX_ROLE_INFO_01` (`school_id`,`code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='角色表';
  
DROP TABLE IF EXISTS `b_privilege`;
CREATE TABLE `b_privilege`
(
    `id`             int(11)		NOT NULL AUTO_INCREMENT COMMENT '主键',
    `code`           varchar(64)	NOT NULL COMMENT '权限CODE',
    `name`           varchar(64)	NOT NULL COMMENT '名称',
    `parent_code`    varchar(64)	NOT NULL COMMENT '父权限CODE',
    `privilege_type` varchar(64)	NOT NULL COMMENT '类型',
    `privilege_uri`  varchar(64)	DEFAULT NULL COMMENT 'URI',
    `seq`            int(11)		NOT NULL COMMENT '排序',
    `level`          int(11)		NOT NULL COMMENT '树结构层级',
    `icon` 			 varchar(64)	DEFAULT NULL COMMENT '图表',
    `i18n` 			 varchar(64)	DEFAULT NULL COMMENT '国际化',
    PRIMARY KEY (`id`),
    UNIQUE KEY `IDX_PRIVILEGE_01` (`code`),
    KEY `IDX_PRIVILEGE_02` (`parent_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='权限表';


DROP TABLE IF EXISTS `b_role_privilege`;
CREATE TABLE `b_role_privilege`
(
	`id`				int(11)     NOT NULL AUTO_INCREMENT COMMENT '主键',
	`school_id` 		int(11) 	NOT NULL COMMENT '学校ID',
    `role_code`			varchar(64) NOT NULL COMMENT '角色CODE',
    `privilege_code`	varchar(64)	NOT NULL COMMENT '权限CODE',
    `enable`       		tinyint(1)	NOT NULL COMMENT '启用禁用',
    PRIMARY KEY (`id`),
    UNIQUE KEY `IDX_ROLE_PRIVILEGE_01`(`school_id`,`role_code`, `privilege_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='角色权限关联表';

LOCK TABLES `b_privilege` WRITE;  
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('user_list', '用户管理', 'root_code', 'MENU', '/admin/user/list', 10,1,'icon-user','index.user');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_list', '考试管理', 'root_code', 'MENU', '/admin/exam/list', 20,1,'icon-th-list','index.exam');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_student', '考生管理', 'root_code', 'MENU', '/admin/exam/student', 30,1,'icon-user','index.student');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_paper', '科目管理', 'root_code', 'MENU', '/admin/exam/paper', 40,1,'icon-book','index.paper');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_scan', '扫描进度', 'root_code', 'MENU', '/admin/exam/scan', 50,1,'icon-print','index.scan');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_mark', '评卷管理', 'root_code', 'MENU', '/admin/basic/role/info/sub/page', 60,1,'icon-pencil','index.mark');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_mark-mark', '评卷进度', 'exam_mark', 'PAGE','/admin/exam/mark', 2,1);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_mark-group', '分组管理', 'exam_mark', 'PAGE','/admin/exam/group', 2,2);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_mark-group-add', '新增', 'exam_mark-group', 'BUTTON', 3,1);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_mark-group-edit', '修改', 'exam_mark-group', 'BUTTON', 3,2);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_mark-group-reset_edit', '重置修改', 'exam_mark-group', 'BUTTON', 3,3);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_mark-group-delete', '删除', 'exam_mark-group', 'BUTTON', 3,4);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_mark-marker', '评卷员管理', 'exam_mark', 'PAGE','/admin/exam/marker', 2,3);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_mark-marker-reset', '重置', 'exam_mark-marker', 'BUTTON', 3,1);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_mark-trial', '试评管理', 'exam_mark', 'PAGE','/admin/exam/trial', 2,4);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_mark-library', '任务管理', 'exam_mark', 'PAGE','/admin/exam/library', 2,5);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_mark-library-inspect', '复核', 'exam_mark-library', 'BUTTON', 3,1);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_mark-library-reject', '打回', 'exam_mark-library', 'BUTTON', 3,2);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_mark-arbitrate', '仲裁管理', 'exam_mark', 'PAGE','/admin/exam/arbitrate', 2,6);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_mark-quality', '质量监控', 'exam_mark', 'PAGE','/admin/exam/quality', 2,7);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_reject_list', '打回试卷', 'root_code', 'MENU', '/admin/basic/role/info/sub/page', 70,1,'icon-bookmark','index.reject');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_reject_list-paper', '打回卷', 'exam_reject_list', 'PAGE','/admin/exam/reject/list', 2,1);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_reject_list-history', '打回记录', 'exam_reject_list', 'PAGE','/admin/exam/reject/history', 2,2);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_problem_history', '问题试卷', 'root_code', 'MENU', '/admin/exam/problem/history', 80,1,'icon-tag','index.problem');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_problem_history-reset', '重置', 'exam_problem_history', 'BUTTON', 2,1);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_problem_history-batch_reset', '批量重置', 'exam_problem_history', 'BUTTON', 2,2);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_inspected_info', '成绩复核', 'root_code', 'MENU', '/admin/basic/role/info/sub/page', 90,1,'icon-flag','index.inspected');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_inspected_info-info', '成绩复核进度', 'exam_inspected_info', 'PAGE','/admin/exam/inspected/info', 2,1);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_inspected_info-list', '全卷复核', 'exam_inspected_info', 'PAGE','/admin/exam/inspected/list', 2,2);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_inspected_info-next_round', '再次复核', 'exam_inspected_info-list', 'BUTTON', 3,1);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`privilege_uri`,`level`, `seq`)
VALUES ('exam_inspected_info-score_verify', '成绩校验', 'exam_inspected_info', 'PAGE','/admin/exam/score/verify/init', 2,3);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_score', '成绩查询', 'root_code', 'MENU', '/admin/exam/score', 100,1,'icon-search','index.score');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`,`level`, `seq`)
VALUES ('exam_score-export', '导出', 'exam_score', 'BUTTON', 2,1);
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_report_subject', '总量分析', 'root_code', 'MENU', '/admin/exam/reportSubject', 110,1,'icon-signal','index.report.total');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_report_subject_range', '科目分析', 'root_code', 'MENU', '/admin/exam/reportSubjectRange', 120,1,'icon-asterisk','index.report.subject');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('exam_check_answer', '数据检查', 'root_code', 'MENU', '/admin/exam/check/answer', 130,1,'icon-check','index.check');
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
VALUES ('operation_log', '操作日志', 'root_code', 'MENU', '/admin/operation/log', 140,1,'icon-tasks','index.log');
UNLOCK TABLES;

