CREATE TABLE IF NOT EXISTS `sc_student`
(
    `id`                   bigint      NOT NULL AUTO_INCREMENT,
    `exam_id`              bigint      NOT NULL,
    `exam_number`          varchar(64) NOT NULL,
    `name`                 varchar(64) NOT NULL,
    `subject_code`         varchar(64) NOT NULL,
    `package_code`         varchar(64) DEFAULT NULL,
    `exam_site`            varchar(64) DEFAULT NULL,
    `exam_site_name`       varchar(64) DEFAULT NULL,
    `exam_room`            varchar(64) DEFAULT NULL,
    `seat_number`          varchar(16) DEFAULT NULL,
    `campus_name`          varchar(64) DEFAULT NULL,
    `campus_code`          varchar(64) DEFAULT NULL,
    `status`               varchar(16) NOT NULL,
    `omr_absent`           bit(1)      NOT NULL,
    `question_filled`      bit(1)      NOT NULL,
    `subjective_filled`    bit(1)      NOT NULL,
    `assigned`             bit(1)      NOT NULL,
    `absent_suspect`       bit(1)      NOT NULL,
    `incomplete`           bit(1)      NOT NULL,
    `card_number`          int         DEFAULT NULL,
    `device`               varchar(32) DEFAULT NULL,
    `paper_type`           varchar(16) NOT NULL,
    `exam_status`          varchar(32) DEFAULT NULL,
    `breach_code`          varchar(32) DEFAULT NULL,
    `file_upload_status`   varchar(16) DEFAULT NULL,
    `data_upload_status`   varchar(16) DEFAULT NULL,
    `check_mark`           bit(1)      NOT NULL,
    `assigned_check_count` int         DEFAULT NULL,
    `assigned_suspect`     bit(1)      NOT NULL,
    `creator_id`           bigint      DEFAULT NULL,
    `updater_id`           bigint      DEFAULT NULL,
    `create_time`          bigint      DEFAULT NULL,
    `update_time`          bigint      DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `exam_student_subject` (`exam_id`, `exam_number`, `subject_code`),
    KEY `exam_assigned` (`exam_id`, `assigned`, `assigned_check_count`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Table structure for sc_answer_card
-- ----------------------------
CREATE TABLE IF NOT EXISTS `sc_answer_card`
(
    `exam_id`      bigint       NOT NULL,
    `number`       int          NOT NULL,
    `code`         varchar(128) DEFAULT NULL,
    `paper_count`  int          NOT NULL,
    `path`         varchar(255) NOT NULL,
    `md5`          varchar(32)  NOT NULL,
    `source`       varchar(16)  NOT NULL,
    `need_adapte`  bit(1)       NOT NULL,
    `single_page`  bit(1)       NOT NULL,
    `slice_config` text         NOT NULL,
    `dpi`          int          DEFAULT NULL,
    `slice_name`   text         DEFAULT NULL,
    `parameter`    text         DEFAULT NULL,
    `remark`       varchar(255) DEFAULT NULL,
    `creator_id`   bigint       DEFAULT NULL,
    `updater_id`   bigint       DEFAULT NULL,
    `create_time`  bigint       DEFAULT NULL,
    `update_time`  bigint       DEFAULT NULL,
    PRIMARY KEY (`exam_id`, `number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Table structure for sc_exam
-- ----------------------------
CREATE TABLE IF NOT EXISTS `sc_exam`
(
    `id`                               bigint       NOT NULL AUTO_INCREMENT,
    `name`                             varchar(128) NOT NULL,
    `enable`                           bit(1)       NOT NULL,
    `mode`                             varchar(16)  NOT NULL,
    `scan_by_package`                  bit(1)       NOT NULL,
    `allow_unexist_paper`              bit(1)       NOT NULL,
    `answer_front_card_type`           int          NOT NULL,
    `enable_single_page_answer`        bit(1)       NOT NULL,
    `enable_upload`                    bit(1)       NOT NULL,
    `enable_sync_verify`               bit(1)       NOT NULL,
    `exam_number_fill_count`           int         DEFAULT NULL,
    `paper_type_barcode_content`       text        DEFAULT NULL,
    `absent_barcode_content`           varchar(16) DEFAULT NULL,
    `image_transfer_mode`              varchar(32) DEFAULT NULL,
    `image_check_ratio`                double      DEFAULT NULL,
    `image_check_order`                varchar(50) DEFAULT NULL,
    `scanner_assigned_max_count`       int         DEFAULT NULL,
    `scanner_assigned_verify_password` varchar(50) DEFAULT NULL,
    `year`                             int         DEFAULT NULL,
    `year_half`                        int         DEFAULT NULL,
    `scan_site` 					varchar(50) 	DEFAULT NULL,
    `data_sync_time`                   bigint      DEFAULT NULL,
    `card_sync_time`                   bigint      DEFAULT NULL,
    `creator_id`                       bigint      DEFAULT NULL,
    `updater_id`                       bigint      DEFAULT NULL,
    `create_time`                      bigint      DEFAULT NULL,
    `update_time`                      bigint      DEFAULT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Table structure for sc_exam_summary
-- ----------------------------
CREATE TABLE IF NOT EXISTS `sc_exam_summary`
(
    `id`                          bigint  NOT NULL,
    `student_count`               int(11) NOT NULL,
    `subject_count`               int(11) NOT NULL,
    `batch_count`                 int(11) NOT NULL,
    `answer_scanned_count`        int(11) NOT NULL,
    `answer_unexist_count`        int(11) NOT NULL,
    `answer_manual_absent_count`  int(11) NOT NULL,
    `answer_omr_absent_count`     int(11) NOT NULL,
    `answer_absent_suspect_count` int(11) NOT NULL,
    `answer_incomplete_count`     int(11) NOT NULL,
    `answer_assigned_count`       int(11) NOT NULL,
    `answer_mismatch_count`       int(11) NOT NULL,
    `answer_batch_count`          int(11) NOT NULL,
    `package_total_count`         int(11) NOT NULL,
    `package_scanned_count`       int(11) NOT NULL,
    `student_answer_count`        int(11) NOT NULL,
    `upload_progress`             double  NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Table structure for sc_omr_task
-- ----------------------------
CREATE TABLE IF NOT EXISTS `sc_omr_task`
(
    `id`           bigint      NOT NULL AUTO_INCREMENT,
    `exam_id`      bigint      NOT NULL,
    `group_id`     bigint      NOT NULL,
    `student_id`   bigint      NOT NULL,
    `paper_number` int         NOT NULL,
    `paper_id`     int         NOT NULL,
    `card_number`  int         NOT NULL,
    `status`       varchar(16) NOT NULL,
    `device`       varchar(64) DEFAULT NULL,
    `pages`        text        NOT NULL,
    `creator_id`   bigint      DEFAULT NULL,
    `updater_id`   bigint      DEFAULT NULL,
    `create_time`  bigint      DEFAULT NULL,
    `update_time`  bigint      DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `group_paper` (`group_id`, `paper_id`),
    KEY `exam_status` (`exam_id`, `status`, `student_id`),
    KEY `group_student` (`group_id`, `student_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Table structure for sc_package_card
-- ----------------------------
CREATE TABLE IF NOT EXISTS `sc_package_card`
(
    `id`          bigint       NOT NULL AUTO_INCREMENT,
    `exam_id`     bigint       NOT NULL,
    `path`        varchar(255) NOT NULL,
    `md5`         varchar(32)  NOT NULL,
    `source`      varchar(16)  NOT NULL,
    `creator_id`  bigint DEFAULT NULL,
    `updater_id`  bigint DEFAULT NULL,
    `create_time` bigint DEFAULT NULL,
    `update_time` bigint DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `exam` (`exam_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Table structure for sc_package_task
-- ----------------------------
CREATE TABLE IF NOT EXISTS `sc_package_task`
(
    `id`           bigint      NOT NULL AUTO_INCREMENT,
    `exam_id`      bigint      NOT NULL,
    `package_code` varchar(64) NOT NULL,
    `status`       varchar(16) NOT NULL,
    `device`       varchar(64) NOT NULL,
    `creator_id`   bigint DEFAULT NULL,
    `updater_id`   bigint DEFAULT NULL,
    `create_time`  bigint DEFAULT NULL,
    `update_time`  bigint DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `exam_package` (`exam_id`, `package_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Table structure for sc_scanner
-- ----------------------------
CREATE TABLE IF NOT EXISTS `sc_scanner`
(
    `device`          varchar(64)  NOT NULL,
    `device_name`     varchar(200) NOT NULL,
    `last_login_time` bigint       NOT NULL,
    `create_time`     bigint DEFAULT NULL,
    `update_time`     bigint DEFAULT NULL,
    PRIMARY KEY (`device`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Table structure for ss_system_config
-- ----------------------------
CREATE TABLE IF NOT EXISTS `sc_system_config`
(
    `id`                   bigint      NOT NULL AUTO_INCREMENT,
    `scanner_enable_login` bit(1)      NOT NULL,
    `scanner_password`     varchar(16) NOT NULL,
    `client_version`       varchar(16)  DEFAULT NULL,
    `client_uri`           varchar(255) DEFAULT NULL,
    `client_md5`           varchar(32)  DEFAULT NULL,
    `client_update_time`   bigint       DEFAULT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_package_result`
(
    `exam_id`      bigint      NOT NULL,
    `package_code` varchar(64) NOT NULL,
    `device`       varchar(64) NOT NULL,
    `path`         text        NOT NULL,
    `assigned`     bit(1)      NOT NULL,
    `creator_id`   bigint DEFAULT NULL,
    `updater_id`   bigint DEFAULT NULL,
    `create_time`  bigint DEFAULT NULL,
    `update_time`  bigint DEFAULT NULL,
    `upload_time`  bigint DEFAULT NULL,
    PRIMARY KEY (`exam_id`, `package_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_scanner_card`
(
    `exam_id`     bigint      NOT NULL,
    `device`      varchar(64) NOT NULL,
    `card_number` int         NOT NULL,
    `creator_id`  bigint DEFAULT NULL,
    `updater_id`  bigint DEFAULT NULL,
    `create_time` bigint DEFAULT NULL,
    `update_time` bigint DEFAULT NULL,
    PRIMARY KEY (`exam_id`, `device`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_batch`
(
    `id`                  bigint      NOT NULL AUTO_INCREMENT,
    `exam_id`             bigint      NOT NULL,
    `device`              varchar(64) NOT NULL,
    `package_code`        varchar(64) DEFAULT NULL,
    `subject_code`        varchar(64) DEFAULT NULL,
    `scan_count`          int         NOT NULL,
    `assigned_count`      int         NOT NULL,
    `status`              varchar(16) NOT NULL,
    `verify_status`       varchar(16) DEFAULT NULL,
    `check_status`        varchar(16) DEFAULT NULL,
    `check_image_user_id` bigint      DEFAULT NULL,
    `check_image_time`    bigint      DEFAULT NULL,
    `creator_id`          bigint      DEFAULT NULL,
    `updater_id`          bigint      DEFAULT NULL,
    `create_time`         bigint      DEFAULT NULL,
    `update_time`         bigint      DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `exam_verify_status` (`exam_id`, `verify_status`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_batch_paper`
(
    `batch_id`     bigint(20) NOT NULL,
    `student_id`   bigint(20) NOT NULL,
    `paper_number` int(11)    NOT NULL,
    `paper_id`     bigint(20) NOT NULL,
    `card_number`  int(11)    NOT NULL,
    `assigned`     bit(1)     NOT NULL,
    `need_check`   bit(1)     NOT NULL,
    `creator_id`   bigint DEFAULT NULL,
    `updater_id`   bigint DEFAULT NULL,
    `create_time`  bigint DEFAULT NULL,
    `update_time`  bigint DEFAULT NULL,
    PRIMARY KEY (`batch_id`, `student_id`, `paper_number`),
    UNIQUE KEY `paper_id` (`paper_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_paper`
(
    `id`                bigint       NOT NULL AUTO_INCREMENT,
    `exam_id`           bigint       NOT NULL,
    `card_number`       int          NOT NULL,
    `number`            int          NOT NULL,
    `page_count`        int          NOT NULL,
    `mismatch`          bit(1)       NOT NULL,
    `assigned`          bit(1)       NOT NULL,
    `assigned_suspect`  bit(1)       NOT NULL,
    `question_filled`   bit(1)       NOT NULL,
    `subjective_filled` bit(1)       NOT NULL,
    `omr_exam_number`   varchar(255) NOT NULL,
    `creator_id`        bigint DEFAULT NULL,
    `updater_id`        bigint DEFAULT NULL,
    `create_time`       bigint DEFAULT NULL,
    `update_time`       bigint DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `mismatch` (`exam_id`, `mismatch`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_paper_page`
(
    `paper_id`    bigint       NOT NULL,
    `page_index`  int          NOT NULL,
    `absent`      text     DEFAULT NULL,
    `breach`      text     DEFAULT NULL,
    `paper_type`  text     DEFAULT NULL,
    `question`    text     DEFAULT NULL,
    `selective`   text     DEFAULT NULL,
    `sheet_path`  varchar(255) NOT NULL,
    `slice_path`  text     DEFAULT NULL,
    `recog_data`  longtext DEFAULT NULL,
    `creator_id`  bigint   DEFAULT NULL,
    `updater_id`  bigint   DEFAULT NULL,
    `create_time` bigint   DEFAULT NULL,
    `update_time` bigint   DEFAULT NULL,
    PRIMARY KEY (`paper_id`, `page_index`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_paper_structure`
(
    `id`              bigint      NOT NULL AUTO_INCREMENT,
    `exam_id`         bigint      NOT NULL,
    `card_number`     int         NOT NULL,
    `paper_number`    int         NOT NULL,
    `page_index`      int         NOT NULL,
    `field`           varchar(16) NOT NULL,
    `question_number` int         NOT NULL,
    `single`          bit(1)      NOT NULL,
    `creator_id`      bigint DEFAULT NULL,
    `updater_id`      bigint DEFAULT NULL,
    `create_time`     bigint DEFAULT NULL,
    `update_time`     bigint DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `IDX_PAPER_STRUCTURE_001` (`exam_id`, `card_number`, `paper_number`, `page_index`, `field`,
                                          `question_number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_question`
(
    `id`           int(11)      NOT NULL AUTO_INCREMENT COMMENT '主键',
    `exam_id`      int(11)      NOT NULL COMMENT '考试ID',
    `subject_code` varchar(32)  NOT NULL COMMENT '科目代码',
    `paper_type`   varchar(8)   NOT NULL COMMENT '试卷类型',
    `objective`    tinyint(1)   NOT NULL COMMENT '是否客观题',
    `main_number`  int(11)      NOT NULL COMMENT '大题号',
    `sub_number`   varchar(32)  NOT NULL COMMENT '小题号',
    `main_title`   varchar(128) NOT NULL COMMENT '大题名称',
    `total_score`  double DEFAULT NULL COMMENT '满分',
    `creator_id`   bigint DEFAULT NULL,
    `updater_id`   bigint DEFAULT NULL,
    `create_time`  bigint DEFAULT NULL,
    `update_time`  bigint DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `index1` (`exam_id`, `subject_code`, `objective`, `paper_type`, `main_number`, `sub_number`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='小题信息表';


CREATE TABLE IF NOT EXISTS `sc_omr_group`
(
    `id`          bigint      NOT NULL AUTO_INCREMENT,
    `exam_id`     bigint      NOT NULL,
    `fixed`       bit(1)      NOT NULL,
    `stage`       varchar(16) NOT NULL,
    `conditions`  text        NOT NULL,
    `total_count` int         NOT NULL,
    `creator_id`  bigint DEFAULT NULL,
    `updater_id`  bigint DEFAULT NULL,
    `create_time` bigint DEFAULT NULL,
    `update_time` bigint DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `exam_fixed` (`exam_id`, `fixed`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;


CREATE TABLE IF NOT EXISTS `sc_refix_batch`
(
    `id`           bigint NOT NULL AUTO_INCREMENT,
    `exam_id`      bigint NOT NULL,
    `card_number`  int    NOT NULL,
    `conditions`   text   NOT NULL,
    `update_slice` bit(1) NOT NULL,
    `total_count`  int    NOT NULL,
    `sucess_count` int    NOT NULL,
    `finished`     bit(1) NOT NULL,
    `creator_id`   bigint DEFAULT NULL,
    `updater_id`   bigint DEFAULT NULL,
    `create_time`  bigint DEFAULT NULL,
    `update_time`  bigint DEFAULT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_student_paper`
(
    `student_id`   bigint NOT NULL,
    `paper_number` int    NOT NULL,
    `paper_id`     bigint NOT NULL,
    `create_time`  bigint DEFAULT NULL,
    `update_time`  bigint DEFAULT NULL,
    PRIMARY KEY (`student_id`, `paper_number`),
    UNIQUE KEY `paper_id` (`paper_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_subject`
(
    `exam_id`                    bigint      NOT NULL,
    `code`                       varchar(64) NOT NULL,
    `name`                       varchar(64) NOT NULL,
    `paper_type_barcode_content` text   DEFAULT NULL,
    `creator_id`                 bigint DEFAULT NULL,
    `updater_id`                 bigint DEFAULT NULL,
    `create_time`                bigint DEFAULT NULL,
    `update_time`                bigint DEFAULT NULL,
    PRIMARY KEY (`exam_id`, `code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_file_property`
(
    `path`        varchar(255) NOT NULL,
    `md5`         varchar(32)  NOT NULL,
    `exam_id`     bigint       NOT NULL,
    `file_size`   bigint       NOT NULL,
    `create_time` bigint DEFAULT NULL,
    `update_time` bigint DEFAULT NULL,
    PRIMARY KEY (`path`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_user`
(
    `id`          int(11)     NOT NULL AUTO_INCREMENT,
    `login_name`  varchar(64) NOT NULL,
    `name`        varchar(64) NOT NULL,
    `password`    varchar(64) NOT NULL,
    `role`        varchar(16) NOT NULL,
    `enable`      tinyint(1)  NOT NULL,
    `device`      varchar(64) DEFAULT NULL,
    `creator_id`  bigint      DEFAULT NULL,
    `updater_id`  bigint      DEFAULT NULL,
    `create_time` bigint      DEFAULT NULL,
    `update_time` bigint      DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `login_name` (`login_name`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_adapte_file`
(
    `exam_id`     bigint       NOT NULL,
    `card_number` int          NOT NULL,
    `role`        varchar(16)  NOT NULL,
    `device`      varchar(64)  NOT NULL,
    `uri`         varchar(255) NOT NULL,
    `md5`         varchar(32)  NOT NULL,
    `dpi`         int    DEFAULT NULL,
    `create_time` bigint DEFAULT NULL,
    `update_time` bigint DEFAULT NULL,
    PRIMARY KEY (`exam_id`, `card_number`, `role`, `device`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_student_answer_task`
(
    `id`          bigint      NOT NULL AUTO_INCREMENT,
    `exam_id`     bigint      NOT NULL,
    `group_id`    bigint      NOT NULL,
    `student_id`  bigint      NOT NULL,
    `status`      varchar(16) NOT NULL,
    `device`      varchar(64) DEFAULT NULL,
    `creator_id`  bigint      DEFAULT NULL,
    `updater_id`  bigint      DEFAULT NULL,
    `create_time` bigint      DEFAULT NULL,
    `update_time` bigint      DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `group_student` (`group_id`, `student_id`),
    KEY `exam_status` (`exam_id`, `student_id`, `status`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_student_answer_group`
(
    `id`          bigint NOT NULL AUTO_INCREMENT,
    `exam_id`     bigint NOT NULL,
    `conditions`  text   NOT NULL,
    `total_count` int    NOT NULL,
    `creator_id`  bigint DEFAULT NULL,
    `updater_id`  bigint DEFAULT NULL,
    `create_time` bigint DEFAULT NULL,
    `update_time` bigint DEFAULT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_answer_card_subject`
(
    `exam_id`      bigint      NOT NULL,
    `card_number`  int         NOT NULL,
    `subject_code` varchar(64) NOT NULL,
    `create_time`  bigint DEFAULT NULL,
    `update_time`  bigint DEFAULT NULL,
    PRIMARY KEY (`exam_id`, `card_number`, `subject_code`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

-- ----------------------------
-- Table structure for sc_assigned_check_history
-- ----------------------------
CREATE TABLE IF NOT EXISTS `sc_assigned_check_history`
(
    `id`          bigint NOT NULL AUTO_INCREMENT,
    `exam_id`     bigint NOT NULL,
    `student_id`  bigint NOT NULL,
    `user_id`     bigint NOT NULL,
    `creator_id`  bigint DEFAULT NULL,
    `updater_id`  bigint DEFAULT NULL,
    `create_time` bigint DEFAULT NULL,
    `update_time` bigint DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `student_user` (`student_id`, `user_id`),
    KEY `student` (`student_id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE IF NOT EXISTS `sc_mark_site`
(
    `id`           bigint       NOT NULL AUTO_INCREMENT,
    `exam_id`      bigint       NOT NULL,
    `subject_code` varchar(100) NOT NULL,
    `paper_type`   varchar(100) NOT NULL,
    `odd_number`   varchar(100) NOT NULL,
    `even_number`  varchar(100) NOT NULL,
    `creator_id`   bigint DEFAULT NULL,
    `updater_id`   bigint DEFAULT NULL,
    `create_time`  bigint DEFAULT NULL,
    `update_time`  bigint DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `exam_subject_paper` (`exam_id`, `subject_code`, `paper_type`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;