-- ----------------------------
-- 学员与练习题关系表
-- ----------------------------
CREATE TABLE `train_exam`.`ex_exercise_answer`  (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键' ,
`bank_id` bigint(20) NOT NULL COMMENT '题库id',
`student_id` bigint(20) NOT NULL COMMENT '学员id',
`question_id` bigint(20) NOT NULL COMMENT '题目id',
`answer` varchar(20) NOT NULL COMMENT '答案',
`passed` tinyint NULL COMMENT '是否正确(0错误，1正确)',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`create_by` varchar(50) NULL DEFAULT NULL COMMENT '创建人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`update_by` varchar(50) NULL DEFAULT NULL COMMENT '更新人',
`remark` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NULL DEFAULT 0 COMMENT '乐观锁',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `question_student_id` (`student_id`,`question_id`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '学员与练习题关系表' ROW_FORMAT = DYNAMIC;
