USE teachcloud_db;

ALTER TABLE `mark_paper` ADD COLUMN `ai_mark` VARCHAR(12) NULL DEFAULT 'NONE' COMMENT 'AI评卷（NONE：不开启，AI_ONLY：仅AI评卷，MAN_MACHINE：人机双评）' AFTER `archive`;

ALTER TABLE `mark_question` ADD COLUMN `ai_mark` VARCHAR(12) NULL DEFAULT 'NONE' COMMENT 'AI评卷（NONE：不开启，AI_ONLY：仅AI评卷，MAN_MACHINE：人机双评）' AFTER `left_count`;

ALTER TABLE `mark_task` ADD COLUMN `ai_marked` TINYINT(1) NULL DEFAULT 0 COMMENT '是否AI评卷' AFTER `reject_reason`;

CREATE TABLE `mark_ocr_student_question` (
    `id` BIGINT(20) NOT NULL,
    `exam_id` BIGINT(20) NULL COMMENT '考试ID',
    `paper_number` VARCHAR(100) NULL COMMENT '试卷编号',
    `student_id` BIGINT(20) NULL COMMENT '考生ID',
    `question_id` BIGINT(20) NULL COMMENT '题目ID',
    `number` INT(1) NULL COMMENT '图片序号',
    `md5` VARCHAR(45) NULL COMMENT '图片md5',
    `ocr_content` MEDIUMTEXT NULL COMMENT 'ocr识别内容',
    `create_time` BIGINT(20) NULL COMMENT '识别时间',
    PRIMARY KEY (`id`))
    COMMENT = '考生主观题小题OCR识别结果';
