USE `hnqzx`;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for wm_user_plat_quiz_res
-- ----------------------------
DROP TABLE IF EXISTS `wm_user_plat_quiz_res`;
CREATE TABLE `wm_user_plat_quiz_res`
(
    `res_id`      INT AUTO_INCREMENT COMMENT 'Id',
    `user_id`     INT      NOT NULL COMMENT '用户ID',
    `quiz_id`     INT COMMENT '试卷id',
    `quiz_res`    JSON COMMENT '测试结果',
    `res_expiry`  DATE     NOT NULL COMMENT '测评有效期',
    `create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    PRIMARY KEY `pk_id` (`res_id`) USING BTREE,
    INDEX `idx_uid` (`user_id`) USING BTREE,
    INDEX `idx_qid` (`quiz_id`) USING BTREE
) ENGINE = InnoDB
    COMMENT ='用户测评的评判结果';


SET FOREIGN_KEY_CHECKS = 1;
