USE `cnbg`;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for wm_pkg_quiz_rel
-- ----------------------------
DROP TABLE IF EXISTS `wm_pkg_quiz_rel`;
CREATE TABLE `wm_pkg_quiz_rel`
(
    `rel_id`       INT AUTO_INCREMENT COMMENT 'Id',
    `pkg_id`       INT          NOT NULL COMMENT '积分包ID',
    `quiz_id`      INT COMMENT '试卷id',
    `quiz_title`   VARCHAR(64)  NOT NULL COMMENT '标题',
    `item_qty`     INT UNSIGNED NOT NULL COMMENT '试卷项数量',
    `total_mark`   INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '总分',
    `passing_mark` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '及格分',
    `quiz_items`   JSON COMMENT '试卷项',
    `avail`        TINYINT(1)   NOT NULL DEFAULT TRUE COMMENT '可视化',
    `create_time`  DATETIME     NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    PRIMARY KEY `pk_id` (`rel_id`) USING BTREE
) ENGINE = InnoDB
    COMMENT ='积分包试卷表';


SET FOREIGN_KEY_CHECKS = 1;
