USE `cnbg_20240511_001`;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_chain_node
-- ----------------------------
DROP TABLE IF EXISTS `sys_chain_node`;
CREATE TABLE `sys_chain_node`
(
    `node_id`      BIGINT AUTO_INCREMENT COMMENT 'Id',
    `node_name`    VARCHAR(255) NOT NULL COMMENT '节点名称',
    `pre_node_id`  BIGINT       NULL COMMENT '上游节点',
    `next_node_id` BIGINT       NULL COMMENT '下游节点',
    `group_id`     BIGINT       NOT NULL DEFAULT 0 COMMENT '组别ID',
    `exec_role_id` BIGINT       NOT NULL COMMENT '执行角色',
    `dis_info`     VARCHAR(255) NOT 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` (`node_id`) USING BTREE
) ENGINE = InnoDB
    COMMENT ='审批链节点';


SET FOREIGN_KEY_CHECKS = 1;
