USE `cnbg_20240511_001`;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for wm_role_sup_warn_rule
-- ----------------------------
DROP TABLE IF EXISTS `wm_role_sup_warn_rule`;
CREATE TABLE `wm_role_sup_warn_rule`
(
    `rule_id`     BIGINT UNSIGNED AUTO_INCREMENT     NOT NULL COMMENT '规则ID',
    `role_id`     BIGINT UNSIGNED                    NOT NULL COMMENT '角色ID',
    `warn_type`   VARCHAR(16)                        NOT NULL COMMENT '预警类型',
    `warn_logic`  VARCHAR(8)                         NOT NULL COMMENT '预警逻辑',
    `warn_val`    TINYINT(1)                         NOT NULL COMMENT '预警值',
    `warn_tmpl`   VARCHAR(255)                       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 NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
    PRIMARY KEY `pk_id` (`rule_id`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_general_ci
  ROW_FORMAT = DYNAMIC COMMENT ='角色预警规则';


-- ----------------------------
-- Records of wm_role_sup_warn_rule
-- ----------------------------
BEGIN;
COMMIT;


SET FOREIGN_KEY_CHECKS = 1;
