/*
 Navicat Premium Data Transfer

 Source Server         : hw-test
 Source Server Type    : MySQL
 Source Server Version : 80024
 Source Host           : localhost:3306
 Source Schema         : zzdemo-online-open

 Target Server Type    : MySQL
 Target Server Version : 80024
 File Encoding         : 65001

 Date: 05/07/2024 22:26:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for ACT_EVT_LOG
-- ----------------------------
DROP TABLE IF EXISTS `ACT_EVT_LOG`;
CREATE TABLE `ACT_EVT_LOG` (
  `LOG_NR_` bigint NOT NULL AUTO_INCREMENT,
  `TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TIME_STAMP_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DATA_` longblob,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  `IS_PROCESSED_` tinyint DEFAULT '0',
  PRIMARY KEY (`LOG_NR_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_GE_BYTEARRAY
-- ----------------------------
DROP TABLE IF EXISTS `ACT_GE_BYTEARRAY`;
CREATE TABLE `ACT_GE_BYTEARRAY` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `BYTES_` longblob,
  `GENERATED_` tinyint DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_FK_BYTEARR_DEPL` (`DEPLOYMENT_ID_`),
  CONSTRAINT `ACT_FK_BYTEARR_DEPL` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `ACT_RE_DEPLOYMENT` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_GE_PROPERTY
-- ----------------------------
DROP TABLE IF EXISTS `ACT_GE_PROPERTY`;
CREATE TABLE `ACT_GE_PROPERTY` (
  `NAME_` varchar(64) COLLATE utf8_bin NOT NULL,
  `VALUE_` varchar(300) COLLATE utf8_bin DEFAULT NULL,
  `REV_` int DEFAULT NULL,
  PRIMARY KEY (`NAME_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of ACT_GE_PROPERTY
-- ----------------------------
BEGIN;
INSERT INTO `ACT_GE_PROPERTY` VALUES ('batch.schema.version', '7.0.1.1', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('cfg.execution-related-entities-count', 'true', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('cfg.task-related-entities-count', 'true', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('common.schema.version', '7.0.1.1', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('entitylink.schema.version', '7.0.1.1', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('eventsubscription.schema.version', '7.0.1.1', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('identitylink.schema.version', '7.0.1.1', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('job.schema.version', '7.0.1.1', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('next.dbid', '1', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('schema.history', 'create(7.0.1.1)', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('schema.version', '7.0.1.1', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('task.schema.version', '7.0.1.1', 1);
INSERT INTO `ACT_GE_PROPERTY` VALUES ('variable.schema.version', '7.0.1.1', 1);
COMMIT;

-- ----------------------------
-- Table structure for ACT_HI_ACTINST
-- ----------------------------
DROP TABLE IF EXISTS `ACT_HI_ACTINST`;
CREATE TABLE `ACT_HI_ACTINST` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT '1',
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `ACT_ID_` varchar(255) COLLATE utf8_bin NOT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CALL_PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ACT_TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `TRANSACTION_ORDER_` int DEFAULT NULL,
  `DURATION_` bigint DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_ACT_INST_START` (`START_TIME_`),
  KEY `ACT_IDX_HI_ACT_INST_END` (`END_TIME_`),
  KEY `ACT_IDX_HI_ACT_INST_PROCINST` (`PROC_INST_ID_`,`ACT_ID_`),
  KEY `ACT_IDX_HI_ACT_INST_EXEC` (`EXECUTION_ID_`,`ACT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_HI_ATTACHMENT
-- ----------------------------
DROP TABLE IF EXISTS `ACT_HI_ATTACHMENT`;
CREATE TABLE `ACT_HI_ATTACHMENT` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `URL_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CONTENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_HI_COMMENT
-- ----------------------------
DROP TABLE IF EXISTS `ACT_HI_COMMENT`;
CREATE TABLE `ACT_HI_COMMENT` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TIME_` datetime(3) NOT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACTION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `MESSAGE_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `FULL_MSG_` longblob,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_HI_DETAIL
-- ----------------------------
DROP TABLE IF EXISTS `ACT_HI_DETAIL`;
CREATE TABLE `ACT_HI_DETAIL` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACT_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  `VAR_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REV_` int DEFAULT NULL,
  `TIME_` datetime(3) NOT NULL,
  `BYTEARRAY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint DEFAULT NULL,
  `TEXT_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_DETAIL_PROC_INST` (`PROC_INST_ID_`),
  KEY `ACT_IDX_HI_DETAIL_ACT_INST` (`ACT_INST_ID_`),
  KEY `ACT_IDX_HI_DETAIL_TIME` (`TIME_`),
  KEY `ACT_IDX_HI_DETAIL_NAME` (`NAME_`),
  KEY `ACT_IDX_HI_DETAIL_TASK_ID` (`TASK_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_HI_ENTITYLINK
-- ----------------------------
DROP TABLE IF EXISTS `ACT_HI_ENTITYLINK`;
CREATE TABLE `ACT_HI_ENTITYLINK` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `LINK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PARENT_ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ROOT_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ROOT_SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HIERARCHY_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_ENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`),
  KEY `ACT_IDX_HI_ENT_LNK_REF_SCOPE` (`REF_SCOPE_ID_`,`REF_SCOPE_TYPE_`,`LINK_TYPE_`),
  KEY `ACT_IDX_HI_ENT_LNK_ROOT_SCOPE` (`ROOT_SCOPE_ID_`,`ROOT_SCOPE_TYPE_`,`LINK_TYPE_`),
  KEY `ACT_IDX_HI_ENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_HI_IDENTITYLINK
-- ----------------------------
DROP TABLE IF EXISTS `ACT_HI_IDENTITYLINK`;
CREATE TABLE `ACT_HI_IDENTITYLINK` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `GROUP_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_IDENT_LNK_USER` (`USER_ID_`),
  KEY `ACT_IDX_HI_IDENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_IDENT_LNK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_IDENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_IDENT_LNK_TASK` (`TASK_ID_`),
  KEY `ACT_IDX_HI_IDENT_LNK_PROCINST` (`PROC_INST_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_HI_PROCINST
-- ----------------------------
DROP TABLE IF EXISTS `ACT_HI_PROCINST`;
CREATE TABLE `ACT_HI_PROCINST` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT '1',
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `BUSINESS_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint DEFAULT NULL,
  `START_USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `END_ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUPER_PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CALLBACK_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CALLBACK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REFERENCE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REFERENCE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROPAGATED_STAGE_INST_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `BUSINESS_STATUS_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `PROC_INST_ID_` (`PROC_INST_ID_`),
  KEY `ACT_IDX_HI_PRO_INST_END` (`END_TIME_`),
  KEY `ACT_IDX_HI_PRO_I_BUSKEY` (`BUSINESS_KEY_`),
  KEY `ACT_IDX_HI_PRO_SUPER_PROCINST` (`SUPER_PROCESS_INSTANCE_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_HI_TASKINST
-- ----------------------------
DROP TABLE IF EXISTS `ACT_HI_TASKINST`;
CREATE TABLE `ACT_HI_TASKINST` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT '1',
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_DEF_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROPAGATED_STAGE_INST_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `STATE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PARENT_TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `IN_PROGRESS_TIME_` datetime(3) DEFAULT NULL,
  `IN_PROGRESS_STARTED_BY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CLAIM_TIME_` datetime(3) DEFAULT NULL,
  `CLAIMED_BY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUSPENDED_TIME_` datetime(3) DEFAULT NULL,
  `SUSPENDED_BY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `COMPLETED_BY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DURATION_` bigint DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `PRIORITY_` int DEFAULT NULL,
  `IN_PROGRESS_DUE_DATE_` datetime(3) DEFAULT NULL,
  `DUE_DATE_` datetime(3) DEFAULT NULL,
  `FORM_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `LAST_UPDATED_TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_TASK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_TASK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_TASK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_TASK_INST_PROCINST` (`PROC_INST_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_HI_TSK_LOG
-- ----------------------------
DROP TABLE IF EXISTS `ACT_HI_TSK_LOG`;
CREATE TABLE `ACT_HI_TSK_LOG` (
  `ID_` bigint NOT NULL AUTO_INCREMENT,
  `TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `TIME_STAMP_` timestamp(3) NOT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DATA_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_HI_VARINST
-- ----------------------------
DROP TABLE IF EXISTS `ACT_HI_VARINST`;
CREATE TABLE `ACT_HI_VARINST` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT '1',
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  `VAR_TYPE_` varchar(100) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `BYTEARRAY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint DEFAULT NULL,
  `TEXT_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `META_INFO_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `LAST_UPDATED_TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_HI_PROCVAR_NAME_TYPE` (`NAME_`,`VAR_TYPE_`),
  KEY `ACT_IDX_HI_VAR_SCOPE_ID_TYPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_VAR_SUB_ID_TYPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_HI_PROCVAR_PROC_INST` (`PROC_INST_ID_`),
  KEY `ACT_IDX_HI_PROCVAR_TASK_ID` (`TASK_ID_`),
  KEY `ACT_IDX_HI_PROCVAR_EXE` (`EXECUTION_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_ID_BYTEARRAY
-- ----------------------------
DROP TABLE IF EXISTS `ACT_ID_BYTEARRAY`;
CREATE TABLE `ACT_ID_BYTEARRAY` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `BYTES_` longblob,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_ID_GROUP
-- ----------------------------
DROP TABLE IF EXISTS `ACT_ID_GROUP`;
CREATE TABLE `ACT_ID_GROUP` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_ID_INFO
-- ----------------------------
DROP TABLE IF EXISTS `ACT_ID_INFO`;
CREATE TABLE `ACT_ID_INFO` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `USER_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `VALUE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PASSWORD_` longblob,
  `PARENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_ID_MEMBERSHIP
-- ----------------------------
DROP TABLE IF EXISTS `ACT_ID_MEMBERSHIP`;
CREATE TABLE `ACT_ID_MEMBERSHIP` (
  `USER_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `GROUP_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`USER_ID_`,`GROUP_ID_`),
  KEY `ACT_FK_MEMB_GROUP` (`GROUP_ID_`),
  CONSTRAINT `ACT_FK_MEMB_GROUP` FOREIGN KEY (`GROUP_ID_`) REFERENCES `ACT_ID_GROUP` (`ID_`),
  CONSTRAINT `ACT_FK_MEMB_USER` FOREIGN KEY (`USER_ID_`) REFERENCES `ACT_ID_USER` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_ID_PRIV
-- ----------------------------
DROP TABLE IF EXISTS `ACT_ID_PRIV`;
CREATE TABLE `ACT_ID_PRIV` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_UNIQ_PRIV_NAME` (`NAME_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_ID_PRIV_MAPPING
-- ----------------------------
DROP TABLE IF EXISTS `ACT_ID_PRIV_MAPPING`;
CREATE TABLE `ACT_ID_PRIV_MAPPING` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `PRIV_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `GROUP_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_FK_PRIV_MAPPING` (`PRIV_ID_`),
  KEY `ACT_IDX_PRIV_USER` (`USER_ID_`),
  KEY `ACT_IDX_PRIV_GROUP` (`GROUP_ID_`),
  CONSTRAINT `ACT_FK_PRIV_MAPPING` FOREIGN KEY (`PRIV_ID_`) REFERENCES `ACT_ID_PRIV` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_ID_PROPERTY
-- ----------------------------
DROP TABLE IF EXISTS `ACT_ID_PROPERTY`;
CREATE TABLE `ACT_ID_PROPERTY` (
  `NAME_` varchar(64) COLLATE utf8_bin NOT NULL,
  `VALUE_` varchar(300) COLLATE utf8_bin DEFAULT NULL,
  `REV_` int DEFAULT NULL,
  PRIMARY KEY (`NAME_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of ACT_ID_PROPERTY
-- ----------------------------
BEGIN;
INSERT INTO `ACT_ID_PROPERTY` VALUES ('schema.version', '7.0.1.1', 1);
COMMIT;

-- ----------------------------
-- Table structure for ACT_ID_TOKEN
-- ----------------------------
DROP TABLE IF EXISTS `ACT_ID_TOKEN`;
CREATE TABLE `ACT_ID_TOKEN` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `TOKEN_VALUE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TOKEN_DATE_` timestamp(3) NULL DEFAULT NULL,
  `IP_ADDRESS_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `USER_AGENT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TOKEN_DATA_` varchar(2000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_ID_USER
-- ----------------------------
DROP TABLE IF EXISTS `ACT_ID_USER`;
CREATE TABLE `ACT_ID_USER` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `FIRST_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `LAST_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DISPLAY_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EMAIL_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PWD_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PICTURE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_PROCDEF_INFO
-- ----------------------------
DROP TABLE IF EXISTS `ACT_PROCDEF_INFO`;
CREATE TABLE `ACT_PROCDEF_INFO` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `INFO_JSON_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_UNIQ_INFO_PROCDEF` (`PROC_DEF_ID_`),
  KEY `ACT_IDX_INFO_PROCDEF` (`PROC_DEF_ID_`),
  KEY `ACT_FK_INFO_JSON_BA` (`INFO_JSON_ID_`),
  CONSTRAINT `ACT_FK_INFO_JSON_BA` FOREIGN KEY (`INFO_JSON_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_INFO_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RE_DEPLOYMENT
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RE_DEPLOYMENT`;
CREATE TABLE `ACT_RE_DEPLOYMENT` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `DEPLOY_TIME_` timestamp(3) NULL DEFAULT NULL,
  `DERIVED_FROM_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DERIVED_FROM_ROOT_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PARENT_DEPLOYMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ENGINE_VERSION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RE_MODEL
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RE_MODEL`;
CREATE TABLE `ACT_RE_MODEL` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LAST_UPDATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `VERSION_` int DEFAULT NULL,
  `META_INFO_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EDITOR_SOURCE_VALUE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EDITOR_SOURCE_EXTRA_VALUE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_FK_MODEL_SOURCE` (`EDITOR_SOURCE_VALUE_ID_`),
  KEY `ACT_FK_MODEL_SOURCE_EXTRA` (`EDITOR_SOURCE_EXTRA_VALUE_ID_`),
  KEY `ACT_FK_MODEL_DEPLOYMENT` (`DEPLOYMENT_ID_`),
  CONSTRAINT `ACT_FK_MODEL_DEPLOYMENT` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `ACT_RE_DEPLOYMENT` (`ID_`),
  CONSTRAINT `ACT_FK_MODEL_SOURCE` FOREIGN KEY (`EDITOR_SOURCE_VALUE_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_MODEL_SOURCE_EXTRA` FOREIGN KEY (`EDITOR_SOURCE_EXTRA_VALUE_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RE_PROCDEF
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RE_PROCDEF`;
CREATE TABLE `ACT_RE_PROCDEF` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) COLLATE utf8_bin NOT NULL,
  `VERSION_` int NOT NULL,
  `DEPLOYMENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DGRM_RESOURCE_NAME_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `HAS_START_FORM_KEY_` tinyint DEFAULT NULL,
  `HAS_GRAPHICAL_NOTATION_` tinyint DEFAULT NULL,
  `SUSPENSION_STATE_` int DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `ENGINE_VERSION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DERIVED_FROM_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DERIVED_FROM_ROOT_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DERIVED_VERSION_` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_UNIQ_PROCDEF` (`KEY_`,`VERSION_`,`DERIVED_VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_ACTINST
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_ACTINST`;
CREATE TABLE `ACT_RU_ACTINST` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT '1',
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `ACT_ID_` varchar(255) COLLATE utf8_bin NOT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CALL_PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ACT_TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint DEFAULT NULL,
  `TRANSACTION_ORDER_` int DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_RU_ACTI_START` (`START_TIME_`),
  KEY `ACT_IDX_RU_ACTI_END` (`END_TIME_`),
  KEY `ACT_IDX_RU_ACTI_PROC` (`PROC_INST_ID_`),
  KEY `ACT_IDX_RU_ACTI_PROC_ACT` (`PROC_INST_ID_`,`ACT_ID_`),
  KEY `ACT_IDX_RU_ACTI_EXEC` (`EXECUTION_ID_`),
  KEY `ACT_IDX_RU_ACTI_EXEC_ACT` (`EXECUTION_ID_`,`ACT_ID_`),
  KEY `ACT_IDX_RU_ACTI_TASK` (`TASK_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_DEADLETTER_JOB
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_DEADLETTER_JOB`;
CREATE TABLE `ACT_RU_DEADLETTER_JOB` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CORRELATION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  KEY `ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  KEY `ACT_IDX_DEADLETTER_JOB_CORRELATION_ID` (`CORRELATION_ID_`),
  KEY `ACT_IDX_DJOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_DJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_DJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_DEADLETTER_JOB_EXECUTION` (`EXECUTION_ID_`),
  KEY `ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  KEY `ACT_FK_DEADLETTER_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_ENTITYLINK
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_ENTITYLINK`;
CREATE TABLE `ACT_RU_ENTITYLINK` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `LINK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PARENT_ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ROOT_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ROOT_SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HIERARCHY_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_ENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`),
  KEY `ACT_IDX_ENT_LNK_REF_SCOPE` (`REF_SCOPE_ID_`,`REF_SCOPE_TYPE_`,`LINK_TYPE_`),
  KEY `ACT_IDX_ENT_LNK_ROOT_SCOPE` (`ROOT_SCOPE_ID_`,`ROOT_SCOPE_TYPE_`,`LINK_TYPE_`),
  KEY `ACT_IDX_ENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_EVENT_SUBSCR
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_EVENT_SUBSCR`;
CREATE TABLE `ACT_RU_EVENT_SUBSCR` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `EVENT_TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `EVENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACTIVITY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CONFIGURATION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CREATED_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_EVENT_SUBSCR_CONFIG_` (`CONFIGURATION_`),
  KEY `ACT_IDX_EVENT_SUBSCR_SCOPEREF_` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_EVENT_EXEC` (`EXECUTION_ID_`),
  CONSTRAINT `ACT_FK_EVENT_EXEC` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_EXECUTION
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_EXECUTION`;
CREATE TABLE `ACT_RU_EXECUTION` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `BUSINESS_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PARENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SUPER_EXEC_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ROOT_PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `IS_ACTIVE_` tinyint DEFAULT NULL,
  `IS_CONCURRENT_` tinyint DEFAULT NULL,
  `IS_SCOPE_` tinyint DEFAULT NULL,
  `IS_EVENT_SCOPE_` tinyint DEFAULT NULL,
  `IS_MI_ROOT_` tinyint DEFAULT NULL,
  `SUSPENSION_STATE_` int DEFAULT NULL,
  `CACHED_ENT_STATE_` int DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_TIME_` datetime(3) DEFAULT NULL,
  `START_USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `IS_COUNT_ENABLED_` tinyint DEFAULT NULL,
  `EVT_SUBSCR_COUNT_` int DEFAULT NULL,
  `TASK_COUNT_` int DEFAULT NULL,
  `JOB_COUNT_` int DEFAULT NULL,
  `TIMER_JOB_COUNT_` int DEFAULT NULL,
  `SUSP_JOB_COUNT_` int DEFAULT NULL,
  `DEADLETTER_JOB_COUNT_` int DEFAULT NULL,
  `EXTERNAL_WORKER_JOB_COUNT_` int DEFAULT NULL,
  `VAR_COUNT_` int DEFAULT NULL,
  `ID_LINK_COUNT_` int DEFAULT NULL,
  `CALLBACK_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CALLBACK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REFERENCE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REFERENCE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROPAGATED_STAGE_INST_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `BUSINESS_STATUS_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_EXEC_BUSKEY` (`BUSINESS_KEY_`),
  KEY `ACT_IDC_EXEC_ROOT` (`ROOT_PROC_INST_ID_`),
  KEY `ACT_IDX_EXEC_REF_ID_` (`REFERENCE_ID_`),
  KEY `ACT_FK_EXE_PROCINST` (`PROC_INST_ID_`),
  KEY `ACT_FK_EXE_PARENT` (`PARENT_ID_`),
  KEY `ACT_FK_EXE_SUPER` (`SUPER_EXEC_`),
  KEY `ACT_FK_EXE_PROCDEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_EXE_PARENT` FOREIGN KEY (`PARENT_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`) ON DELETE CASCADE,
  CONSTRAINT `ACT_FK_EXE_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`),
  CONSTRAINT `ACT_FK_EXE_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `ACT_FK_EXE_SUPER` FOREIGN KEY (`SUPER_EXEC_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_EXTERNAL_JOB
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_EXTERNAL_JOB`;
CREATE TABLE `ACT_RU_EXTERNAL_JOB` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CORRELATION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `RETRIES_` int DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_EXTERNAL_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  KEY `ACT_IDX_EXTERNAL_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  KEY `ACT_IDX_EXTERNAL_JOB_CORRELATION_ID` (`CORRELATION_ID_`),
  KEY `ACT_IDX_EJOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_EJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_EJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  CONSTRAINT `ACT_FK_EXTERNAL_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_EXTERNAL_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_HISTORY_JOB
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_HISTORY_JOB`;
CREATE TABLE `ACT_RU_HISTORY_JOB` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `RETRIES_` int DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ADV_HANDLER_CFG_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_IDENTITYLINK
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_IDENTITYLINK`;
CREATE TABLE `ACT_RU_IDENTITYLINK` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `GROUP_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_IDENT_LNK_USER` (`USER_ID_`),
  KEY `ACT_IDX_IDENT_LNK_GROUP` (`GROUP_ID_`),
  KEY `ACT_IDX_IDENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_IDENT_LNK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_IDENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_ATHRZ_PROCEDEF` (`PROC_DEF_ID_`),
  KEY `ACT_FK_TSKASS_TASK` (`TASK_ID_`),
  KEY `ACT_FK_IDL_PROCINST` (`PROC_INST_ID_`),
  CONSTRAINT `ACT_FK_ATHRZ_PROCEDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`),
  CONSTRAINT `ACT_FK_IDL_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  CONSTRAINT `ACT_FK_TSKASS_TASK` FOREIGN KEY (`TASK_ID_`) REFERENCES `ACT_RU_TASK` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_JOB
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_JOB`;
CREATE TABLE `ACT_RU_JOB` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CORRELATION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `RETRIES_` int DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  KEY `ACT_IDX_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  KEY `ACT_IDX_JOB_CORRELATION_ID` (`CORRELATION_ID_`),
  KEY `ACT_IDX_JOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_JOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_JOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_JOB_EXECUTION` (`EXECUTION_ID_`),
  KEY `ACT_FK_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  KEY `ACT_FK_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_SUSPENDED_JOB
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_SUSPENDED_JOB`;
CREATE TABLE `ACT_RU_SUSPENDED_JOB` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CORRELATION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `RETRIES_` int DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  KEY `ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  KEY `ACT_IDX_SUSPENDED_JOB_CORRELATION_ID` (`CORRELATION_ID_`),
  KEY `ACT_IDX_SJOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_SJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_SJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_SUSPENDED_JOB_EXECUTION` (`EXECUTION_ID_`),
  KEY `ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  KEY `ACT_FK_SUSPENDED_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_TASK
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_TASK`;
CREATE TABLE `ACT_RU_TASK` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROPAGATED_STAGE_INST_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `STATE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PARENT_TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TASK_DEF_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DELEGATION_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PRIORITY_` int DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `IN_PROGRESS_TIME_` datetime(3) DEFAULT NULL,
  `IN_PROGRESS_STARTED_BY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CLAIM_TIME_` datetime(3) DEFAULT NULL,
  `CLAIMED_BY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUSPENDED_TIME_` datetime(3) DEFAULT NULL,
  `SUSPENDED_BY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `IN_PROGRESS_DUE_DATE_` datetime(3) DEFAULT NULL,
  `DUE_DATE_` datetime(3) DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUSPENSION_STATE_` int DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `FORM_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `IS_COUNT_ENABLED_` tinyint DEFAULT NULL,
  `VAR_COUNT_` int DEFAULT NULL,
  `ID_LINK_COUNT_` int DEFAULT NULL,
  `SUB_TASK_COUNT_` int DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_TASK_CREATE` (`CREATE_TIME_`),
  KEY `ACT_IDX_TASK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_TASK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_TASK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_TASK_EXE` (`EXECUTION_ID_`),
  KEY `ACT_FK_TASK_PROCINST` (`PROC_INST_ID_`),
  KEY `ACT_FK_TASK_PROCDEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_TASK_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  CONSTRAINT `ACT_FK_TASK_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`),
  CONSTRAINT `ACT_FK_TASK_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_TIMER_JOB
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_TIMER_JOB`;
CREATE TABLE `ACT_RU_TIMER_JOB` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CORRELATION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `RETRIES_` int DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`),
  KEY `ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`),
  KEY `ACT_IDX_TIMER_JOB_CORRELATION_ID` (`CORRELATION_ID_`),
  KEY `ACT_IDX_TIMER_JOB_DUEDATE` (`DUEDATE_`),
  KEY `ACT_IDX_TJOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_TJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_TJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_TIMER_JOB_EXECUTION` (`EXECUTION_ID_`),
  KEY `ACT_FK_TIMER_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`),
  KEY `ACT_FK_TIMER_JOB_PROC_DEF` (`PROC_DEF_ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `ACT_RE_PROCDEF` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for ACT_RU_VARIABLE
-- ----------------------------
DROP TABLE IF EXISTS `ACT_RU_VARIABLE`;
CREATE TABLE `ACT_RU_VARIABLE` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `BYTEARRAY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint DEFAULT NULL,
  `TEXT_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `META_INFO_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  KEY `ACT_IDX_RU_VAR_SCOPE_ID_TYPE` (`SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_IDX_RU_VAR_SUB_ID_TYPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`),
  KEY `ACT_FK_VAR_BYTEARRAY` (`BYTEARRAY_ID_`),
  KEY `ACT_IDX_VARIABLE_TASK_ID` (`TASK_ID_`),
  KEY `ACT_FK_VAR_EXE` (`EXECUTION_ID_`),
  KEY `ACT_FK_VAR_PROCINST` (`PROC_INST_ID_`),
  CONSTRAINT `ACT_FK_VAR_BYTEARRAY` FOREIGN KEY (`BYTEARRAY_ID_`) REFERENCES `ACT_GE_BYTEARRAY` (`ID_`),
  CONSTRAINT `ACT_FK_VAR_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`),
  CONSTRAINT `ACT_FK_VAR_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for FLW_CHANNEL_DEFINITION
-- ----------------------------
DROP TABLE IF EXISTS `FLW_CHANNEL_DEFINITION`;
CREATE TABLE `FLW_CHANNEL_DEFINITION` (
  `ID_` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `VERSION_` int DEFAULT NULL,
  `KEY_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `IMPLEMENTATION_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_IDX_CHANNEL_DEF_UNIQ` (`KEY_`,`VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Table structure for FLW_EV_DATABASECHANGELOG
-- ----------------------------
DROP TABLE IF EXISTS `FLW_EV_DATABASECHANGELOG`;
CREATE TABLE `FLW_EV_DATABASECHANGELOG` (
  `ID` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  `AUTHOR` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  `FILENAME` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  `DATEEXECUTED` datetime NOT NULL,
  `ORDEREXECUTED` int NOT NULL,
  `EXECTYPE` varchar(10) COLLATE utf8mb4_bin NOT NULL,
  `MD5SUM` varchar(35) COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `COMMENTS` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `TAG` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `LIQUIBASE` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL,
  `CONTEXTS` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `LABELS` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID` varchar(10) COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of FLW_EV_DATABASECHANGELOG
-- ----------------------------
BEGIN;
INSERT INTO `FLW_EV_DATABASECHANGELOG` VALUES ('1', 'flowable', 'org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml', '2024-01-23 14:13:11', 1, 'EXECUTED', '8:1b0c48c9cf7945be799d868a2626d687', 'createTable tableName=FLW_EVENT_DEPLOYMENT; createTable tableName=FLW_EVENT_RESOURCE; createTable tableName=FLW_EVENT_DEFINITION; createIndex indexName=ACT_IDX_EVENT_DEF_UNIQ, tableName=FLW_EVENT_DEFINITION; createTable tableName=FLW_CHANNEL_DEFIN...', '', NULL, '4.20.0', NULL, NULL, '5990391167');
INSERT INTO `FLW_EV_DATABASECHANGELOG` VALUES ('2', 'flowable', 'org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml', '2024-01-23 14:13:11', 2, 'EXECUTED', '8:0ea825feb8e470558f0b5754352b9cda', 'addColumn tableName=FLW_CHANNEL_DEFINITION; addColumn tableName=FLW_CHANNEL_DEFINITION', '', NULL, '4.20.0', NULL, NULL, '5990391167');
INSERT INTO `FLW_EV_DATABASECHANGELOG` VALUES ('3', 'flowable', 'org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml', '2024-01-23 14:13:11', 3, 'EXECUTED', '8:3c2bb293350b5cbe6504331980c9dcee', 'customChange', '', NULL, '4.20.0', NULL, NULL, '5990391167');
COMMIT;

-- ----------------------------
-- Table structure for FLW_EV_DATABASECHANGELOGLOCK
-- ----------------------------
DROP TABLE IF EXISTS `FLW_EV_DATABASECHANGELOGLOCK`;
CREATE TABLE `FLW_EV_DATABASECHANGELOGLOCK` (
  `ID` int NOT NULL,
  `LOCKED` bit(1) NOT NULL,
  `LOCKGRANTED` datetime DEFAULT NULL,
  `LOCKEDBY` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of FLW_EV_DATABASECHANGELOGLOCK
-- ----------------------------
BEGIN;
INSERT INTO `FLW_EV_DATABASECHANGELOGLOCK` VALUES (1, b'0', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for FLW_EVENT_DEFINITION
-- ----------------------------
DROP TABLE IF EXISTS `FLW_EVENT_DEFINITION`;
CREATE TABLE `FLW_EVENT_DEFINITION` (
  `ID_` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `VERSION_` int DEFAULT NULL,
  `KEY_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_IDX_EVENT_DEF_UNIQ` (`KEY_`,`VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Table structure for FLW_EVENT_DEPLOYMENT
-- ----------------------------
DROP TABLE IF EXISTS `FLW_EVENT_DEPLOYMENT`;
CREATE TABLE `FLW_EVENT_DEPLOYMENT` (
  `ID_` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOY_TIME_` datetime(3) DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `PARENT_DEPLOYMENT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Table structure for FLW_EVENT_RESOURCE
-- ----------------------------
DROP TABLE IF EXISTS `FLW_EVENT_RESOURCE`;
CREATE TABLE `FLW_EVENT_RESOURCE` (
  `ID_` varchar(255) COLLATE utf8mb4_bin NOT NULL,
  `NAME_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `RESOURCE_BYTES_` longblob,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Table structure for FLW_RU_BATCH
-- ----------------------------
DROP TABLE IF EXISTS `FLW_RU_BATCH`;
CREATE TABLE `FLW_RU_BATCH` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `TYPE_` varchar(64) COLLATE utf8_bin NOT NULL,
  `SEARCH_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SEARCH_KEY2_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) NOT NULL,
  `COMPLETE_TIME_` datetime(3) DEFAULT NULL,
  `STATUS_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `BATCH_DOC_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for FLW_RU_BATCH_PART
-- ----------------------------
DROP TABLE IF EXISTS `FLW_RU_BATCH_PART`;
CREATE TABLE `FLW_RU_BATCH_PART` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int DEFAULT NULL,
  `BATCH_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(64) COLLATE utf8_bin NOT NULL,
  `SCOPE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SEARCH_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SEARCH_KEY2_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) NOT NULL,
  `COMPLETE_TIME_` datetime(3) DEFAULT NULL,
  `STATUS_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `RESULT_DOC_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`),
  KEY `FLW_IDX_BATCH_PART` (`BATCH_ID_`),
  CONSTRAINT `FLW_FK_BATCH_PART_PARENT` FOREIGN KEY (`BATCH_ID_`) REFERENCES `FLW_RU_BATCH` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for zz_flow_category
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_category`;
CREATE TABLE `zz_flow_category` (
  `category_id` bigint NOT NULL COMMENT '主键Id',
  `tenant_id` bigint DEFAULT NULL COMMENT '租户Id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '显示名称',
  `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分类编码',
  `show_order` int NOT NULL COMMENT '实现顺序',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  PRIMARY KEY (`category_id`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_code` (`code`) USING BTREE,
  KEY `idx_app_code` (`app_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程分类表';

-- ----------------------------
-- Records of zz_flow_category
-- ----------------------------
BEGIN;
INSERT INTO `zz_flow_category` VALUES (1809051198460792832, NULL, NULL, '测试分类', 'TEST', 1, '2024-07-05 10:26:31', 1809038124504846336, '2024-07-05 10:26:31', 1809038124504846336);
COMMIT;

-- ----------------------------
-- Table structure for zz_flow_entry
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_entry`;
CREATE TABLE `zz_flow_entry` (
  `entry_id` bigint NOT NULL COMMENT '主键',
  `tenant_id` bigint DEFAULT NULL COMMENT '租户Id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `process_definition_name` varchar(200) NOT NULL COMMENT '流程名称',
  `process_definition_key` varchar(150) NOT NULL COMMENT '流程标识Key',
  `category_id` bigint NOT NULL COMMENT '流程分类',
  `main_entry_publish_id` bigint DEFAULT NULL COMMENT '工作流部署的发布主版本Id',
  `latest_publish_time` datetime DEFAULT NULL COMMENT '最新发布时间',
  `status` int NOT NULL COMMENT '流程状态',
  `bpmn_xml` longtext COMMENT '流程定义的xml',
  `diagram_type` int NOT NULL COMMENT '流程图类型',
  `bind_form_type` int NOT NULL COMMENT '绑定表单类型',
  `page_id` bigint DEFAULT NULL COMMENT '在线表单的页面Id',
  `default_form_id` bigint DEFAULT NULL COMMENT '在线表单Id',
  `default_router_name` varchar(255) DEFAULT NULL COMMENT '静态表单的缺省路由名称',
  `encoded_rule` varchar(255) DEFAULT NULL COMMENT '工单表编码字段的编码规则',
  `extension_data` varchar(3000) DEFAULT NULL COMMENT '流程的自定义扩展数据',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  PRIMARY KEY (`entry_id`) USING BTREE,
  KEY `idx_process_definition_key` (`process_definition_key`) USING BTREE,
  KEY `idx_app_code` (`app_code`) USING BTREE,
  KEY `idx_category_id` (`category_id`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_status` (`status`) USING BTREE,
  KEY `idx_process_definition_name` (`process_definition_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='流程管理表';

-- ----------------------------
-- Records of zz_flow_entry
-- ----------------------------
BEGIN;
INSERT INTO `zz_flow_entry` VALUES (1809143991627681792, NULL, NULL, '请假申请', 'flowLeave', 1809051198460792832, 1809144428770627584, '2024-07-05 16:36:59', 1, '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" xmlns:flowable=\"http://flowable.org/bpmn\" id=\"diagram_flowLeave\" targetNamespace=\"http://flowable.org/bpmn\" xsi:schemaLocation=\"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd\">\n  <bpmn2:process id=\"flowLeave\" name=\"请假申请\" isExecutable=\"true\">\n    <bpmn2:extensionElements>\n      <flowable:properties>\n        <flowable:property name=\"$OrangeDiagramType\" value=\"0\" />\n      </flowable:properties>\n    </bpmn2:extensionElements>\n    <bpmn2:startEvent id=\"Event_04b3gd5\">\n      <bpmn2:outgoing>Flow_0d86buw</bpmn2:outgoing>\n    </bpmn2:startEvent>\n    <bpmn2:sequenceFlow id=\"Flow_0d86buw\" sourceRef=\"Event_04b3gd5\" targetRef=\"Activity_0vjtv0p\" />\n    <bpmn2:sequenceFlow id=\"Flow_1u40dt7\" sourceRef=\"Activity_0vjtv0p\" targetRef=\"Activity_06g14pf\" />\n    <bpmn2:sequenceFlow id=\"Flow_05s1j0n\" sourceRef=\"Activity_06g14pf\" targetRef=\"Activity_0dn7u52\" />\n    <bpmn2:endEvent id=\"Event_0ity5wg\">\n      <bpmn2:incoming>Flow_1bxwcza</bpmn2:incoming>\n    </bpmn2:endEvent>\n    <bpmn2:sequenceFlow id=\"Flow_1bxwcza\" sourceRef=\"Activity_0dn7u52\" targetRef=\"Event_0ity5wg\" />\n    <bpmn2:userTask id=\"Activity_0vjtv0p\" name=\"录入\" flowable:formKey=\"{&#34;formId&#34;:&#34;1809132635633487872&#34;,&#34;readOnly&#34;:false,&#34;groupType&#34;:&#34;ASSIGNEE&#34;}\" flowable:assignee=\"${startUserName}\">\n      <bpmn2:extensionElements>\n        <flowable:variableList />\n        <flowable:copyItemList />\n        <flowable:operationList>\n          <flowable:formOperation id=\"1720168540672\" label=\"同意\" type=\"agree\" showOrder=\"0\" />\n        </flowable:operationList>\n      </bpmn2:extensionElements>\n      <bpmn2:incoming>Flow_0d86buw</bpmn2:incoming>\n      <bpmn2:outgoing>Flow_1u40dt7</bpmn2:outgoing>\n    </bpmn2:userTask>\n    <bpmn2:userTask id=\"Activity_06g14pf\" name=\"审批A\" flowable:formKey=\"{&#34;formId&#34;:&#34;1809132635633487872&#34;,&#34;readOnly&#34;:true,&#34;groupType&#34;:&#34;ASSIGNEE&#34;}\" flowable:assignee=\"admin\">\n      <bpmn2:extensionElements>\n        <flowable:operationList>\n          <flowable:formOperation id=\"1720168555059\" label=\"同意\" type=\"agree\" showOrder=\"0\" />\n          <flowable:formOperation id=\"1720168558485\" label=\"驳回到起点\" type=\"rejectToStart\" showOrder=\"0\" />\n        </flowable:operationList>\n        <flowable:variableList />\n        <flowable:copyItemList />\n      </bpmn2:extensionElements>\n      <bpmn2:incoming>Flow_1u40dt7</bpmn2:incoming>\n      <bpmn2:outgoing>Flow_05s1j0n</bpmn2:outgoing>\n    </bpmn2:userTask>\n    <bpmn2:userTask id=\"Activity_0dn7u52\" name=\"审批B\" flowable:formKey=\"{&#34;formId&#34;:&#34;1809132635633487872&#34;,&#34;readOnly&#34;:true,&#34;groupType&#34;:&#34;ASSIGNEE&#34;}\" flowable:assignee=\"admin\">\n      <bpmn2:extensionElements>\n        <flowable:variableList />\n        <flowable:copyItemList />\n        <flowable:operationList>\n          <flowable:formOperation id=\"1720168573903\" label=\"同意\" type=\"agree\" showOrder=\"0\" />\n          <flowable:formOperation id=\"1720168577495\" label=\"驳回\" type=\"reject\" showOrder=\"0\" />\n        </flowable:operationList>\n      </bpmn2:extensionElements>\n      <bpmn2:incoming>Flow_05s1j0n</bpmn2:incoming>\n      <bpmn2:outgoing>Flow_1bxwcza</bpmn2:outgoing>\n    </bpmn2:userTask>\n  </bpmn2:process>\n  <bpmndi:BPMNDiagram id=\"BPMNDiagram_1\">\n    <bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"flowLeave\">\n      <bpmndi:BPMNEdge id=\"Flow_0d86buw_di\" bpmnElement=\"Flow_0d86buw\">\n        <di:waypoint x=\"218\" y=\"290\" />\n        <di:waypoint x=\"270\" y=\"290\" />\n      </bpmndi:BPMNEdge>\n      <bpmndi:BPMNEdge id=\"Flow_1u40dt7_di\" bpmnElement=\"Flow_1u40dt7\">\n        <di:waypoint x=\"370\" y=\"290\" />\n        <di:waypoint x=\"430\" y=\"290\" />\n      </bpmndi:BPMNEdge>\n      <bpmndi:BPMNEdge id=\"Flow_05s1j0n_di\" bpmnElement=\"Flow_05s1j0n\">\n        <di:waypoint x=\"530\" y=\"290\" />\n        <di:waypoint x=\"590\" y=\"290\" />\n      </bpmndi:BPMNEdge>\n      <bpmndi:BPMNEdge id=\"Flow_1bxwcza_di\" bpmnElement=\"Flow_1bxwcza\">\n        <di:waypoint x=\"690\" y=\"290\" />\n        <di:waypoint x=\"752\" y=\"290\" />\n      </bpmndi:BPMNEdge>\n      <bpmndi:BPMNShape id=\"Event_04b3gd5_di\" bpmnElement=\"Event_04b3gd5\">\n        <dc:Bounds x=\"182\" y=\"272\" width=\"36\" height=\"36\" />\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNShape id=\"Event_0ity5wg_di\" bpmnElement=\"Event_0ity5wg\">\n        <dc:Bounds x=\"752\" y=\"272\" width=\"36\" height=\"36\" />\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNShape id=\"Activity_1jiy5ns_di\" bpmnElement=\"Activity_0vjtv0p\">\n        <dc:Bounds x=\"270\" y=\"250\" width=\"100\" height=\"80\" />\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNShape id=\"Activity_09p6hyk_di\" bpmnElement=\"Activity_06g14pf\">\n        <dc:Bounds x=\"430\" y=\"250\" width=\"100\" height=\"80\" />\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNShape id=\"Activity_1ai1eph_di\" bpmnElement=\"Activity_0dn7u52\">\n        <dc:Bounds x=\"590\" y=\"250\" width=\"100\" height=\"80\" />\n      </bpmndi:BPMNShape>\n    </bpmndi:BPMNPlane>\n  </bpmndi:BPMNDiagram>\n</bpmn2:definitions>\n', 0, 0, 1809132177523216384, 1809132635633487872, NULL, '{\"middle\":\"DD\",\"idWidth\":5,\"prefix\":\"LL\",\"precisionTo\":\"DAYS\",\"calculateWhenView\":true}', '{\"approvalStatusDict\":[{\"id\":1,\"name\":\"同意\",\"_X_ROW_KEY\":\"row_57\"},{\"id\":2,\"name\":\"拒绝\",\"_X_ROW_KEY\":\"row_58\"},{\"id\":3,\"name\":\"驳回\",\"_X_ROW_KEY\":\"row_59\"},{\"id\":4,\"name\":\"会签同意\",\"_X_ROW_KEY\":\"row_60\"},{\"id\":5,\"name\":\"会签拒绝\",\"_X_ROW_KEY\":\"row_61\"}],\"notifyTypes\":[\"email\"],\"cascadeDeleteBusinessData\":true,\"supportRevive\":false}', '2024-07-05 16:36:39', 1808020007993479168, '2024-07-05 16:35:15', 1808020007993479168);
COMMIT;

-- ----------------------------
-- Table structure for zz_flow_entry_publish
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_entry_publish`;
CREATE TABLE `zz_flow_entry_publish` (
  `entry_publish_id` bigint NOT NULL COMMENT '主键Id',
  `entry_id` bigint NOT NULL COMMENT '流程Id',
  `process_definition_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程引擎的定义Id',
  `deploy_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程引擎的部署Id',
  `publish_version` int NOT NULL COMMENT '发布版本',
  `active_status` bit(1) NOT NULL COMMENT '激活状态',
  `main_version` bit(1) NOT NULL COMMENT '是否为主版本',
  `extension_data` varchar(3000) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程的自定义扩展数据',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `publish_time` datetime NOT NULL COMMENT '发布时间',
  `init_task_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '第一个非开始节点任务的附加信息',
  `analyzed_node_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '分析后的节点JSON信息',
  PRIMARY KEY (`entry_publish_id`) USING BTREE,
  UNIQUE KEY `uk_process_definition_id` (`process_definition_id`) USING BTREE,
  KEY `idx_entry_id` (`entry_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程发布表';

-- ----------------------------
-- Table structure for zz_flow_entry_publish_variable
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_entry_publish_variable`;
CREATE TABLE `zz_flow_entry_publish_variable` (
  `variable_id` bigint NOT NULL COMMENT '主键Id',
  `entry_publish_id` bigint NOT NULL COMMENT '流程Id',
  `variable_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '变量名',
  `show_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '显示名',
  `variable_type` int NOT NULL COMMENT '变量类型',
  `bind_datasource_id` bigint DEFAULT NULL COMMENT '绑定数据源Id',
  `bind_relation_id` bigint DEFAULT NULL COMMENT '绑定数据源关联Id',
  `bind_column_id` bigint DEFAULT NULL COMMENT '绑定字段Id',
  `builtin` bit(1) NOT NULL COMMENT '是否内置',
  PRIMARY KEY (`variable_id`) USING BTREE,
  KEY `idx_entry_publish_id` (`entry_publish_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程发布变量表';

-- ----------------------------
-- Table structure for zz_flow_entry_variable
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_entry_variable`;
CREATE TABLE `zz_flow_entry_variable` (
  `variable_id` bigint NOT NULL COMMENT '主键Id',
  `entry_id` bigint NOT NULL COMMENT '流程Id',
  `variable_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '变量名',
  `show_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '显示名',
  `variable_type` int NOT NULL COMMENT '变量类型',
  `bind_datasource_id` bigint DEFAULT NULL COMMENT '绑定数据源Id',
  `bind_relation_id` bigint DEFAULT NULL COMMENT '绑定数据源关联Id',
  `bind_column_id` bigint DEFAULT NULL COMMENT '绑定字段Id',
  `builtin` bit(1) NOT NULL COMMENT '是否内置',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`variable_id`) USING BTREE,
  UNIQUE KEY `uk_entry_id_variable_name` (`entry_id`,`variable_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程变量表';

-- ----------------------------
-- Records of zz_flow_entry_variable
-- ----------------------------
BEGIN;
INSERT INTO `zz_flow_entry_variable` VALUES (1809143992151969793, 1809143991627681792, 'operationType', '审批类型', 1, NULL, NULL, NULL, b'1', '2024-07-05 16:35:15');
INSERT INTO `zz_flow_entry_variable` VALUES (1809143992630120448, 1809143991627681792, 'startUserName', '流程启动用户', 0, NULL, NULL, NULL, b'1', '2024-07-05 16:35:15');
COMMIT;

-- ----------------------------
-- Table structure for zz_flow_message
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_message`;
CREATE TABLE `zz_flow_message` (
  `message_id` bigint NOT NULL COMMENT '主键Id',
  `tenant_id` bigint DEFAULT NULL COMMENT '租户Id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用Id',
  `message_type` tinyint NOT NULL COMMENT '消息类型',
  `message_content` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '消息内容',
  `remind_count` int DEFAULT '0' COMMENT '催办次数',
  `work_order_id` bigint DEFAULT NULL COMMENT '工单Id',
  `process_definition_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程定义Id',
  `process_definition_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程定义标识',
  `process_definition_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程定义名称',
  `process_instance_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程实例Id',
  `process_instance_initiator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程实例发起者',
  `task_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程任务Id',
  `task_definition_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程任务定义标识',
  `task_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '流程任务名称',
  `task_start_time` datetime DEFAULT NULL COMMENT '任务开始时间',
  `task_finished` bit(1) NOT NULL DEFAULT b'0' COMMENT '任务是否已完成',
  `task_assignee` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务指派人登录名',
  `business_data_shot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '业务数据快照',
  `online_form_data` bit(1) DEFAULT NULL COMMENT '是否为在线表单消息数据',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `create_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建者显示名',
  PRIMARY KEY (`message_id`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_app_code` (`app_code`) USING BTREE,
  KEY `idx_notified_username` (`task_assignee`) USING BTREE,
  KEY `idx_process_instance_id` (`process_instance_id`) USING BTREE,
  KEY `idx_message_type` (`message_type`) USING BTREE,
  KEY `idx_task_id` (`task_id`) USING BTREE,
  KEY `idx_task_finished` (`task_finished`) USING BTREE,
  KEY `idx_update_time` (`update_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程消息通知表';

-- ----------------------------
-- Table structure for zz_flow_msg_candidate_identity
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_msg_candidate_identity`;
CREATE TABLE `zz_flow_msg_candidate_identity` (
  `id` bigint NOT NULL COMMENT '主键Id',
  `message_id` bigint NOT NULL COMMENT '流程任务Id',
  `candidate_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '候选身份类型',
  `candidate_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '候选身份Id',
  PRIMARY KEY (`id`),
  KEY `idx_candidate_id` (`candidate_id`) USING BTREE,
  KEY `idx_message_id` (`message_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程消息通知候选人表';

-- ----------------------------
-- Table structure for zz_flow_msg_identity_operation
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_msg_identity_operation`;
CREATE TABLE `zz_flow_msg_identity_operation` (
  `id` bigint NOT NULL COMMENT '主键Id',
  `message_id` bigint NOT NULL COMMENT '流程任务Id',
  `login_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户登录名',
  `operation_type` int NOT NULL COMMENT '操作类型',
  `operation_time` datetime NOT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`),
  KEY `idx_message_id` (`message_id`) USING BTREE,
  KEY `idx_login_name` (`login_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程消息候选人操作表';

-- ----------------------------
-- Table structure for zz_flow_multi_instance_trans
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_multi_instance_trans`;
CREATE TABLE `zz_flow_multi_instance_trans` (
  `id` bigint NOT NULL COMMENT '主键Id',
  `process_instance_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程实例Id',
  `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务Id',
  `task_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务标识',
  `multi_instance_exec_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '会签任务的执行Id',
  `execution_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '任务的执行Id',
  `assignee_list` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '会签指派人列表',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `create_login_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建者登录名',
  `create_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建者用户名',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_execution_id_task_id` (`execution_id`,`task_id`) USING BTREE,
  KEY `idx_multi_instance_exec_id` (`multi_instance_exec_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程多实例任务审批流水表';

-- ----------------------------
-- Table structure for zz_flow_task_comment
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_task_comment`;
CREATE TABLE `zz_flow_task_comment` (
  `id` bigint NOT NULL COMMENT '主键Id',
  `process_instance_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程实例Id',
  `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务Id',
  `task_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务标识',
  `task_name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务名称',
  `target_task_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '目标任务标识',
  `execution_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '任务的执行Id',
  `multi_instance_exec_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '会签任务的执行Id',
  `approval_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '审批类型',
  `task_comment` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '批注内容',
  `delegate_assignee` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '委托指定人，比如加签、转办等',
  `custom_business_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '自定义数据。开发者可自行扩展，推荐使用JSON格式数据',
  `head_image_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '审批用户头像',
  `create_user_id` bigint DEFAULT NULL COMMENT '创建者Id',
  `create_login_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者登录名',
  `create_username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建者用户名',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_multi_instance_exec_id` (`multi_instance_exec_id`) USING BTREE,
  KEY `idx_process_instance_id` (`process_instance_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程任务审批表';

-- ----------------------------
-- Table structure for zz_flow_task_ext
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_task_ext`;
CREATE TABLE `zz_flow_task_ext` (
  `process_definition_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程引擎的定义Id',
  `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程引擎任务Id',
  `operation_list_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '操作列表JSON',
  `variable_list_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '变量列表JSON',
  `assignee_list_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '存储多实例的assigneeList的JSON',
  `group_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分组类型',
  `dept_post_list_json` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '保存岗位相关的数据',
  `role_ids` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '保存角色Id数据',
  `dept_ids` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '保存部门Id数据',
  `candidate_usernames` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '保存候选组用户名数据',
  `copy_list_json` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '抄送相关的数据',
  `extra_data_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '用户任务的扩展属性，存储为JSON的字符串格式',
  PRIMARY KEY (`process_definition_id`,`task_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程流程图任务扩展表';

-- ----------------------------
-- Table structure for zz_flow_work_order
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_work_order`;
CREATE TABLE `zz_flow_work_order` (
  `work_order_id` bigint NOT NULL COMMENT '主键Id',
  `tenant_id` bigint DEFAULT NULL COMMENT '租户Id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `work_order_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '工单编码字段',
  `process_definition_key` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程定义标识',
  `process_definition_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '流程名称',
  `process_definition_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程引擎的定义Id',
  `process_instance_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '流程实例Id',
  `online_table_id` bigint DEFAULT NULL COMMENT '在线表单的主表Id',
  `table_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用于静态表单的表名',
  `business_key` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '业务主键值',
  `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '未完成的任务Id',
  `task_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '未完成的任务名称',
  `task_definition_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '未完成的任务标识',
  `latest_approval_status` int DEFAULT NULL COMMENT '最近的审批状态',
  `flow_status` int NOT NULL DEFAULT '0' COMMENT '流程状态',
  `submit_username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '提交用户登录名称',
  `dept_id` bigint NOT NULL COMMENT '提交用户所在部门Id',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `deleted_flag` int NOT NULL COMMENT '删除标记(1: 正常 -1: 已删除)',
  PRIMARY KEY (`work_order_id`) USING BTREE,
  UNIQUE KEY `uk_process_instance_id` (`process_instance_id`) USING BTREE,
  UNIQUE KEY `uk_work_order_code` (`work_order_code`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_app_code` (`app_code`) USING BTREE,
  KEY `idx_process_definition_key` (`process_definition_key`) USING BTREE,
  KEY `idx_create_user_id` (`create_user_id`) USING BTREE,
  KEY `idx_create_time` (`create_time`) USING BTREE,
  KEY `idx_dept_id` (`dept_id`) USING BTREE,
  KEY `idx_table_name` (`table_name`) USING BTREE,
  KEY `idx_business_key` (`business_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程工单表';

-- ----------------------------
-- Table structure for zz_flow_work_order_ext
-- ----------------------------
DROP TABLE IF EXISTS `zz_flow_work_order_ext`;
CREATE TABLE `zz_flow_work_order_ext` (
  `id` bigint NOT NULL COMMENT '主键Id',
  `work_order_id` bigint NOT NULL COMMENT '工单Id',
  `draft_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '草稿数据',
  `business_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '业务数据',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `deleted_flag` int NOT NULL COMMENT '删除标记(1: 正常 -1: 已删除)',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_work_order_id` (`work_order_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='流程工单扩展表';

-- ----------------------------
-- Table structure for zz_global_dict
-- ----------------------------
DROP TABLE IF EXISTS `zz_global_dict`;
CREATE TABLE `zz_global_dict` (
  `dict_id` bigint NOT NULL COMMENT '主键Id',
  `dict_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典编码',
  `dict_name` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典中文名称',
  `create_user_id` bigint NOT NULL COMMENT '创建用户Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user_id` bigint NOT NULL COMMENT '更新用户名',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `deleted_flag` int NOT NULL COMMENT '逻辑删除字段',
  PRIMARY KEY (`dict_id`),
  KEY `idx_dict_code` (`dict_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='全局字典表';

-- ----------------------------
-- Table structure for zz_global_dict_item
-- ----------------------------
DROP TABLE IF EXISTS `zz_global_dict_item`;
CREATE TABLE `zz_global_dict_item` (
  `id` bigint NOT NULL COMMENT '主键Id',
  `dict_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典编码',
  `item_id` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '字典数据项Id',
  `item_name` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典数据项名称',
  `show_order` int NOT NULL COMMENT '显示顺序',
  `status` int NOT NULL COMMENT '字典状态',
  `create_user_id` bigint NOT NULL COMMENT '创建用户Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user_id` bigint NOT NULL COMMENT '更新用户名',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `deleted_flag` int NOT NULL COMMENT '逻辑删除字段',
  PRIMARY KEY (`id`),
  KEY `idx_show_order` (`show_order`) USING BTREE,
  KEY `idx_dict_code_item_id` (`dict_code`,`item_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='全局字典项目表';

-- ----------------------------
-- Table structure for zz_online_column
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_column`;
CREATE TABLE `zz_online_column` (
  `column_id` bigint NOT NULL COMMENT '主键Id',
  `column_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字段名',
  `table_id` bigint NOT NULL COMMENT '数据表Id',
  `column_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '数据表中的字段类型',
  `full_column_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '数据表中的完整字段类型(包括了精度和刻度)',
  `primary_key` bit(1) NOT NULL COMMENT '是否为主键',
  `auto_incr` bit(1) NOT NULL COMMENT '是否是自增主键(0: 不是 1: 是)',
  `nullable` bit(1) NOT NULL COMMENT '是否可以为空 (0: 不可以为空 1: 可以为空)',
  `column_default` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '缺省值',
  `column_show_order` int NOT NULL COMMENT '字段在数据表中的显示位置',
  `column_comment` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '数据表中的字段注释',
  `object_field_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '对象映射字段名称',
  `object_field_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '对象映射字段类型',
  `numeric_precision` int DEFAULT NULL COMMENT '数值型字段的精度',
  `numeric_scale` int DEFAULT NULL COMMENT '数值型字段的刻度',
  `filter_type` int NOT NULL DEFAULT '1' COMMENT '字段过滤类型',
  `parent_key` bit(1) NOT NULL COMMENT '是否是主键的父Id',
  `dept_filter` bit(1) NOT NULL COMMENT '是否部门过滤字段',
  `user_filter` bit(1) NOT NULL COMMENT '是否用户过滤字段',
  `field_kind` int DEFAULT NULL COMMENT '字段类别',
  `max_file_count` int DEFAULT NULL COMMENT '包含的文件文件数量，0表示无限制',
  `upload_file_system_type` int DEFAULT '0' COMMENT '上传文件系统类型',
  `encoded_rule` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '编码规则的JSON格式数据',
  `mask_field_type` varchar(64) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '脱敏字段类型',
  `dict_id` bigint DEFAULT NULL COMMENT '字典Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者',
  PRIMARY KEY (`column_id`),
  KEY `idx_table_id` (`table_id`) USING BTREE,
  KEY `idx_dict_id` (`dict_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单字段表';

-- ----------------------------
-- Records of zz_online_column
-- ----------------------------
BEGIN;
INSERT INTO `zz_online_column` VALUES (1809132252005666816, 'id', 1809132251556876288, 'bigint', 'bigint', b'1', b'0', b'0', NULL, 1, '主键Id', 'id', 'Long', 19, NULL, 0, b'0', b'0', b'0', NULL, NULL, 0, NULL, NULL, NULL, '2024-07-05 15:48:36', 1808020007993479168, '2024-07-05 15:48:36', 1808020007993479168);
INSERT INTO `zz_online_column` VALUES (1809132252425097216, 'user_id', 1809132251556876288, 'bigint', 'bigint', b'0', b'0', b'0', NULL, 2, '请假用户', 'userId', 'Long', 19, NULL, 0, b'0', b'0', b'0', 21, NULL, 0, NULL, NULL, NULL, '2024-07-05 15:48:36', 1808020007993479168, '2024-07-05 15:48:47', 1808020007993479168);
INSERT INTO `zz_online_column` VALUES (1809132252852916224, 'leave_reason', 1809132251556876288, 'varchar', 'varchar(512)', b'0', b'0', b'0', NULL, 3, '请假原因', 'leaveReason', 'String', NULL, NULL, 0, b'0', b'0', b'0', NULL, NULL, 0, NULL, NULL, NULL, '2024-07-05 15:48:36', 1808020007993479168, '2024-07-05 15:53:47', 1808020007993479168);
INSERT INTO `zz_online_column` VALUES (1809132253377204224, 'leave_type', 1809132251556876288, 'int', 'int', b'0', b'0', b'0', NULL, 4, '请假类型', 'leaveType', 'Integer', 10, NULL, 0, b'0', b'0', b'0', NULL, NULL, 0, NULL, NULL, NULL, '2024-07-05 15:48:36', 1808020007993479168, '2024-07-05 15:53:44', 1808020007993479168);
INSERT INTO `zz_online_column` VALUES (1809132253733720064, 'leave_begin_time', 1809132251556876288, 'datetime', 'datetime', b'0', b'0', b'0', NULL, 5, '开始时间', 'leaveBeginTime', 'Date', NULL, NULL, 0, b'0', b'0', b'0', NULL, NULL, 0, NULL, NULL, NULL, '2024-07-05 15:48:36', 1808020007993479168, '2024-07-05 15:53:50', 1808020007993479168);
INSERT INTO `zz_online_column` VALUES (1809132254102818816, 'leave_end_time', 1809132251556876288, 'datetime', 'datetime', b'0', b'0', b'0', NULL, 6, '结束时间', 'leaveEndTime', 'Date', NULL, NULL, 0, b'0', b'0', b'0', NULL, NULL, 0, NULL, NULL, NULL, '2024-07-05 15:48:36', 1808020007993479168, '2024-07-05 15:53:54', 1808020007993479168);
INSERT INTO `zz_online_column` VALUES (1809132254388031488, 'apply_time', 1809132251556876288, 'datetime', 'datetime', b'0', b'0', b'0', NULL, 7, '申请时间', 'applyTime', 'Date', NULL, NULL, 0, b'0', b'0', b'0', 20, NULL, 0, NULL, NULL, NULL, '2024-07-05 15:48:36', 1808020007993479168, '2024-07-05 15:53:57', 1808020007993479168);
INSERT INTO `zz_online_column` VALUES (1809132254782296064, 'approval_status', 1809132251556876288, 'int', 'int', b'0', b'0', b'1', NULL, 8, '最后审批状态', 'approvalStatus', 'Integer', 10, NULL, 0, b'0', b'0', b'0', 26, NULL, 0, NULL, NULL, NULL, '2024-07-05 15:48:36', 1808020007993479168, '2024-07-05 15:53:59', 1808020007993479168);
INSERT INTO `zz_online_column` VALUES (1809132255327555584, 'flow_status', 1809132251556876288, 'int', 'int', b'0', b'0', b'1', NULL, 9, '流程状态', 'flowStatus', 'Integer', 10, NULL, 0, b'0', b'0', b'0', 25, NULL, 0, NULL, NULL, NULL, '2024-07-05 15:48:36', 1808020007993479168, '2024-07-05 15:49:44', 1808020007993479168);
INSERT INTO `zz_online_column` VALUES (1809132255679877120, 'username', 1809132251556876288, 'varchar', 'varchar(255)', b'0', b'0', b'1', NULL, 10, '用户名', 'username', 'String', NULL, NULL, 0, b'0', b'0', b'0', NULL, NULL, 0, NULL, NULL, NULL, '2024-07-05 15:48:36', 1808020007993479168, '2024-07-05 15:49:49', 1808020007993479168);
COMMIT;

-- ----------------------------
-- Table structure for zz_online_column_rule
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_column_rule`;
CREATE TABLE `zz_online_column_rule` (
  `column_id` bigint NOT NULL COMMENT '字段Id',
  `rule_id` bigint NOT NULL COMMENT '规则Id',
  `prop_data_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '规则属性数据',
  PRIMARY KEY (`column_id`,`rule_id`) USING BTREE,
  KEY `idx_rule_id` (`rule_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单字段和字段规则关联中间表';

-- ----------------------------
-- Table structure for zz_online_datasource
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_datasource`;
CREATE TABLE `zz_online_datasource` (
  `datasource_id` bigint NOT NULL COMMENT '主键Id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `datasource_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '数据源名称',
  `variable_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '数据源变量名',
  `dblink_id` bigint NOT NULL COMMENT '数据库链接Id',
  `master_table_id` bigint NOT NULL COMMENT '主表Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者',
  PRIMARY KEY (`datasource_id`),
  UNIQUE KEY `uk_app_code_variable_name` (`app_code`,`variable_name`) USING BTREE,
  KEY `idx_master_table_id` (`master_table_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单数据源表';

-- ----------------------------
-- Records of zz_online_datasource
-- ----------------------------
BEGIN;
INSERT INTO `zz_online_datasource` VALUES (1809132255981867008, NULL, '请假申请', 'dsLeave', 1809055300360081408, 1809132251556876288, '2024-07-05 15:48:37', 1808020007993479168, '2024-07-05 15:48:37', 1808020007993479168);
COMMIT;

-- ----------------------------
-- Table structure for zz_online_datasource_relation
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_datasource_relation`;
CREATE TABLE `zz_online_datasource_relation` (
  `relation_id` bigint NOT NULL COMMENT '主键Id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `relation_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '关联名称',
  `variable_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '变量名',
  `datasource_id` bigint NOT NULL COMMENT '主数据源Id',
  `relation_type` int NOT NULL COMMENT '关联类型',
  `master_column_id` bigint NOT NULL COMMENT '主表关联字段Id',
  `slave_table_id` bigint NOT NULL COMMENT '从表Id',
  `slave_column_id` bigint NOT NULL COMMENT '从表关联字段Id',
  `cascade_delete` bit(1) NOT NULL COMMENT '删除主表的时候是否级联删除一对一和一对多的从表数据，多对多只是删除关联，不受到这个标记的影响。',
  `left_join` bit(1) NOT NULL COMMENT '是否左连接',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者',
  PRIMARY KEY (`relation_id`) USING BTREE,
  UNIQUE KEY `uk_datasource_id_variable_name` (`datasource_id`,`variable_name`) USING BTREE,
  KEY `idx_app_code` (`app_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单数据源关联表';

-- ----------------------------
-- Table structure for zz_online_datasource_table
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_datasource_table`;
CREATE TABLE `zz_online_datasource_table` (
  `id` bigint NOT NULL COMMENT '主键Id',
  `datasource_id` bigint NOT NULL COMMENT '数据源Id',
  `relation_id` bigint DEFAULT NULL COMMENT '数据源关联Id',
  `table_id` bigint NOT NULL COMMENT '数据表Id',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_relation_id` (`relation_id`) USING BTREE,
  KEY `idx_datasource_id` (`datasource_id`) USING BTREE,
  KEY `idx_table_id` (`table_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单数据源和数据表关联的中间表';

-- ----------------------------
-- Records of zz_online_datasource_table
-- ----------------------------
BEGIN;
INSERT INTO `zz_online_datasource_table` VALUES (1809132256292245504, 1809132255981867008, NULL, 1809132251556876288);
COMMIT;

-- ----------------------------
-- Table structure for zz_online_dblink
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_dblink`;
CREATE TABLE `zz_online_dblink` (
  `dblink_id` bigint NOT NULL COMMENT '主键Id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `dblink_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '链接中文名称',
  `dblink_description` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '链接描述',
  `dblink_type` int NOT NULL COMMENT '数据源类型',
  `configuration` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '配置信息',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者',
  PRIMARY KEY (`dblink_id`),
  KEY `idx_dblink_type` (`dblink_type`) USING BTREE,
  KEY `idx_app_code` (`app_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单数据库链接表';

-- ----------------------------
-- Records of zz_online_dblink
-- ----------------------------
BEGIN;
INSERT INTO `zz_online_dblink` VALUES (1809055300360081408, NULL, 'mysql-test', NULL, 0, '{\"sid\":true,\"initialPoolSize\":5,\"minPoolSize\":5,\"maxPoolSize\":50,\"host\":\"localhost\",\"port\":3306,\"database\":\"zzdemo-online-open\",\"username\":\"root\",\"password\":\"123456\"}', '2024-07-05 10:42:49', 1809038124504846336, '2024-07-05 10:42:49', 1809038124504846336);
COMMIT;

-- ----------------------------
-- Table structure for zz_online_dict
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_dict`;
CREATE TABLE `zz_online_dict` (
  `dict_id` bigint NOT NULL COMMENT '主键Id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `dict_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典名称',
  `dict_type` int NOT NULL COMMENT '字典类型',
  `dblink_id` bigint DEFAULT NULL COMMENT '数据库链接Id',
  `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '字典表名称',
  `dict_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '全局字典编码',
  `key_column_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '字典表键字段名称',
  `parent_key_column_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '字典表父键字段名称',
  `value_column_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '字典值字段名称',
  `deleted_column_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '逻辑删除字段',
  `user_filter_column_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户过滤滤字段名称',
  `dept_filter_column_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '部门过滤滤字段名称',
  `tenant_filter_column_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户过滤字段名称',
  `tree_flag` bit(1) NOT NULL COMMENT '是否树形标记',
  `dict_list_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '获取字典列表数据的url',
  `dict_ids_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '根据主键id批量获取字典数据的url',
  `dict_data_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '字典的JSON数据',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者',
  PRIMARY KEY (`dict_id`) USING BTREE,
  KEY `idx_app_code` (`app_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单字典表';

-- ----------------------------
-- Table structure for zz_online_form
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_form`;
CREATE TABLE `zz_online_form` (
  `form_id` bigint NOT NULL COMMENT '主键Id',
  `tenant_id` bigint DEFAULT NULL COMMENT '租户id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `page_id` bigint NOT NULL COMMENT '页面id',
  `form_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '表单编码',
  `form_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '表单名称',
  `form_kind` int NOT NULL COMMENT '表单类别',
  `form_type` int NOT NULL COMMENT '表单类型',
  `master_table_id` bigint NOT NULL COMMENT '表单主表id',
  `widget_json` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '表单组件JSON',
  `params_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '表单参数JSON',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者',
  PRIMARY KEY (`form_id`) USING BTREE,
  UNIQUE KEY `uk_page_id_form_code` (`page_id`,`form_code`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_app_code` (`app_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单表单表';

-- ----------------------------
-- Records of zz_online_form
-- ----------------------------
BEGIN;
INSERT INTO `zz_online_form` VALUES (1809132635633487872, NULL, NULL, 1809132177523216384, 'formFlowLeave', '请假申请', 5, 10, 1809132251556876288, '{\"pc\":{\"gutter\":20,\"labelWidth\":100,\"labelPosition\":\"right\",\"operationList\":[],\"customFieldList\":[],\"widgetList\":[{\"widgetType\":3,\"bindData\":{\"defaultValue\":{},\"tableId\":\"1809132251556876288\",\"columnId\":\"1809132253377204224\",\"dataType\":0},\"showName\":\"请假类型\",\"variableName\":\"leaveType\",\"props\":{\"span\":24,\"placeholder\":\"\",\"step\":1,\"controls\":true,\"required\":true,\"disabled\":false,\"dictInfo\":{\"paramList\":[]},\"actions\":{}},\"eventList\":[],\"childWidgetList\":[],\"style\":{}},{\"widgetType\":1,\"bindData\":{\"defaultValue\":{},\"tableId\":\"1809132251556876288\",\"columnId\":\"1809132252852916224\",\"dataType\":0},\"showName\":\"请假原因\",\"variableName\":\"leaveReason\",\"props\":{\"span\":24,\"type\":\"text\",\"placeholder\":\"\",\"show-password\":false,\"show-word-limit\":false,\"required\":true,\"disabled\":false,\"dictInfo\":{\"paramList\":[]},\"actions\":{}},\"eventList\":[],\"childWidgetList\":[],\"style\":{}},{\"widgetType\":20,\"bindData\":{\"defaultValue\":{},\"tableId\":\"1809132251556876288\",\"columnId\":\"1809132253733720064\",\"dataType\":0},\"showName\":\"开始时间\",\"variableName\":\"leaveBeginTime\",\"props\":{\"span\":12,\"placeholder\":\"\",\"type\":\"date\",\"required\":true,\"disabled\":false,\"dictInfo\":{\"paramList\":[]},\"actions\":{}},\"eventList\":[],\"childWidgetList\":[],\"style\":{},\"supportOperation\":false},{\"widgetType\":20,\"bindData\":{\"defaultValue\":{},\"tableId\":\"1809132251556876288\",\"columnId\":\"1809132254102818816\",\"dataType\":0},\"showName\":\"结束时间\",\"variableName\":\"leaveEndTime\",\"props\":{\"span\":12,\"placeholder\":\"\",\"type\":\"date\",\"required\":true,\"disabled\":false,\"dictInfo\":{\"paramList\":[]},\"actions\":{}},\"eventList\":[],\"childWidgetList\":[],\"style\":{},\"supportOperation\":false}],\"formEventList\":[],\"maskFieldList\":[],\"width\":800,\"fullscreen\":true}}', NULL, '2024-07-05 15:50:07', 1808020007993479168, '2024-07-05 16:34:21', 1808020007993479168);
COMMIT;

-- ----------------------------
-- Table structure for zz_online_form_datasource
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_form_datasource`;
CREATE TABLE `zz_online_form_datasource` (
  `id` bigint NOT NULL COMMENT '主键Id',
  `form_id` bigint NOT NULL COMMENT '表单Id',
  `datasource_id` bigint NOT NULL COMMENT '数据源Id',
  PRIMARY KEY (`id`),
  KEY `idx_form_id` (`form_id`) USING BTREE,
  KEY `idx_datasource_id` (`datasource_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单表单和数据源关联中间表';

-- ----------------------------
-- Records of zz_online_form_datasource
-- ----------------------------
BEGIN;
INSERT INTO `zz_online_form_datasource` VALUES (1809143766578106368, 1809132635633487872, 1809132255981867008);
COMMIT;

-- ----------------------------
-- Table structure for zz_online_page
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_page`;
CREATE TABLE `zz_online_page` (
  `page_id` bigint NOT NULL COMMENT '主键Id',
  `tenant_id` bigint DEFAULT NULL COMMENT '租户id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `page_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '页面编码',
  `page_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '页面名称',
  `page_type` int NOT NULL COMMENT '页面类型',
  `status` int NOT NULL COMMENT '页面编辑状态',
  `published` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否发布',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者',
  PRIMARY KEY (`page_id`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_app_code` (`app_code`) USING BTREE,
  KEY `idx_page_code` (`page_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单页面表';

-- ----------------------------
-- Records of zz_online_page
-- ----------------------------
BEGIN;
INSERT INTO `zz_online_page` VALUES (1809132177523216384, NULL, NULL, 'flowLeave', '请假申请', 10, 2, b'1', '2024-07-05 15:48:18', 1808020007993479168, '2024-07-05 16:34:27', 1808020007993479168);
COMMIT;

-- ----------------------------
-- Table structure for zz_online_page_datasource
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_page_datasource`;
CREATE TABLE `zz_online_page_datasource` (
  `id` bigint NOT NULL COMMENT '主键Id',
  `page_id` bigint NOT NULL COMMENT '页面主键Id',
  `datasource_id` bigint NOT NULL COMMENT '数据源主键Id',
  PRIMARY KEY (`id`),
  KEY `idx_page_id` (`page_id`) USING BTREE,
  KEY `idx_datasource_id` (`datasource_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单页面和数据源关联中间表';

-- ----------------------------
-- Records of zz_online_page_datasource
-- ----------------------------
BEGIN;
INSERT INTO `zz_online_page_datasource` VALUES (1809132256564875264, 1809132177523216384, 1809132255981867008);
COMMIT;

-- ----------------------------
-- Table structure for zz_online_rule
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_rule`;
CREATE TABLE `zz_online_rule` (
  `rule_id` bigint NOT NULL COMMENT '主键Id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `rule_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '规则名称',
  `rule_type` int NOT NULL COMMENT '规则类型',
  `builtin` bit(1) NOT NULL COMMENT '内置规则标记',
  `pattern` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '自定义规则的正则表达式',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者',
  `deleted_flag` int NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`rule_id`) USING BTREE,
  KEY `idx_app_code` (`app_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单字段规则表';

-- ----------------------------
-- Records of zz_online_rule
-- ----------------------------
BEGIN;
INSERT INTO `zz_online_rule` VALUES (1, NULL, '只允许整数', 1, b'1', NULL, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, 1);
INSERT INTO `zz_online_rule` VALUES (2, NULL, '只允许数字', 2, b'1', NULL, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, 1);
INSERT INTO `zz_online_rule` VALUES (3, NULL, '只允许英文字符', 3, b'1', NULL, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, 1);
INSERT INTO `zz_online_rule` VALUES (4, NULL, '范围验证', 4, b'1', NULL, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, 1);
INSERT INTO `zz_online_rule` VALUES (5, NULL, '邮箱格式验证', 5, b'1', NULL, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, 1);
INSERT INTO `zz_online_rule` VALUES (6, NULL, '手机格式验证', 6, b'1', NULL, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, 1);
COMMIT;

-- ----------------------------
-- Table structure for zz_online_table
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_table`;
CREATE TABLE `zz_online_table` (
  `table_id` bigint NOT NULL COMMENT '主键Id',
  `app_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '应用编码',
  `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '表名称',
  `model_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '实体名称',
  `dblink_id` bigint NOT NULL COMMENT '数据库链接Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user_id` bigint NOT NULL COMMENT '创建者',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者',
  PRIMARY KEY (`table_id`),
  KEY `idx_dblink_id` (`dblink_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单数据表';

-- ----------------------------
-- Records of zz_online_table
-- ----------------------------
BEGIN;
INSERT INTO `zz_online_table` VALUES (1809132251556876288, NULL, 'zz_test_flow_leave', 'ZzTestFlowLeave', 1809055300360081408, '2024-07-05 15:48:35', 1808020007993479168, '2024-07-05 15:48:35', 1808020007993479168);
COMMIT;

-- ----------------------------
-- Table structure for zz_online_virtual_column
-- ----------------------------
DROP TABLE IF EXISTS `zz_online_virtual_column`;
CREATE TABLE `zz_online_virtual_column` (
  `virtual_column_id` bigint NOT NULL COMMENT '主键Id',
  `table_id` bigint NOT NULL COMMENT '所在表Id',
  `object_field_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字段名称',
  `object_field_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '属性类型',
  `column_prompt` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字段提示名',
  `virtual_type` int NOT NULL COMMENT '虚拟字段类型(0: 聚合)',
  `datasource_id` bigint NOT NULL COMMENT '关联数据源Id',
  `relation_id` bigint DEFAULT NULL COMMENT '关联Id',
  `aggregation_table_id` bigint DEFAULT NULL COMMENT '聚合字段所在关联表Id',
  `aggregation_column_id` bigint DEFAULT NULL COMMENT '关联表聚合字段Id',
  `aggregation_type` int DEFAULT NULL COMMENT '聚合类型(0: sum 1: count 2: avg 3: min 4: max)',
  `where_clause_json` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '存储过滤条件的json',
  PRIMARY KEY (`virtual_column_id`) USING BTREE,
  KEY `idx_database_id` (`datasource_id`) USING BTREE,
  KEY `idx_relation_id` (`relation_id`) USING BTREE,
  KEY `idx_table_id` (`table_id`) USING BTREE,
  KEY `idx_aggregation_column_id` (`aggregation_column_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='在线表单虚拟字段表';

-- ----------------------------
-- Table structure for zz_sys_data_perm
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_data_perm`;
CREATE TABLE `zz_sys_data_perm` (
  `data_perm_id` bigint NOT NULL COMMENT '主键',
  `data_perm_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '显示名称',
  `rule_type` tinyint NOT NULL COMMENT '数据权限规则类型(0: 全部可见 1: 只看自己 2: 只看本部门 3: 本部门及子部门 4: 多部门及子部门 5: 自定义部门列表)。',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `update_time` datetime NOT NULL COMMENT '最后更新时间',
  PRIMARY KEY (`data_perm_id`) USING BTREE,
  KEY `idx_create_time` (`create_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='数据权限表';

-- ----------------------------
-- Records of zz_sys_data_perm
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_data_perm` VALUES (1809037881759502336, '查看全部', 0, 1808020007993479168, '2024-07-05 09:33:36', 1808020007993479168, '2024-07-05 09:33:36');
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_data_perm_dept
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_data_perm_dept`;
CREATE TABLE `zz_sys_data_perm_dept` (
  `data_perm_id` bigint NOT NULL COMMENT '数据权限Id',
  `dept_id` bigint NOT NULL COMMENT '部门Id',
  PRIMARY KEY (`data_perm_id`,`dept_id`),
  KEY `idx_dept_id` (`dept_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='数据权限和部门关联表';

-- ----------------------------
-- Table structure for zz_sys_data_perm_menu
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_data_perm_menu`;
CREATE TABLE `zz_sys_data_perm_menu` (
  `data_perm_id` bigint NOT NULL COMMENT '数据权限Id',
  `menu_id` bigint NOT NULL COMMENT '菜单Id',
  PRIMARY KEY (`data_perm_id`,`menu_id`),
  KEY `idx_menu_id` (`menu_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='数据权限和菜单关联表';

-- ----------------------------
-- Table structure for zz_sys_data_perm_user
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_data_perm_user`;
CREATE TABLE `zz_sys_data_perm_user` (
  `data_perm_id` bigint NOT NULL COMMENT '数据权限Id',
  `user_id` bigint NOT NULL COMMENT '用户Id',
  PRIMARY KEY (`data_perm_id`,`user_id`),
  KEY `idx_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='数据权限和用户关联表';

-- ----------------------------
-- Records of zz_sys_data_perm_user
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_data_perm_user` VALUES (1809037881759502336, 1809038124504846336);
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_dept`;
CREATE TABLE `zz_sys_dept` (
  `dept_id` bigint NOT NULL COMMENT '部门Id',
  `parent_id` bigint DEFAULT NULL COMMENT '父部门Id',
  `dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '部门名称',
  `show_order` int NOT NULL COMMENT '兄弟部分之间的显示顺序，数字越小越靠前',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `update_time` datetime NOT NULL COMMENT '最后更新时间',
  `deleted_flag` int NOT NULL COMMENT '删除标记(1: 正常 -1: 已删除)',
  PRIMARY KEY (`dept_id`) USING BTREE,
  KEY `idx_parent_id` (`parent_id`) USING BTREE,
  KEY `idx_show_order` (`show_order`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT COMMENT='部门管理表';

-- ----------------------------
-- Records of zz_sys_dept
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_dept` VALUES (1808020008341606402, NULL, '公司总部', 1, 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00', 1);
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_dept_post
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_dept_post`;
CREATE TABLE `zz_sys_dept_post` (
  `dept_post_id` bigint NOT NULL COMMENT '主键Id',
  `dept_id` bigint NOT NULL COMMENT '部门Id',
  `post_id` bigint NOT NULL COMMENT '岗位Id',
  `post_show_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '部门岗位显示名称',
  PRIMARY KEY (`dept_post_id`) USING BTREE,
  KEY `idx_post_id` (`post_id`) USING BTREE,
  KEY `idx_dept_id` (`dept_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of zz_sys_dept_post
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_dept_post` VALUES (1809038003536924672, 1808020008341606402, 1809037927934595072, '领导岗位');
INSERT INTO `zz_sys_dept_post` VALUES (1809038003968937984, 1808020008341606402, 1809037967663042560, '普通员工');
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_dept_relation
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_dept_relation`;
CREATE TABLE `zz_sys_dept_relation` (
  `parent_dept_id` bigint NOT NULL COMMENT '父部门Id',
  `dept_id` bigint NOT NULL COMMENT '部门Id',
  PRIMARY KEY (`parent_dept_id`,`dept_id`),
  KEY `idx_dept_id` (`dept_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT COMMENT='部门关联关系表';

-- ----------------------------
-- Records of zz_sys_dept_relation
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_dept_relation` VALUES (1808020008341606402, 1808020008341606402);
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_menu`;
CREATE TABLE `zz_sys_menu` (
  `menu_id` bigint NOT NULL COMMENT '主键Id',
  `parent_id` bigint DEFAULT NULL COMMENT '父菜单Id，目录菜单的父菜单为null',
  `menu_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '菜单显示名称',
  `menu_type` int NOT NULL COMMENT '(0: 目录 1: 菜单 2: 按钮 3: UI片段)',
  `form_router_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '前端表单路由名称，仅用于menu_type为1的菜单类型',
  `online_form_id` bigint DEFAULT NULL COMMENT '在线表单主键Id',
  `online_menu_perm_type` int DEFAULT NULL COMMENT '在线表单菜单的权限控制类型',
  `report_page_id` bigint DEFAULT NULL COMMENT '统计页面主键Id',
  `online_flow_entry_id` bigint DEFAULT NULL COMMENT '仅用于在线表单的流程Id',
  `show_order` int NOT NULL COMMENT '菜单显示顺序 (值越小，排序越靠前)',
  `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '菜单图标',
  `extra_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT '附加信息',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `update_time` datetime NOT NULL COMMENT '最后更新时间',
  PRIMARY KEY (`menu_id`) USING BTREE,
  KEY `idx_show_order` (`show_order`) USING BTREE,
  KEY `idx_parent_id` (`parent_id`) USING BTREE,
  KEY `idx_menu_type` (`menu_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT COMMENT='菜单和操作权限管理表';

-- ----------------------------
-- Records of zz_sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_menu` VALUES (1392786476428693504, NULL, '在线表单', 0, NULL, NULL, NULL, NULL, NULL, 2, 'el-icon-c-scale-to-original', NULL, 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1392786549942259712, 1392786476428693504, '字典管理', 1, 'formOnlineDict', NULL, NULL, NULL, NULL, 2, NULL, '{\"permCodeList\":[\"onlineDict.all\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1392786950682841088, 1392786476428693504, '表单管理', 1, 'formOnlinePage', NULL, NULL, NULL, NULL, 3, NULL, '{\"permCodeList\":[\"onlinePage.all\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1418057714138877952, NULL, '流程管理', 0, NULL, NULL, NULL, NULL, NULL, 3, 'el-icon-s-operation', NULL, 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1418057835631087616, 1418057714138877952, '流程分类', 1, 'formFlowCategory', NULL, NULL, NULL, NULL, 1, NULL, '{\"permCodeList\":[\"flowCategory.all\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1418058289182150656, 1418057714138877952, '流程设计', 1, 'formFlowEntry', NULL, NULL, NULL, NULL, 2, NULL, '{\"permCodeList\":[\"flowEntry.all\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1418058744037642240, 1418057714138877952, '流程实例', 1, 'formAllInstance', NULL, NULL, NULL, NULL, 3, NULL, '{\"permCodeList\":[\"flowOperation.all\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1418059005175009280, NULL, '任务管理', 0, NULL, NULL, NULL, NULL, NULL, 4, 'el-icon-tickets', NULL, 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1418059167532322816, 1418059005175009280, '待办任务', 1, 'formMyTask', NULL, NULL, NULL, NULL, 1, NULL, NULL, 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1418059283920064512, 1418059005175009280, '历史任务', 1, 'formMyHistoryTask', NULL, NULL, NULL, NULL, 3, NULL, NULL, 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1423161217970606080, 1418059005175009280, '已办任务', 1, 'formMyApprovedTask', NULL, NULL, NULL, NULL, 2, NULL, NULL, 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1634009076981567488, 1392786476428693504, '数据库链接', 1, 'formOnlineDblink', NULL, NULL, NULL, NULL, 1, NULL, '{\"permCodeList\":[\"onlineDblink.all\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020011080486913, NULL, '系统管理', 0, NULL, NULL, NULL, NULL, NULL, 1, 'el-icon-setting', '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020012825317376, 1808020011080486913, '用户管理', 1, 'formSysUser', NULL, NULL, NULL, NULL, 100, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020012825317377, 1808020011080486913, '部门管理', 1, 'formSysDept', NULL, NULL, NULL, NULL, 105, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020012825317378, 1808020011080486913, '角色管理', 1, 'formSysRole', NULL, NULL, NULL, NULL, 110, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020012825317379, 1808020011080486913, '数据权限管理', 1, 'formSysDataPerm', NULL, NULL, NULL, NULL, 115, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020012825317380, 1808020011080486913, '岗位管理', 1, 'formSysPost', NULL, NULL, NULL, NULL, 106, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020012825317381, 1808020011080486913, '菜单管理', 1, 'formSysMenu', NULL, NULL, NULL, NULL, 120, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020012825317384, 1808020011080486913, '字典管理', 1, 'formSysDict', NULL, NULL, NULL, NULL, 135, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020012825317385, 1808020011080486913, '操作日志', 1, 'formSysOperationLog', NULL, NULL, NULL, NULL, 140, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020012825317386, 1808020011080486913, '在线用户', 1, 'formSysLoginUser', NULL, NULL, NULL, NULL, 145, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148866, 1808020012825317376, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysUser:fragmentSysUser\",\"permCodeList\":[\"sysUser.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148867, 1808020012825317376, '新增', 3, NULL, NULL, NULL, NULL, NULL, 2, NULL, '{\"menuCode\":\"formSysUser:fragmentSysUser:add\",\"permCodeList\":[\"sysUser.add\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148868, 1808020012825317376, '编辑', 3, NULL, NULL, NULL, NULL, NULL, 3, NULL, '{\"menuCode\":\"formSysUser:fragmentSysUser:update\",\"permCodeList\":[\"sysUser.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148869, 1808020012825317376, '删除', 3, NULL, NULL, NULL, NULL, NULL, 4, NULL, '{\"menuCode\":\"formSysUser:fragmentSysUser:delete\",\"permCodeList\":[\"sysUser.delete\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148870, 1808020012825317376, '重置密码', 3, NULL, NULL, NULL, NULL, NULL, 5, NULL, '{\"menuCode\":\"formSysUser:fragmentSysUser:resetPassword\",\"permCodeList\":[\"sysUser.resetPassword\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148872, 1808020012825317377, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysDept:fragmentSysDept\",\"permCodeList\":[\"sysDept.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148873, 1808020012825317377, '新增', 3, NULL, NULL, NULL, NULL, NULL, 2, '', '{\"bindType\":0,\"menuCode\":\"formSysDept:fragmentSysDept:add\",\"permCodeList\":[\"sysDept.add\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-05 09:51:07');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148874, 1808020012825317377, '编辑', 3, NULL, NULL, NULL, NULL, NULL, 3, NULL, '{\"menuCode\":\"formSysDept:fragmentSysDept:update\",\"permCodeList\":[\"sysDept.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148875, 1808020012825317377, '删除', 3, NULL, NULL, NULL, NULL, NULL, 4, NULL, '{\"menuCode\":\"formSysDept:fragmentSysDept:delete\",\"permCodeList\":[\"sysDept.delete\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148876, 1808020012825317377, '设置岗位', 3, NULL, NULL, NULL, NULL, NULL, 5, NULL, '{\"menuCode\":\"formSysDept:fragmentSysDept:editPost\",\"permCodeList\":[\"sysDept.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148877, 1808020012825317377, '查看岗位', 3, NULL, NULL, NULL, NULL, NULL, 6, NULL, '{\"menuCode\":\"formSysDept:fragmentSysDept:viewPost\",\"permCodeList\":[\"sysDept.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148879, 1808020012825317378, '角色管理', 2, NULL, NULL, NULL, NULL, NULL, 1, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148880, 1808020012825317378, '用户授权', 2, NULL, NULL, NULL, NULL, NULL, 2, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148881, 1808020075098148879, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysRole:fragmentSysRole\",\"permCodeList\":[\"sysRole.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148882, 1808020075098148879, '新增', 3, NULL, NULL, NULL, NULL, NULL, 2, NULL, '{\"menuCode\":\"formSysRole:fragmentSysRole:add\",\"permCodeList\":[\"sysRole.add\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148883, 1808020075098148879, '编辑', 3, NULL, NULL, NULL, NULL, NULL, 3, NULL, '{\"menuCode\":\"formSysRole:fragmentSysRole:update\",\"permCodeList\":[\"sysRole.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148884, 1808020075098148879, '删除', 3, NULL, NULL, NULL, NULL, NULL, 4, NULL, '{\"menuCode\":\"formSysRole:fragmentSysRole:delete\",\"permCodeList\":[\"sysRole.delete\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148885, 1808020075098148880, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysRole:fragmentSysRoleUser\",\"permCodeList\":[\"sysRole.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148886, 1808020075098148880, '授权用户', 3, NULL, NULL, NULL, NULL, NULL, 2, NULL, '{\"menuCode\":\"formSysRole:fragmentSysRoleUser:addUserRole\",\"permCodeList\":[\"sysRole.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148887, 1808020075098148880, '移除用户', 3, NULL, NULL, NULL, NULL, NULL, 3, NULL, '{\"menuCode\":\"formSysRole:fragmentSysRoleUser:deleteUserRole\",\"permCodeList\":[\"sysRole.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148889, 1808020012825317379, '数据权限管理', 2, NULL, NULL, NULL, NULL, NULL, 1, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148890, 1808020012825317379, '用户授权', 2, NULL, NULL, NULL, NULL, NULL, 2, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148891, 1808020075098148889, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysDataPerm:fragmentSysDataPerm\",\"permCodeList\":[\"sysDataPerm.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148892, 1808020075098148889, '新增', 3, NULL, NULL, NULL, NULL, NULL, 2, NULL, '{\"menuCode\":\"formSysDataPerm:fragmentSysDataPerm:add\",\"permCodeList\":[\"sysDataPerm.add\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148893, 1808020075098148889, '编辑', 3, NULL, NULL, NULL, NULL, NULL, 3, NULL, '{\"menuCode\":\"formSysDataPerm:fragmentSysDataPerm:update\",\"permCodeList\":[\"sysDataPerm.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148894, 1808020075098148889, '删除', 3, NULL, NULL, NULL, NULL, NULL, 4, NULL, '{\"menuCode\":\"formSysDataPerm:fragmentSysDataPerm:delete\",\"permCodeList\":[\"sysDataPerm.delete\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148895, 1808020075098148890, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysDataPerm:fragmentSysDataPermUser\",\"permCodeList\":[\"sysDataPerm.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148896, 1808020075098148890, '授权用户', 3, NULL, NULL, NULL, NULL, NULL, 2, NULL, '{\"menuCode\":\"formSysDataPerm:fragmentSysDataPermUser:addDataPermUser\",\"permCodeList\":[\"sysDataPerm.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148897, 1808020075098148890, '移除用户', 3, NULL, NULL, NULL, NULL, NULL, 3, NULL, '{\"menuCode\":\"formSysDataPerm:fragmentSysDataPermUser:deleteDataPermUser\",\"permCodeList\":[\"sysDataPerm.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148899, 1808020012825317380, '岗位管理', 2, NULL, NULL, NULL, NULL, NULL, 1, NULL, '', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148900, 1808020075098148899, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysPost:fragmentSysPost\",\"permCodeList\":[\"sysPost.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148901, 1808020075098148899, '新增', 3, NULL, NULL, NULL, NULL, NULL, 2, NULL, '{\"menuCode\":\"formSysPost:fragmentSysPost:add\",\"permCodeList\":[\"sysPost.add\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148902, 1808020075098148899, '编辑', 3, NULL, NULL, NULL, NULL, NULL, 3, NULL, '{\"menuCode\":\"formSysPost:fragmentSysPost:update\",\"permCodeList\":[\"sysPost.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148903, 1808020075098148899, '删除', 3, NULL, NULL, NULL, NULL, NULL, 4, NULL, '{\"menuCode\":\"formSysPost:fragmentSysPost:delete\",\"permCodeList\":[\"sysPost.delete\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148905, 1808020012825317381, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysMenu:fragmentSysMenu\",\"permCodeList\":[\"sysMenu.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148906, 1808020012825317381, '新增', 3, NULL, NULL, NULL, NULL, NULL, 2, NULL, '{\"menuCode\":\"formSysMenu:fragmentSysMenu:add\",\"permCodeList\":[\"sysMenu.add\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148907, 1808020012825317381, '编辑', 3, NULL, NULL, NULL, NULL, NULL, 3, NULL, '{\"menuCode\":\"formSysMenu:fragmentSysMenu:update\",\"permCodeList\":[\"sysMenu.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075098148908, 1808020012825317381, '删除', 3, NULL, NULL, NULL, NULL, NULL, 4, NULL, '{\"menuCode\":\"formSysMenu:fragmentSysMenu:delete\",\"permCodeList\":[\"sysMenu.delete\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075102343171, 1808020012825317384, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysDict:fragmentSysDict\",\"permCodeList\":[\"globalDict.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075102343172, 1808020012825317384, '新增', 3, NULL, NULL, NULL, NULL, NULL, 2, NULL, '{\"menuCode\":\"formSysDict:fragmentSysDict:add\",\"permCodeList\":[\"globalDict.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075102343173, 1808020012825317384, '编辑', 3, NULL, NULL, NULL, NULL, NULL, 3, NULL, '{\"menuCode\":\"formSysDict:fragmentSysDict:update\",\"permCodeList\":[\"globalDict.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075102343174, 1808020012825317384, '删除', 3, NULL, NULL, NULL, NULL, NULL, 4, NULL, '{\"menuCode\":\"formSysDict:fragmentSysDict:delete\",\"permCodeList\":[\"globalDict.update\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075102343175, 1808020012825317384, '同步缓存', 3, NULL, NULL, NULL, NULL, NULL, 5, NULL, '{\"menuCode\":\"formSysDict:fragmentSysDict:reloadCache\",\"permCodeList\":[\"globalDict.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075102343177, 1808020012825317385, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysOperationLog:fragmentSysOperationLog\",\"permCodeList\":[\"sysOperationLog.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075102343179, 1808020012825317386, '显示', 3, NULL, NULL, NULL, NULL, NULL, 1, NULL, '{\"menuCode\":\"formSysLoginUser:fragmentLoginUser\",\"permCodeList\":[\"loginUser.view\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
INSERT INTO `zz_sys_menu` VALUES (1808020075102343180, 1808020012825317386, '强制下线', 3, NULL, NULL, NULL, NULL, NULL, 2, NULL, '{\"menuCode\":\"formSysLoginUser:fragmentLoginUser:delete\",\"permCodeList\":[\"loginUser.delete\"]}', 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00');
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_operation_log
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_operation_log`;
CREATE TABLE `zz_sys_operation_log` (
  `log_id` bigint NOT NULL COMMENT '主键Id',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '日志描述',
  `operation_type` int DEFAULT NULL COMMENT '操作类型',
  `service_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '接口所在服务名称',
  `api_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '调用的controller全类名',
  `api_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '调用的controller中的方法',
  `session_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户会话sessionId',
  `trace_id` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '每次请求的Id',
  `elapse` int DEFAULT NULL COMMENT '调用时长',
  `request_method` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'HTTP 请求方法，如GET',
  `request_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'HTTP 请求地址',
  `request_arguments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin COMMENT 'controller接口参数',
  `response_result` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'controller应答结果',
  `request_ip` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '请求IP',
  `success` bit(1) DEFAULT NULL COMMENT '应答状态',
  `error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '错误信息',
  `tenant_id` bigint DEFAULT NULL COMMENT '租户Id',
  `operator_id` bigint DEFAULT NULL COMMENT '操作员Id',
  `operator_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '操作员名称',
  `operation_time` datetime DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`log_id`),
  KEY `idx_trace_id_idx` (`trace_id`),
  KEY `idx_operation_type_idx` (`operation_type`),
  KEY `idx_operation_time_idx` (`operation_time`) USING BTREE,
  KEY `idx_success` (`success`) USING BTREE,
  KEY `idx_elapse` (`elapse`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='系统操作日志表';

-- ----------------------------
-- Table structure for zz_sys_perm_whitelist
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_perm_whitelist`;
CREATE TABLE `zz_sys_perm_whitelist` (
  `perm_url` varchar(512) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '权限资源的url',
  `module_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '权限资源所属模块名字(通常是Controller的名字)',
  `perm_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '权限的名称',
  PRIMARY KEY (`perm_url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='权限资源白名单表(认证用户均可访问的url资源)';

-- ----------------------------
-- Table structure for zz_sys_post
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_post`;
CREATE TABLE `zz_sys_post` (
  `post_id` bigint NOT NULL COMMENT '岗位Id',
  `post_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '岗位名称',
  `post_level` int NOT NULL COMMENT '岗位层级，数值越小级别越高',
  `leader_post` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否领导岗位',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `update_time` datetime NOT NULL COMMENT '最后更新时间',
  PRIMARY KEY (`post_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of zz_sys_post
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_post` VALUES (1809037927934595072, '领导岗位', 1, b'1', 1808020007993479168, '2024-07-05 09:33:47', 1808020007993479168, '2024-07-05 09:33:47');
INSERT INTO `zz_sys_post` VALUES (1809037967663042560, '普通员工', 10, b'0', 1808020007993479168, '2024-07-05 09:33:56', 1808020007993479168, '2024-07-05 09:33:56');
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_role
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_role`;
CREATE TABLE `zz_sys_role` (
  `role_id` bigint NOT NULL COMMENT '主键Id',
  `role_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '角色名称',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `update_time` datetime NOT NULL COMMENT '最后更新时间',
  PRIMARY KEY (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT COMMENT='系统角色表';

-- ----------------------------
-- Records of zz_sys_role
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_role` VALUES (1809037772728569856, '查看全部', 1808020007993479168, '2024-07-05 09:33:10', 1808020007993479168, '2024-07-05 09:33:10');
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_role_menu`;
CREATE TABLE `zz_sys_role_menu` (
  `role_id` bigint NOT NULL COMMENT '角色Id',
  `menu_id` bigint NOT NULL COMMENT '菜单Id',
  PRIMARY KEY (`role_id`,`menu_id`) USING BTREE,
  KEY `idx_menu_id` (`menu_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT COMMENT='角色与菜单对应关系表';

-- ----------------------------
-- Records of zz_sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1392786476428693504);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1392786549942259712);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1392786950682841088);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1418057714138877952);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1418057835631087616);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1418058289182150656);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1418058744037642240);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1418059005175009280);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1418059167532322816);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1418059283920064512);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1423161217970606080);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1634009076981567488);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020011080486913);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020012825317376);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020012825317377);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020012825317378);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020012825317379);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020012825317380);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020012825317381);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020012825317384);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020012825317385);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020012825317386);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148866);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148867);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148868);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148869);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148870);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148872);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148873);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148874);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148875);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148876);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148877);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148879);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148880);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148881);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148882);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148883);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148884);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148885);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148886);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148887);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148889);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148890);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148891);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148892);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148893);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148894);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148895);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148896);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148897);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148899);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148900);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148901);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148902);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148903);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148905);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148906);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148907);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075098148908);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075102343171);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075102343172);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075102343173);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075102343174);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075102343175);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075102343177);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075102343179);
INSERT INTO `zz_sys_role_menu` VALUES (1809037772728569856, 1808020075102343180);
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_user
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_user`;
CREATE TABLE `zz_sys_user` (
  `user_id` bigint NOT NULL COMMENT '主键Id',
  `login_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户登录名称',
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '密码',
  `show_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户显示名称',
  `dept_id` bigint NOT NULL COMMENT '用户所在部门Id',
  `head_image_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户头像的Url',
  `user_type` int NOT NULL COMMENT '用户类型(0: 管理员 1: 系统管理用户 2: 系统业务用户)',
  `user_status` int NOT NULL COMMENT '状态(0: 正常 1: 锁定)',
  `email` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户邮箱',
  `mobile` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户手机',
  `create_user_id` bigint NOT NULL COMMENT '创建者Id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user_id` bigint NOT NULL COMMENT '更新者Id',
  `update_time` datetime NOT NULL COMMENT '最后更新时间',
  `deleted_flag` int NOT NULL COMMENT '删除标记(1: 正常 -1: 已删除)',
  PRIMARY KEY (`user_id`) USING BTREE,
  UNIQUE KEY `uk_login_name` (`login_name`) USING BTREE,
  KEY `idx_dept_id` (`dept_id`) USING BTREE,
  KEY `idx_status` (`user_status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT COMMENT='系统用户表';

-- ----------------------------
-- Records of zz_sys_user
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_user` VALUES (1808020007993479168, 'admin', '$2a$10$C1/DwnlXP3s.HOFsmL60Resq0juaRt6/WK8JCzcNbgbpueUMs71Um', '管理员', 1808020008341606402, NULL, 0, 0, NULL, NULL, 1808020007993479168, '2024-07-03 00:00:00', 1808020007993479168, '2024-07-03 00:00:00', 1);
INSERT INTO `zz_sys_user` VALUES (1809038124504846336, 'userA', '$2a$10$perpVEYWNTE0.oP0C7L5beiv1EYs3XEn0qkgOKwB8Rm7p/BDGYLEa', '员工A', 1808020008341606402, NULL, 2, 0, NULL, NULL, 1808020007993479168, '2024-07-05 09:34:34', 1809038124504846336, '2024-07-05 10:23:44', 1);
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_user_post
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_user_post`;
CREATE TABLE `zz_sys_user_post` (
  `user_id` bigint NOT NULL COMMENT '用户Id',
  `dept_post_id` bigint NOT NULL COMMENT '部门岗位Id',
  `post_id` bigint NOT NULL COMMENT '岗位Id',
  PRIMARY KEY (`user_id`,`dept_post_id`) USING BTREE,
  KEY `idx_post_id` (`post_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of zz_sys_user_post
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_user_post` VALUES (1809038124504846336, 1809038003968937984, 1809037967663042560);
COMMIT;

-- ----------------------------
-- Table structure for zz_sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `zz_sys_user_role`;
CREATE TABLE `zz_sys_user_role` (
  `user_id` bigint NOT NULL COMMENT '用户Id',
  `role_id` bigint NOT NULL COMMENT '角色Id',
  PRIMARY KEY (`user_id`,`role_id`) USING BTREE,
  KEY `idx_role_id` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT COMMENT='用户与角色对应关系表';

-- ----------------------------
-- Records of zz_sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `zz_sys_user_role` VALUES (1809038124504846336, 1809037772728569856);
COMMIT;

-- ----------------------------
-- Table structure for zz_test_flow_leave
-- ----------------------------
DROP TABLE IF EXISTS `zz_test_flow_leave`;
CREATE TABLE `zz_test_flow_leave` (
  `id` bigint NOT NULL COMMENT '主键Id',
  `user_id` bigint NOT NULL COMMENT '请假用户Id',
  `leave_reason` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '请假原因',
  `leave_type` int NOT NULL COMMENT '请假类型',
  `leave_begin_time` datetime NOT NULL COMMENT '请假开始时间',
  `leave_end_time` datetime NOT NULL COMMENT '请假结束时间',
  `apply_time` datetime NOT NULL COMMENT '申请时间',
  `approval_status` int DEFAULT NULL COMMENT '最后审批状态',
  `flow_status` int DEFAULT NULL COMMENT '流程状态',
  `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户名',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of zz_test_flow_leave
-- ----------------------------
BEGIN;
INSERT INTO `zz_test_flow_leave` VALUES (1734132261424467969, 1440911410581213417, '测试', 1, '2023-12-11 00:00:00', '2024-01-02 00:00:00', '2023-12-11 16:45:24', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1734132937084899329, 1440911410581213417, '测试', 1, '2023-12-11 00:00:00', '2024-01-10 00:00:00', '2023-12-11 16:48:05', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1734760286021226497, 1440911410581213417, '22', 2, '2023-12-12 00:00:00', '2023-12-14 00:00:00', '2023-12-13 10:20:57', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1735571074717847553, 1440911410581213417, '123', 1, '2023-12-07 00:00:00', '2023-12-08 00:00:00', '2023-12-15 16:02:44', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1735644235845079041, 1440911410581213417, '111', 1, '2023-12-14 00:00:00', '2023-12-16 00:00:00', '2023-12-15 20:53:27', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1735959007710941185, 1440911410581213417, '123123', 2, '2023-12-16 00:00:00', '2023-12-22 00:00:00', '2023-12-16 17:44:15', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1736002626216005633, 1440911410581213417, '213213', 1, '2023-12-15 00:00:00', '2024-01-18 00:00:00', '2023-12-16 20:37:34', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1736249711238582272, 1440911410581213417, 'qqq', 2, '2023-12-15 00:00:00', '2024-01-17 00:00:00', '2023-12-17 12:59:24', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1736653319645958144, 1440911410581213417, '呃呃呃', 1, '2023-12-18 00:00:00', '2023-12-20 00:00:00', '2023-12-18 15:43:12', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1736916738529824769, 1440911410581213417, '请假', 2, '2023-12-21 00:00:00', '2023-12-23 00:00:00', '2023-12-19 09:09:55', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737101008917499905, 1440911410581213417, 'fff', 3, '2023-12-19 00:00:00', '2023-12-20 00:00:00', '2023-12-19 21:22:09', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737314824108380161, 1440911410581213417, '有事', 1, '2023-12-01 00:00:00', '2023-12-09 00:00:00', '2023-12-20 11:31:46', NULL, 3, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737358381695373313, 1440911410581213417, '123', 2, '2023-12-13 00:00:00', '2024-01-19 00:00:00', '2023-12-20 14:24:51', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737615175483133953, 1440911410581213417, '尴尬', 1, '2023-12-21 00:00:00', '2023-12-22 00:00:00', '2023-12-21 07:25:16', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737641283461058561, 1440911410581213417, '测试', 1, '2023-12-21 00:00:00', '2023-12-28 00:00:00', '2023-12-21 09:09:00', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737646632062685184, 1440911410581213417, '风复古', 1, '2023-12-22 00:00:00', '2023-12-22 00:00:00', '2023-12-21 09:30:16', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737661659834486784, 1440911410581213417, '想咋就咋', 3, '2023-12-22 00:00:00', '2023-12-22 00:00:00', '2023-12-21 10:29:59', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737662716845232128, 1440911410581213417, '黑胡椒', 1, '2023-12-18 00:00:00', '2023-12-22 00:00:00', '2023-12-21 10:34:11', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737666820992667648, 1440911410581213417, '111', 1, '2023-12-22 00:00:00', '2023-12-20 00:00:00', '2023-12-21 10:50:29', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737666823148539905, 1440911410581213417, '111', 1, '2023-12-22 00:00:00', '2023-12-20 00:00:00', '2023-12-21 10:50:30', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737666824016760833, 1440911410581213417, '111', 1, '2023-12-22 00:00:00', '2023-12-20 00:00:00', '2023-12-21 10:50:30', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737666824809484289, 1440911410581213417, '111', 1, '2023-12-22 00:00:00', '2023-12-20 00:00:00', '2023-12-21 10:50:30', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1737747164756447233, 1440911410581213417, 'c', 1, '2023-12-23 00:00:00', '2024-01-13 00:00:00', '2023-12-21 16:09:45', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1738557159815254017, 1440911410581213417, '测试新增', 2, '2023-12-22 00:00:00', '2024-01-12 00:00:00', '2023-12-23 21:48:22', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1738586314833399809, 1440911410581213417, '轻机枪', 1, '2023-12-22 00:00:00', '2023-12-29 00:00:00', '2023-12-23 23:44:13', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1738590302731505665, 1440911410581213417, '测试', 2, '2023-12-23 00:00:00', '2024-01-04 00:00:00', '2023-12-24 00:00:04', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1738593079201370113, 1440911410581213417, '测试', 1, '2024-01-04 00:00:00', '2024-01-11 00:00:00', '2023-12-24 00:11:06', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1738597715752783872, 1440911410581213417, '消息 抄送发', 1, '2023-12-13 00:00:00', '2024-01-25 00:00:00', '2023-12-24 00:29:32', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1738598397780168705, 1440911410581213417, ' 额', 1, '2023-12-13 00:00:00', '2023-12-13 00:00:00', '2023-12-24 00:32:14', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1738614127170949120, 1440911410581213417, '超市那个', 1, '2023-12-13 00:00:00', '2023-12-24 00:00:00', '2023-12-24 01:34:44', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1739529776575549440, 1440911410581213417, '33232', 1, '2023-12-07 00:00:00', '2024-01-16 00:00:00', '2023-12-26 14:13:12', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1739534951415549952, 1440911410581213417, '111', 1, '2024-01-25 00:00:00', '2024-01-27 00:00:00', '2023-12-26 14:33:46', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1739860694376910849, 1440911410581213417, '111', 1, '2023-12-27 00:00:00', '2023-12-28 00:00:00', '2023-12-27 12:08:09', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1740031035300646913, 1440911410581213417, '测试抄送', 1, '2024-01-03 00:00:00', '2024-01-11 00:00:00', '2023-12-27 23:25:02', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1741067028283789313, 1440911410581213417, '测试抄送', 1, '2023-12-29 00:00:00', '2024-02-08 00:00:00', '2023-12-30 20:01:42', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1741068565080969217, 1440911410581213417, '亲近抄送', 1, '2024-02-08 00:00:00', '2024-01-19 00:00:00', '2023-12-30 20:07:48', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1741075078512119809, 1440911410581213417, '测试抄送', 1, '2023-12-30 00:00:00', '2024-01-26 00:00:00', '2023-12-30 20:33:41', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1741077243179831297, 1440911410581213417, '测试抄送', 1, '2023-12-30 00:00:00', '2024-01-12 00:00:00', '2023-12-30 20:42:17', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1741082898645127169, 1440911410581213417, '11111', 1, '2023-12-13 00:00:00', '2023-12-29 00:00:00', '2023-12-30 21:04:45', NULL, 3, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1742075427653947392, 1440911410581213417, '6666', 1, '2024-01-02 00:00:00', '2024-01-27 00:00:00', '2024-01-02 14:48:43', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1743138899498110977, 1440911410581213417, '2222', 1, '2024-01-10 00:00:00', '2024-01-10 00:00:00', '2024-01-05 13:14:34', NULL, 3, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1743236528957558784, 1440911410581213417, 'dsfsadffsdf', 1, '2024-01-09 00:00:00', '2024-01-31 00:00:00', '2024-01-05 19:42:31', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1743236847603027968, 1440911410581213417, 'sdfaff', 1, '2024-01-11 00:00:00', '2024-02-06 00:00:00', '2024-01-05 19:43:47', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1743236894344351745, 1440911410581213417, 'dsfsdfasdf', 1, '2024-01-11 00:00:00', '2024-02-14 00:00:00', '2024-01-05 19:43:58', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1743236965743988737, 1440911410581213417, 'zxczxc', 1, '2024-01-20 00:00:00', '2024-02-12 00:00:00', '2024-01-05 19:44:15', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1743529562567872512, 1440911410581213417, '休息', 1, '2024-01-12 00:00:00', '2024-01-13 00:00:00', '2024-01-06 15:06:56', NULL, 3, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1743570048200478721, 1440911410581213417, '是一款．．是，', 1, '2024-01-07 00:00:00', '2024-01-31 00:00:00', '2024-01-06 17:47:48', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1743847321545740288, 1440911410581213417, '测试请假', 3, '2024-01-08 00:00:00', '2024-01-24 00:00:00', '2024-01-07 12:09:35', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1743848671104995328, 1440911410581213417, '请假新增测试', 1, '2024-01-15 00:00:00', '2024-01-16 00:00:00', '2024-01-07 12:14:57', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1743894439526404097, 1440911410581213417, '测试', 2, '2024-01-07 00:00:00', '2024-01-24 00:00:00', '2024-01-07 15:16:49', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1745342183466078208, 1440911410581213417, 'asdfasdf', 1, '2024-01-02 00:00:00', '2024-02-02 00:00:00', '2024-01-11 15:09:38', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1745343819995418625, 1440911410581213417, 'adfasd', 1, '2024-01-06 00:00:00', '2024-02-06 00:00:00', '2024-01-11 15:16:08', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1745639100335001600, 1440911410581213417, '1234', 1, '2024-01-12 00:00:00', '2024-01-19 00:00:00', '2024-01-12 10:49:29', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1745641568804540417, 1440911410581213417, '123', 1, '2024-01-12 00:00:00', '2024-01-19 00:00:00', '2024-01-12 10:59:17', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1746710995184652289, 1440911410581213417, '11111111111111', 3, '2024-01-16 00:00:00', '2024-01-25 00:00:00', '2024-01-15 09:48:48', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1746821158071701504, 1440911410581213417, 'sfasdf', 1, '2024-02-14 00:00:00', '2024-02-16 00:00:00', '2024-01-15 17:06:33', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1747175673463574529, 1440911410581213417, '1111', 1, '2024-01-16 00:00:00', '2024-01-17 00:00:00', '2024-01-16 16:35:16', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1784199563469393920, 1779777400603676672, '111', 1, '2024-04-01 00:00:00', '2024-04-04 00:00:00', '2024-04-27 20:34:59', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1784202480981118976, 1779777400603676672, '请假', 1, '2024-04-22 00:00:00', '2024-04-24 00:00:00', '2024-04-27 20:46:35', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1784211196795162625, 1779777400603676672, '请假三天', 1, '2024-04-02 00:00:00', '2024-04-05 00:00:00', '2024-04-27 21:21:13', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1784221100561928192, 1779777400603676672, '请假出去玩', 1, '2024-04-08 00:00:00', '2024-04-15 00:00:00', '2024-04-27 22:00:34', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1784556947194777601, 1779777400603676672, '111', 1, '2024-04-03 00:00:00', '2024-04-11 00:00:00', '2024-04-28 20:15:06', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1785508179405180928, 1779777400603676672, '11', 1, '2024-05-08 00:00:00', '2024-05-10 00:00:00', '2024-05-01 11:14:58', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1787771104035606528, 1779777400603676672, '111', 1, '2024-05-07 00:00:00', '2024-05-08 00:00:00', '2024-05-07 17:07:01', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1787771998559014913, 1779777400603676672, '2222', 1, '2024-05-07 00:00:00', '2024-05-15 00:00:00', '2024-05-07 17:10:34', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1787817506019217408, 1779777400603676672, '111', 1, '2024-05-08 00:00:00', '2024-05-16 00:00:00', '2024-05-07 20:11:24', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1787852380893614081, 1779777400603676672, '1111', 1, '2024-05-14 00:00:00', '2024-05-08 00:00:00', '2024-05-07 22:29:59', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1787853112791273472, 1779777400603676672, '1111', 1, '2024-05-08 00:00:00', '2024-05-16 00:00:00', '2024-05-07 22:32:53', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1788107566534889472, 1779777400603676672, '111', 1, '2024-05-08 00:00:00', '2024-05-09 00:00:00', '2024-05-08 15:24:00', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1788112135096635392, 1779777400603676672, '111', 1, '2024-05-08 00:00:00', '2024-05-09 00:00:00', '2024-05-08 15:42:09', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1788112525678612480, 1779777400603676672, '1111', 2, '2024-05-09 00:00:00', '2024-05-10 00:00:00', '2024-05-08 15:43:42', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1788741582820741120, 1779777400603676672, '秀', 2, '2024-05-07 00:00:00', '2024-05-08 00:00:00', '2024-05-10 09:23:21', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1791767263255203841, 1779777400603676672, '1111', 1, '2024-05-20 00:00:00', '2024-05-21 00:00:00', '2024-05-18 17:46:20', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1792492440158998528, 1779777400603676672, '111222', 2, '2024-05-07 00:00:00', '2024-05-22 00:00:00', '2024-05-20 17:47:55', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1792829634757267456, 1779777400603676672, '1111', 2, '2024-05-14 00:00:00', '2024-05-15 00:00:00', '2024-05-21 16:07:49', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1793489840575090688, 1779777400603676672, '1111', 1, '2024-05-16 00:00:00', '2024-05-24 00:00:00', '2024-05-23 11:51:14', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1795696352311644160, 1779777400603676672, 'dd', 1, '2024-05-02 00:00:00', '2024-05-10 00:00:00', '2024-05-29 13:59:07', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1795992839696420865, 1779777400603676672, 'admin', 1, '2024-05-02 00:00:00', '2024-05-18 00:00:00', '2024-05-30 09:37:16', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1795994391077195776, 1779777400603676672, '1111222', 1, '2024-05-15 00:00:00', '2024-05-16 00:00:00', '2024-05-30 09:43:25', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796109769098924033, 1779777400603676672, '1111', 1, '2024-05-08 00:00:00', '2024-05-10 00:00:00', '2024-05-30 17:21:54', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796110123517612032, 1779777400603676672, '1111222', 1, '2024-05-16 00:00:00', '2024-05-18 00:00:00', '2024-05-30 17:23:18', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796164077765005312, 1779777400603676672, 'admin', 1, '2024-05-10 00:00:00', '2024-06-05 00:00:00', '2024-05-30 20:57:42', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796164941607079936, 1779777400603676672, 'admin', 1, '2024-05-17 00:00:00', '2024-06-12 00:00:00', '2024-05-30 21:01:08', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796173926594777088, 1779777400603676672, 'dd', 1, '2024-05-10 00:00:00', '2024-05-09 00:00:00', '2024-05-30 21:36:50', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796178444468359168, 1779777400603676672, 'x', 1, '2024-05-14 00:00:00', '2024-05-15 00:00:00', '2024-05-30 21:54:47', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796181839363182593, 1779777400603676672, '111', 1, '2024-05-16 00:00:00', '2024-06-18 00:00:00', '2024-05-30 22:08:17', NULL, 4, 'admin');
INSERT INTO `zz_test_flow_leave` VALUES (1796182559164469249, 1779777400603676672, '4444', 1, '2024-05-08 00:00:00', '2024-05-10 00:00:00', '2024-05-30 22:11:08', NULL, 4, 'admin');
INSERT INTO `zz_test_flow_leave` VALUES (1796183035536740352, 1779777400603676672, 'dd', 1, '2024-05-18 00:00:00', '2024-05-11 00:00:00', '2024-05-30 22:13:02', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796183248754184192, 1779777400603676672, '11', 1, '2024-05-07 00:00:00', '2024-05-08 00:00:00', '2024-05-30 22:13:53', NULL, 5, 'userTJ2');
INSERT INTO `zz_test_flow_leave` VALUES (1796185777676226560, 1779777400603676672, 'd', 1, '2024-05-09 00:00:00', '2024-05-09 00:00:00', '2024-05-30 22:23:56', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796187020805017600, 1779777400603676672, 'd', 1, '2024-05-03 00:00:00', '2024-05-03 00:00:00', '2024-05-30 22:28:52', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796188059113361408, 1779777400603676672, 'd', 1, '2024-05-17 00:00:00', '2024-05-17 00:00:00', '2024-05-30 22:33:00', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796188876033757184, 1779777400603676672, 'dd', 1, '2024-05-02 00:00:00', '2024-05-02 00:00:00', '2024-05-30 22:36:14', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796189604152348672, 1779777400603676672, 'dd', 1, '2024-05-03 00:00:00', '2024-05-03 00:00:00', '2024-05-30 22:39:08', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796190467956674560, 1779777400603676672, 'dd', 1, '2024-05-10 00:00:00', '2024-05-16 00:00:00', '2024-05-30 22:42:34', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796191454335340544, 1779777400603676672, 'jk', 1, '2024-05-10 00:00:00', '2024-05-02 00:00:00', '2024-05-30 22:46:29', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796192461547114496, 1779777400603676672, 'd', 1, '2024-05-02 00:00:00', '2024-05-09 00:00:00', '2024-05-30 22:50:29', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796195394187694080, 1779777400603676672, 'dd', 1, '2024-05-03 00:00:00', '2024-05-10 00:00:00', '2024-05-30 23:02:08', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796197180806008832, 1779777400603676672, 'ddd', 1, '2024-05-10 00:00:00', '2024-05-10 00:00:00', '2024-05-30 23:09:14', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796201309611757568, 1779777400603676672, 'dd', 1, '2024-05-17 00:00:00', '2024-05-17 00:00:00', '2024-05-30 23:25:39', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796202010052136960, 1779777400603676672, 'dd', 1, '2024-05-03 00:00:00', '2024-05-03 00:00:00', '2024-05-30 23:28:26', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796204072726958080, 1779777400603676672, 'd', 1, '2024-05-10 00:00:00', '2024-05-10 00:00:00', '2024-05-30 23:36:37', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796354567839944704, 1779777400603676672, 'admin', 1, '2024-05-17 00:00:00', '2024-06-13 00:00:00', '2024-05-31 09:34:38', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796361013583417344, 1779777400603676672, 'admin', 1, '2024-05-11 00:00:00', '2024-06-10 00:00:00', '2024-05-31 10:00:15', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1796442194475749377, 1779777400603676672, 'd', 1, '2024-05-10 00:00:00', '2024-06-06 00:00:00', '2024-05-31 15:22:50', NULL, 4, 'admin');
INSERT INTO `zz_test_flow_leave` VALUES (1796453212681670656, 1779777400603676672, 'admin', 1, '2024-05-18 00:00:00', '2024-06-10 00:00:00', '2024-05-31 16:06:37', NULL, 4, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1797540170921152512, 1779777400603676672, '111', 1, '2024-06-04 00:00:00', '2024-06-06 00:00:00', '2024-06-03 16:05:48', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1799012020255723520, 1779777400603676672, '1111', 1, '2024-06-12 00:00:00', '2024-06-14 00:00:00', '2024-06-07 17:34:24', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1800522684333821952, 1779777400603676672, '111', 1, '2024-06-12 00:00:00', '2024-06-12 00:00:00', '2024-06-11 21:37:15', NULL, 5, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1800529322327412736, 1799417106157015040, '1111', 1, '2024-06-13 00:00:00', '2024-06-19 00:00:00', '2024-06-11 22:03:37', NULL, NULL, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1807764854329577473, 1779777400603676672, '111', 1, '2024-07-02 00:00:00', '2024-07-11 00:00:00', '2024-07-01 21:15:03', 11, 1, NULL);
INSERT INTO `zz_test_flow_leave` VALUES (1809146480452177920, 1808020007993479168, '111', 1, '2024-07-05 00:00:00', '2024-07-08 00:00:00', '2024-07-05 16:45:08', NULL, NULL, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
