USE `cnbg_20240511_001`;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_chain_gateway
-- ----------------------------
DROP TABLE IF EXISTS `sys_chain_gateway`;
CREATE TABLE `sys_chain_gateway`
(
    `gateway_id`   BIGINT AUTO_INCREMENT COMMENT 'Id',
    `gateway_type` VARCHAR(32) NOT NULL COMMENT '网关类型',
    `rule_type`    VARCHAR(32) NOT NULL COMMENT '规则类型',
    `pre_node_id`  BIGINT      NULL COMMENT '上游节点',
    `next_node_id` BIGINT      NULL COMMENT '下游游节点',
    `del_flag`     VARCHAR(1)  NOT NULL DEFAULT '0' COMMENT '删除标记',
    `create_by`    VARCHAR(64) NOT NULL DEFAULT 'admin' COMMENT '创建人',
    `update_by`    VARCHAR(64) NOT NULL DEFAULT 'admin' COMMENT '修改人',
    `create_time`  DATETIME    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time`  DATETIME    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    PRIMARY KEY `pk_id` (`gateway_id`) USING BTREE
) ENGINE = InnoDB
    COMMENT ='审批链网关';


SET FOREIGN_KEY_CHECKS = 1;
