USE `cnbg_20240511_001`;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for wm_task_sup
-- ----------------------------
DROP TABLE IF EXISTS `wm_task_sup`;
CREATE TABLE `wm_task_sup`
(
    `sup_id`      BIGINT UNSIGNED AUTO_INCREMENT                                 NOT NULL COMMENT '监督记录ID',
    `task_id`     BIGINT UNSIGNED                                                NOT NULL COMMENT '任务ID',
    `pkg_id`      BIGINT UNSIGNED                                                NOT NULL COMMENT '执行包ID',
    `sup_res`     TINYINT(1)                                                     NOT NULL COMMENT '监督意见',
    `sup_state`   VARCHAR(32)                                                    NOT NULL COMMENT '监察状态',
    `modifiable`  TINYINT(1)                                                     NOT NULL COMMENT '是否可以编辑',
    `role_id`     INT                                                            NOT NULL COMMENT '角色ID',
    `remarks`     VARCHAR(512)                                                   NOT NULL COMMENT '备注',
    `create_by`   VARCHAR(32)                                                    NOT NULL COMMENT '创建人',
    `update_by`   VARCHAR(32)                                                    NOT NULL COMMENT '更新人',
    `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP                             NOT NULL COMMENT '创建时间',
    `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL COMMENT '更新时间',
    PRIMARY KEY `pk_id` (`sup_id`) USING BTREE,
    KEY `idx_pid` (`task_id`) USING BTREE,
    KEY `idx_rid` (`role_id`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_general_ci
  ROW_FORMAT = DYNAMIC COMMENT ='服务任务监督记录';


-- ----------------------------
-- Records of wm_task_sup
-- ----------------------------
BEGIN;
COMMIT;


SET FOREIGN_KEY_CHECKS = 1;
