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)  NULL DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `EXECUTION_ID_` varchar(64)  NULL DEFAULT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `TIME_STAMP_` timestamp NOT NULL,
  `USER_ID_` varchar(255)  NULL DEFAULT NULL,
  `DATA_` longblob NULL,
  `LOCK_OWNER_` varchar(255)  NULL DEFAULT NULL,
  `LOCK_TIME_` timestamp NULL DEFAULT NULL,
  `IS_PROCESSED_` tinyint NULL DEFAULT 0,
  PRIMARY KEY (`LOG_NR_`) USING BTREE
);

-- ----------------------------
-- Records of act_evt_log
-- ----------------------------

-- ----------------------------
-- Table structure for act_ge_bytearray
-- ----------------------------
DROP TABLE IF EXISTS `act_ge_bytearray`;
CREATE TABLE `act_ge_bytearray`  (
  `ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `NAME_` varchar(255)  NULL DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(64)  NULL DEFAULT NULL,
  `BYTES_` longblob NULL,
  `GENERATED_` tinyint NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_FK_BYTEARR_DEPL`(`DEPLOYMENT_ID_` ASC) USING BTREE,
  CONSTRAINT `ACT_FK_BYTEARR_DEPL` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_re_deployment` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT
);

-- ----------------------------
-- Records of act_ge_bytearray
-- ----------------------------

-- ----------------------------
-- Table structure for act_ge_property
-- ----------------------------
DROP TABLE IF EXISTS `act_ge_property`;
CREATE TABLE `act_ge_property`  (
  `NAME_` varchar(64)  NOT NULL,
  `VALUE_` varchar(300)  NULL DEFAULT NULL,
  `REV_` int NULL DEFAULT NULL,
  PRIMARY KEY (`NAME_`) USING BTREE
);

-- ----------------------------
-- Records of act_ge_property
-- ----------------------------
INSERT INTO `act_ge_property` VALUES ('next.dbid', '1', 1);
INSERT INTO `act_ge_property` VALUES ('schema.history', 'create(5.22.0.0)', 1);
INSERT INTO `act_ge_property` VALUES ('schema.version', '5.22.0.0', 1);

-- ----------------------------
-- Table structure for act_hi_actinst
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_actinst`;
CREATE TABLE `act_hi_actinst`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_DEF_ID_` varchar(64)  NOT NULL,
  `PROC_INST_ID_` varchar(64)  NOT NULL,
  `EXECUTION_ID_` varchar(64)  NOT NULL,
  `ACT_ID_` varchar(255)  NOT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `CALL_PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `ACT_NAME_` varchar(255)  NULL DEFAULT NULL,
  `ACT_TYPE_` varchar(255)  NOT NULL,
  `ASSIGNEE_` varchar(255)  NULL DEFAULT NULL,
  `START_TIME_` datetime NOT NULL,
  `END_TIME_` datetime NULL DEFAULT NULL,
  `DURATION_` bigint NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255)  NULL DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_IDX_HI_ACT_INST_START`(`START_TIME_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_ACT_INST_END`(`END_TIME_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_ACT_INST_PROCINST`(`PROC_INST_ID_` ASC, `ACT_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_ACT_INST_EXEC`(`EXECUTION_ID_` ASC, `ACT_ID_` ASC) USING BTREE
);

-- ----------------------------
-- Records of act_hi_actinst
-- ----------------------------

-- ----------------------------
-- Table structure for act_hi_attachment
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_attachment`;
CREATE TABLE `act_hi_attachment`  (
  `ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `USER_ID_` varchar(255)  NULL DEFAULT NULL,
  `NAME_` varchar(255)  NULL DEFAULT NULL,
  `DESCRIPTION_` varchar(4000)  NULL DEFAULT NULL,
  `TYPE_` varchar(255)  NULL DEFAULT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `URL_` varchar(4000)  NULL DEFAULT NULL,
  `CONTENT_ID_` varchar(64)  NULL DEFAULT NULL,
  `TIME_` datetime NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
);

-- ----------------------------
-- Records of act_hi_attachment
-- ----------------------------

-- ----------------------------
-- Table structure for act_hi_comment
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_comment`;
CREATE TABLE `act_hi_comment`  (
  `ID_` varchar(64)  NOT NULL,
  `TYPE_` varchar(255)  NULL DEFAULT NULL,
  `TIME_` datetime NOT NULL,
  `USER_ID_` varchar(255)  NULL DEFAULT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `ACTION_` varchar(255)  NULL DEFAULT NULL,
  `MESSAGE_` varchar(4000)  NULL DEFAULT NULL,
  `FULL_MSG_` longblob NULL,
  PRIMARY KEY (`ID_`) USING BTREE
);

-- ----------------------------
-- Records of act_hi_comment
-- ----------------------------

-- ----------------------------
-- Table structure for act_hi_detail
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_detail`;
CREATE TABLE `act_hi_detail`  (
  `ID_` varchar(64)  NOT NULL,
  `TYPE_` varchar(255)  NOT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `EXECUTION_ID_` varchar(64)  NULL DEFAULT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `ACT_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `NAME_` varchar(255)  NOT NULL,
  `VAR_TYPE_` varchar(255)  NULL DEFAULT NULL,
  `REV_` int NULL DEFAULT NULL,
  `TIME_` datetime NOT NULL,
  `BYTEARRAY_ID_` varchar(64)  NULL DEFAULT NULL,
  `DOUBLE_` double NULL DEFAULT NULL,
  `LONG_` bigint NULL DEFAULT NULL,
  `TEXT_` varchar(4000)  NULL DEFAULT NULL,
  `TEXT2_` varchar(4000)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_IDX_HI_DETAIL_PROC_INST`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_DETAIL_ACT_INST`(`ACT_INST_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_DETAIL_TIME`(`TIME_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_DETAIL_NAME`(`NAME_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_DETAIL_TASK_ID`(`TASK_ID_` ASC) USING BTREE
);

-- ----------------------------
-- Records of act_hi_detail
-- ----------------------------

-- ----------------------------
-- Table structure for act_hi_identitylink
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_identitylink`;
CREATE TABLE `act_hi_identitylink`  (
  `ID_` varchar(64)  NOT NULL,
  `GROUP_ID_` varchar(255)  NULL DEFAULT NULL,
  `TYPE_` varchar(255)  NULL DEFAULT NULL,
  `USER_ID_` varchar(255)  NULL DEFAULT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_IDX_HI_IDENT_LNK_USER`(`USER_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_IDENT_LNK_TASK`(`TASK_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_IDENT_LNK_PROCINST`(`PROC_INST_ID_` ASC) USING BTREE
);

-- ----------------------------
-- Records of act_hi_identitylink
-- ----------------------------

-- ----------------------------
-- Table structure for act_hi_procinst
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_procinst`;
CREATE TABLE `act_hi_procinst`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_INST_ID_` varchar(64)  NOT NULL,
  `BUSINESS_KEY_` varchar(255)  NULL DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64)  NOT NULL,
  `START_TIME_` datetime NOT NULL,
  `END_TIME_` datetime NULL DEFAULT NULL,
  `DURATION_` bigint NULL DEFAULT NULL,
  `START_USER_ID_` varchar(255)  NULL DEFAULT NULL,
  `START_ACT_ID_` varchar(255)  NULL DEFAULT NULL,
  `END_ACT_ID_` varchar(255)  NULL DEFAULT NULL,
  `SUPER_PROCESS_INSTANCE_ID_` varchar(64)  NULL DEFAULT NULL,
  `DELETE_REASON_` varchar(4000)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255)  NULL DEFAULT '',
  `NAME_` varchar(255)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  UNIQUE INDEX `PROC_INST_ID_`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_PRO_INST_END`(`END_TIME_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_PRO_I_BUSKEY`(`BUSINESS_KEY_` ASC) USING BTREE
);

-- ----------------------------
-- Records of act_hi_procinst
-- ----------------------------

-- ----------------------------
-- Table structure for act_hi_taskinst
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_taskinst`;
CREATE TABLE `act_hi_taskinst`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL,
  `TASK_DEF_KEY_` varchar(255)  NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `EXECUTION_ID_` varchar(64)  NULL DEFAULT NULL,
  `NAME_` varchar(255)  NULL DEFAULT NULL,
  `PARENT_TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `DESCRIPTION_` varchar(4000)  NULL DEFAULT NULL,
  `OWNER_` varchar(255)  NULL DEFAULT NULL,
  `ASSIGNEE_` varchar(255)  NULL DEFAULT NULL,
  `START_TIME_` datetime NOT NULL,
  `CLAIM_TIME_` datetime NULL DEFAULT NULL,
  `END_TIME_` datetime NULL DEFAULT NULL,
  `DURATION_` bigint NULL DEFAULT NULL,
  `DELETE_REASON_` varchar(4000)  NULL DEFAULT NULL,
  `PRIORITY_` int NULL DEFAULT NULL,
  `DUE_DATE_` datetime NULL DEFAULT NULL,
  `FORM_KEY_` varchar(255)  NULL DEFAULT NULL,
  `CATEGORY_` varchar(255)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255)  NULL DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_IDX_HI_TASK_INST_PROCINST`(`PROC_INST_ID_` ASC) USING BTREE
);

-- ----------------------------
-- Records of act_hi_taskinst
-- ----------------------------

-- ----------------------------
-- Table structure for act_hi_varinst
-- ----------------------------
DROP TABLE IF EXISTS `act_hi_varinst`;
CREATE TABLE `act_hi_varinst`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `EXECUTION_ID_` varchar(64)  NULL DEFAULT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `NAME_` varchar(255)  NOT NULL,
  `VAR_TYPE_` varchar(100)  NULL DEFAULT NULL,
  `REV_` int NULL DEFAULT NULL,
  `BYTEARRAY_ID_` varchar(64)  NULL DEFAULT NULL,
  `DOUBLE_` double NULL DEFAULT NULL,
  `LONG_` bigint NULL DEFAULT NULL,
  `TEXT_` varchar(4000)  NULL DEFAULT NULL,
  `TEXT2_` varchar(4000)  NULL DEFAULT NULL,
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `LAST_UPDATED_TIME_` datetime NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_IDX_HI_PROCVAR_PROC_INST`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_PROCVAR_NAME_TYPE`(`NAME_` ASC, `VAR_TYPE_` ASC) USING BTREE,
  INDEX `ACT_IDX_HI_PROCVAR_TASK_ID`(`TASK_ID_` ASC) USING BTREE
);

-- ----------------------------
-- Records of act_hi_varinst
-- ----------------------------

-- ----------------------------
-- Table structure for act_procdef_info
-- ----------------------------
DROP TABLE IF EXISTS `act_procdef_info`;
CREATE TABLE `act_procdef_info`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_DEF_ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `INFO_JSON_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  UNIQUE INDEX `ACT_UNIQ_INFO_PROCDEF`(`PROC_DEF_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_INFO_PROCDEF`(`PROC_DEF_ID_` ASC) USING BTREE,
  INDEX `ACT_FK_INFO_JSON_BA`(`INFO_JSON_ID_` ASC) USING BTREE,
  CONSTRAINT `ACT_FK_INFO_JSON_BA` FOREIGN KEY (`INFO_JSON_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `ACT_FK_INFO_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT
);

-- ----------------------------
-- Records of act_procdef_info
-- ----------------------------

-- ----------------------------
-- Table structure for act_re_deployment
-- ----------------------------
DROP TABLE IF EXISTS `act_re_deployment`;
CREATE TABLE `act_re_deployment`  (
  `ID_` varchar(64)  NOT NULL,
  `NAME_` varchar(255)  NULL DEFAULT NULL,
  `CATEGORY_` varchar(255)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255)  NULL DEFAULT '',
  `DEPLOY_TIME_` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
);

-- ----------------------------
-- Records of act_re_deployment
-- ----------------------------
INSERT INTO `act_re_deployment` VALUES ('1587652788286963712', '入职流程', NULL, '-1', '2022-11-02 11:48:17');
INSERT INTO `act_re_deployment` VALUES ('1587760028532654080', '入职登记', NULL, '-1', '2022-11-02 18:54:25');
INSERT INTO `act_re_deployment` VALUES ('1587760525868056576', '表单测试', NULL, '-1', '2022-11-02 18:56:23');
INSERT INTO `act_re_deployment` VALUES ('1588450132737671168', '请假申请', NULL, '-1', '2022-11-04 16:36:38');
INSERT INTO `act_re_deployment` VALUES ('1588450213113118720', '新员工培训', NULL, '-1', '2022-11-04 16:36:57');

-- ----------------------------
-- Table structure for act_re_model
-- ----------------------------
DROP TABLE IF EXISTS `act_re_model`;
CREATE TABLE `act_re_model`  (
  `ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `NAME_` varchar(255)  NULL DEFAULT NULL,
  `KEY_` varchar(255)  NULL DEFAULT NULL,
  `CATEGORY_` varchar(255)  NULL DEFAULT NULL,
  `CREATE_TIME_` timestamp NULL DEFAULT NULL,
  `LAST_UPDATE_TIME_` timestamp NULL DEFAULT NULL,
  `VERSION_` int NULL DEFAULT NULL,
  `META_INFO_` varchar(4000)  NULL DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(64)  NULL DEFAULT NULL,
  `EDITOR_SOURCE_VALUE_ID_` varchar(64)  NULL DEFAULT NULL,
  `EDITOR_SOURCE_EXTRA_VALUE_ID_` varchar(64)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255)  NULL DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_FK_MODEL_SOURCE`(`EDITOR_SOURCE_VALUE_ID_` ASC) USING BTREE,
  INDEX `ACT_FK_MODEL_SOURCE_EXTRA`(`EDITOR_SOURCE_EXTRA_VALUE_ID_` ASC) USING BTREE,
  INDEX `ACT_FK_MODEL_DEPLOYMENT`(`DEPLOYMENT_ID_` ASC) USING BTREE,
  CONSTRAINT `ACT_FK_MODEL_DEPLOYMENT` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_re_deployment` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `ACT_FK_MODEL_SOURCE` FOREIGN KEY (`EDITOR_SOURCE_VALUE_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `ACT_FK_MODEL_SOURCE_EXTRA` FOREIGN KEY (`EDITOR_SOURCE_EXTRA_VALUE_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT
);

-- ----------------------------
-- Records of act_re_model
-- ----------------------------

-- ----------------------------
-- Table structure for act_re_procdef
-- ----------------------------
DROP TABLE IF EXISTS `act_re_procdef`;
CREATE TABLE `act_re_procdef`  (
  `ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `CATEGORY_` varchar(255)  NULL DEFAULT NULL,
  `NAME_` varchar(255)  NULL DEFAULT NULL,
  `KEY_` varchar(255)  NOT NULL,
  `VERSION_` int NOT NULL,
  `DEPLOYMENT_ID_` varchar(64)  NULL DEFAULT NULL,
  `RESOURCE_NAME_` varchar(4000)  NULL DEFAULT NULL,
  `DGRM_RESOURCE_NAME_` varchar(4000)  NULL DEFAULT NULL,
  `DESCRIPTION_` varchar(4000)  NULL DEFAULT NULL,
  `HAS_START_FORM_KEY_` tinyint NULL DEFAULT NULL,
  `HAS_GRAPHICAL_NOTATION_` tinyint NULL DEFAULT NULL,
  `SUSPENSION_STATE_` int NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255)  NULL DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  UNIQUE INDEX `ACT_UNIQ_PROCDEF`(`KEY_` ASC, `VERSION_` ASC, `TENANT_ID_` ASC) USING BTREE
);

-- ----------------------------
-- Records of act_re_procdef
-- ----------------------------

-- ----------------------------
-- Table structure for act_ru_event_subscr
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_event_subscr`;
CREATE TABLE `act_ru_event_subscr`  (
  `ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `EVENT_TYPE_` varchar(255)  NOT NULL,
  `EVENT_NAME_` varchar(255)  NULL DEFAULT NULL,
  `EXECUTION_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `ACTIVITY_ID_` varchar(64)  NULL DEFAULT NULL,
  `CONFIGURATION_` varchar(255)  NULL DEFAULT NULL,
  `CREATED_` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255)  NULL DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_IDX_EVENT_SUBSCR_CONFIG_`(`CONFIGURATION_` ASC) USING BTREE,
  INDEX `ACT_FK_EVENT_EXEC`(`EXECUTION_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_EVENT_PROCINSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  CONSTRAINT `ACT_FK_EVENT_EXEC` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT
);

-- ----------------------------
-- Records of act_ru_event_subscr
-- ----------------------------

-- ----------------------------
-- Table structure for act_ru_execution
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_execution`;
CREATE TABLE `act_ru_execution`  (
  `ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `BUSINESS_KEY_` varchar(255)  NULL DEFAULT NULL,
  `PARENT_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL,
  `SUPER_EXEC_` varchar(64)  NULL DEFAULT NULL,
  `ACT_ID_` varchar(255)  NULL DEFAULT NULL,
  `IS_ACTIVE_` tinyint NULL DEFAULT NULL,
  `IS_CONCURRENT_` tinyint NULL DEFAULT NULL,
  `IS_SCOPE_` tinyint NULL DEFAULT NULL,
  `IS_EVENT_SCOPE_` tinyint NULL DEFAULT NULL,
  `SUSPENSION_STATE_` int NULL DEFAULT NULL,
  `CACHED_ENT_STATE_` int NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255)  NULL DEFAULT '',
  `NAME_` varchar(255)  NULL DEFAULT NULL,
  `LOCK_TIME_` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_FK_EXE_PROCDEF`(`PROC_DEF_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_RUEXECUTION_PROCINSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `ACR_IDX_RUEXECUTION_PARENTID`(`PARENT_ID_` ASC) USING BTREE,
  CONSTRAINT `ACT_FK_EXE_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT
);

-- ----------------------------
-- Records of act_ru_execution
-- ----------------------------

-- ----------------------------
-- Table structure for act_ru_identitylink
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_identitylink`;
CREATE TABLE `act_ru_identitylink`  (
  `ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `GROUP_ID_` varchar(255)  NULL DEFAULT NULL,
  `TYPE_` varchar(255)  NULL DEFAULT NULL,
  `USER_ID_` varchar(255)  NULL DEFAULT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_IDX_IDENT_LNK_TASK_ID`(`TASK_ID_` ASC) USING BTREE
);

-- ----------------------------
-- Records of act_ru_identitylink
-- ----------------------------

-- ----------------------------
-- Table structure for act_ru_job
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_job`;
CREATE TABLE `act_ru_job`  (
  `ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `TYPE_` varchar(255)  NOT NULL,
  `LOCK_EXP_TIME_` timestamp NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255)  NULL DEFAULT NULL,
  `EXCLUSIVE_` tinyint(1) NULL DEFAULT NULL,
  `EXECUTION_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL,
  `RETRIES_` int NULL DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64)  NULL DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000)  NULL DEFAULT NULL,
  `DUEDATE_` timestamp NULL DEFAULT NULL,
  `REPEAT_` varchar(255)  NULL DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255)  NULL DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255)  NULL DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_FK_JOB_EXCEPTION`(`EXCEPTION_STACK_ID_` ASC) USING BTREE,
  CONSTRAINT `ACT_FK_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT
);

-- ----------------------------
-- Records of act_ru_job
-- ----------------------------

-- ----------------------------
-- Table structure for act_ru_task
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_task`;
CREATE TABLE `act_ru_task`  (
  `ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `EXECUTION_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL,
  `NAME_` varchar(255)  NULL DEFAULT NULL,
  `PARENT_TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `DESCRIPTION_` varchar(4000)  NULL DEFAULT NULL,
  `TASK_DEF_KEY_` varchar(255)  NULL DEFAULT NULL,
  `OWNER_` varchar(255)  NULL DEFAULT NULL,
  `ASSIGNEE_` varchar(255)  NULL DEFAULT NULL,
  `DELEGATION_` varchar(64)  NULL DEFAULT NULL,
  `PRIORITY_` int NULL DEFAULT NULL,
  `CREATE_TIME_` timestamp NULL DEFAULT NULL,
  `DUE_DATE_` datetime NULL DEFAULT NULL,
  `CATEGORY_` varchar(255)  NULL DEFAULT NULL,
  `SUSPENSION_STATE_` int NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255)  NULL DEFAULT '',
  `FORM_KEY_` varchar(255)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_IDX_TASK_CREATE`(`CREATE_TIME_` ASC) USING BTREE,
  INDEX `ACT_IDX_TASK_PARENTID`(`PARENT_TASK_ID_` ASC) USING BTREE,
  INDEX `ACT_FK_TASK_EXE`(`EXECUTION_ID_` ASC) USING BTREE,
  INDEX `ACT_IDX_RUTASK_PROCINSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  CONSTRAINT `ACT_FK_TASK_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE ON UPDATE RESTRICT
);

-- ----------------------------
-- Records of act_ru_task
-- ----------------------------

-- ----------------------------
-- Table structure for act_ru_variable
-- ----------------------------
DROP TABLE IF EXISTS `act_ru_variable`;
CREATE TABLE `act_ru_variable`  (
  `ID_` varchar(64)  NOT NULL,
  `REV_` int NULL DEFAULT NULL,
  `TYPE_` varchar(255)  NOT NULL,
  `NAME_` varchar(255)  NOT NULL,
  `EXECUTION_ID_` varchar(64)  NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `BYTEARRAY_ID_` varchar(64)  NULL DEFAULT NULL,
  `DOUBLE_` double NULL DEFAULT NULL,
  `LONG_` bigint NULL DEFAULT NULL,
  `TEXT_` varchar(4000)  NULL DEFAULT NULL,
  `TEXT2_` varchar(4000)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `ACT_IDX_VARIABLE_TASK_ID`(`TASK_ID_` ASC) USING BTREE,
  INDEX `ACT_FK_VAR_EXE`(`EXECUTION_ID_` ASC) USING BTREE,
  INDEX `ACT_FK_VAR_PROCINST`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `ACT_FK_VAR_BYTEARRAY`(`BYTEARRAY_ID_` ASC) USING BTREE,
  CONSTRAINT `ACT_FK_VAR_BYTEARRAY` FOREIGN KEY (`BYTEARRAY_ID_`) REFERENCES `act_ge_bytearray` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `ACT_FK_VAR_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `ACT_FK_VAR_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE ON UPDATE RESTRICT
);

-- ----------------------------
-- Records of act_ru_variable
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_agent_condition
-- ----------------------------
DROP TABLE IF EXISTS `bpm_agent_condition`;
CREATE TABLE `bpm_agent_condition`  (
  `ID_` varchar(64)  NOT NULL,
  `SETTING_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '设定ID',
  `CONDITION_DESC_` varchar(128)  NULL DEFAULT NULL COMMENT '条件描述',
  `CONDITION_` varchar(4000)  NULL DEFAULT NULL COMMENT '条件',
  `AGENT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '代理人ID',
  `AGENT_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '代理人',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_AGENT_SETTINGID`(`SETTING_ID_` ASC) USING BTREE
)COMMENT = '流程代理条件';

-- ----------------------------
-- Records of bpm_agent_condition
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_agent_def
-- ----------------------------
DROP TABLE IF EXISTS `bpm_agent_def`;
CREATE TABLE `bpm_agent_def`  (
  `ID_` varchar(64)  NOT NULL,
  `SETTING_ID_` varchar(64)  NOT NULL COMMENT '设定ID',
  `FLOW_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义KEY',
  `FLOW_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '流程定义名称',
  `NODE_ID_` varchar(512)  NULL DEFAULT NULL COMMENT '节点定义ID(为空的情况,如果指定ID,那么代理只在这些ID的任务生效)',
  `NODE_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '节点名称',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_AGENTDEF_FLOWKEY`(`FLOW_KEY_` ASC) USING BTREE
)COMMENT = '代理指定流程';

-- ----------------------------
-- Records of bpm_agent_def
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_agent_setting
-- ----------------------------
DROP TABLE IF EXISTS `bpm_agent_setting`;
CREATE TABLE `bpm_agent_setting`  (
  `ID_` varchar(64)  NOT NULL,
  `SUBJECT_` varchar(150)  NULL DEFAULT NULL,
  `AUTH_ID_` varchar(64)  NOT NULL COMMENT '授权人ID',
  `AUTH_NAME_` varchar(64)  NOT NULL COMMENT '授权人姓名',
  `START_DATE_` datetime NULL DEFAULT NULL,
  `END_DATE_` datetime NULL DEFAULT NULL,
  `IS_ENABLED_` char(1)  NOT NULL COMMENT '是否有效',
  `AGENT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '代理人ID',
  `AGENT_` varchar(128)  NULL DEFAULT NULL COMMENT '代理人',
  `FLOW_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义KEY',
  `TYPE_` smallint NULL DEFAULT NULL COMMENT '代理类型(1,全权代理,2,部分代理,3.条件代理)',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '创建者所属组织ID',
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '更新人ID',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_AGENTSETTING_AUTHID`(`AUTH_ID_` ASC) USING BTREE,
  INDEX `IDX_AGENTSETTING_TYPE`(`TYPE_` ASC) USING BTREE,
  INDEX `IDX_AGENTSETTING_ISENABLED`(`IS_ENABLED_` ASC) USING BTREE,
  INDEX `IDX_AGENTSETTING_FLOWKEY`(`FLOW_KEY_` ASC) USING BTREE
)COMMENT = '流程代理设置';

-- ----------------------------
-- Records of bpm_agent_setting
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_approval_item
-- ----------------------------
DROP TABLE IF EXISTS `bpm_approval_item`;
CREATE TABLE `bpm_approval_item`  (
  `ID_` varchar(64)  NOT NULL,
  `USER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '用户ID',
  `DEF_KEY_` varchar(128)  NULL DEFAULT NULL COMMENT '流程定义KEY',
  `DEF_NAME_` char(10)  NULL DEFAULT NULL COMMENT '流程定义名称',
  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程分类ID',
  `TYPE_` smallint NULL DEFAULT NULL COMMENT '常用语类型\r\n默认为1=全局\r\n2=流程分类\r\n3=流程\r\n4=个人的常用语',
  `EXPRESSION_` varchar(4000)  NULL DEFAULT NULL COMMENT '常用语        多个项用回车分开',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人所属组织ID',
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '更新人ID',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_APPROVALITEM_USERID`(`USER_ID_` ASC) USING BTREE,
  INDEX `IDX_APPROVALITEM_TYPE`(`TYPE_` ASC) USING BTREE
)COMMENT = '常用语管理';

-- ----------------------------
-- Records of bpm_approval_item
-- ----------------------------
INSERT INTO `bpm_approval_item` VALUES ('6901702', '1', NULL, NULL, NULL, 4, '管理员同意', NULL, NULL, NULL, NULL, '2020-09-29 10:30:10', '-1');
INSERT INTO `bpm_approval_item` VALUES ('752469', '1', NULL, NULL, NULL, 1, '请后面的同事审批', NULL, NULL, NULL, NULL, '2020-09-29 10:30:11', '-1');
INSERT INTO `bpm_approval_item` VALUES ('752475', '1', NULL, NULL, NULL, 1, '我不同意', NULL, NULL, NULL, NULL, '2020-09-29 10:30:14', '-1');
INSERT INTO `bpm_approval_item` VALUES ('8982173', '1', NULL, NULL, NULL, 1, '确认通过', NULL, NULL, NULL, NULL, '2020-09-29 10:30:13', '-1');

-- ----------------------------
-- Table structure for bpm_approval_org
-- ----------------------------
DROP TABLE IF EXISTS `bpm_approval_org`;
CREATE TABLE `bpm_approval_org`  (
  `ID_` varchar(64)  NOT NULL,
  `APPROVAL_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '常用语',
  `POST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '岗位',
  `ROLE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '角色',
  `DEPARTMENT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '部门',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_BY_` varchar(255)  NULL DEFAULT NULL,
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '常用语组织';

-- ----------------------------
-- Records of bpm_approval_org
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_auto_start_conf
-- ----------------------------
DROP TABLE IF EXISTS `bpm_auto_start_conf`;
CREATE TABLE `bpm_auto_start_conf`  (
  `ID_` varchar(64)  NOT NULL COMMENT 'ID',
  `DEF_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义key',
  `START_USER_` text  NULL COMMENT '启动用户',
  `FORM_DATA_` text  NULL COMMENT '表单数据',
  `TRIGGER_` varchar(512)  NULL DEFAULT NULL COMMENT '触发器',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户id',
  `trigger_name_` varchar(100)  NULL DEFAULT NULL COMMENT '触发器key',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '流程自动发起配置表';

-- ----------------------------
-- Records of bpm_auto_start_conf
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_bloom
-- ----------------------------
DROP TABLE IF EXISTS `bpm_bloom`;
CREATE TABLE `bpm_bloom`  (
  `ID_` varchar(64)  NOT NULL COMMENT '主键',
  `BLOOM_BYTES_` longblob NULL COMMENT '布隆过滤器的数据',
  `CODE_` varchar(255)  NULL DEFAULT NULL COMMENT '编码，做唯一记录识别',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '布隆过滤器数据表';

-- ----------------------------
-- Records of bpm_bloom
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_bus_link
-- ----------------------------
DROP TABLE IF EXISTS `bpm_bus_link`;
CREATE TABLE `bpm_bus_link`  (
  `ID_` varchar(64)  NOT NULL,
  `DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义ID',
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `BUSINESSKEY_` bigint NULL DEFAULT NULL COMMENT '业务键',
  `BUSINESSKEY_STR_` varchar(64)  NULL DEFAULT NULL COMMENT '业务键字符型',
  `SYS_CODE_` varchar(64)  NULL DEFAULT NULL COMMENT '业务系统编码',
  `FORM_IDENTIFY_` varchar(64)  NOT NULL COMMENT '表单标识',
  `START_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '发起人',
  `STARTOR_` varchar(128)  NULL DEFAULT NULL COMMENT '发起人',
  `CREATE_DATE_` datetime NULL DEFAULT NULL,
  `START_GROUP_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '发起组织ID',
  `START_GROUP_` varchar(128)  NULL DEFAULT NULL COMMENT '发起组织',
  `IS_MAIN_` smallint NULL DEFAULT NULL COMMENT '主记录',
  `BO_DEF_CODE_` varchar(64)  NULL DEFAULT NULL COMMENT 'bodefcode数据',
  `SAVE_MODE_` varchar(50)  NULL DEFAULT NULL COMMENT '保存模式 (boObject,database)',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_BUSLINK_INSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_BUSLINK_BUSINESSKEY`(`BUSINESSKEY_STR_` ASC) USING BTREE
)COMMENT = '流程实例与业务数据关系表，每一条记录对应业务的物理表，属于物理表的额外属性';

-- ----------------------------
-- Records of bpm_bus_link
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_call_log
-- ----------------------------
DROP TABLE IF EXISTS `bpm_call_log`;
CREATE TABLE `bpm_call_log`  (
  `ID_` varchar(64)  NOT NULL,
  `SUBJECT_` varchar(600)  NULL DEFAULT NULL COMMENT ' 流程标题',
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT ' 流程定义ID',
  `PROC_DEF_KEY_` varchar(128)  NULL DEFAULT NULL COMMENT '流程定义Key',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `SUP_INST_ID_` varchar(64)  NULL DEFAULT '0' COMMENT '父流程实例ID',
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `TASK_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '任务定义Key',
  `TASK_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '任务名称',
  `USER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '调用人员ID',
  `EVENT_TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT '事件类型',
  `URL_` varchar(255)  NULL DEFAULT NULL COMMENT '调用地址',
  `DESC_` varchar(255)  NULL DEFAULT NULL COMMENT '接口描述',
  `INVOKE_MODE_` int NULL DEFAULT NULL COMMENT '接口调用模式:0:同步，1:异步',
  `IS_SUCCESS_` smallint NULL DEFAULT 0 COMMENT '是否调用成功',
  `RESPONSE_` longtext  NULL COMMENT '调用结果',
  `CALL_TIME_` datetime NULL DEFAULT NULL,
  `PARAMS_` text  NULL COMMENT '请求参数',
  `HEADER_` varchar(2000)  NULL DEFAULT NULL,
  `RETRY_COUNT_` int NULL DEFAULT NULL COMMENT '重试次数',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `elapsed_time_` decimal(10, 3) NULL DEFAULT NULL COMMENT '接口耗时（单位：秒）',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_CALLLOG_CALLTIME`(`CALL_TIME_` ASC) USING BTREE
)COMMENT = 'restful接口调用日志';

-- ----------------------------
-- Records of bpm_call_log
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_check_opinion
-- ----------------------------
DROP TABLE IF EXISTS `bpm_check_opinion`;
CREATE TABLE `bpm_check_opinion`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT '流程定义ID',
  `SUP_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父流程实例ID',
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '流程实例ID',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `TASK_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '任务定义Key',
  `TASK_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '任务名称',
  `TOKEN_` varchar(64)  NULL DEFAULT NULL COMMENT '任务令牌',
  `QUALFIEDS_` text  NULL COMMENT '有审批资格用户ID串',
  `QUALFIED_NAMES_` text  NULL COMMENT '有审批资格用户名称串',
  `AUDITOR_` varchar(64)  NULL DEFAULT NULL COMMENT '执行人ID',
  `AUDITOR_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '执行人名',
  `ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '组织ID',
  `ORG_PATH_` varchar(600)  NULL DEFAULT NULL COMMENT '组织全路径',
  `OPINION_` varchar(4000)  NULL DEFAULT NULL COMMENT '审批意见',
  `STATUS_` varchar(40)  NOT NULL COMMENT '审批状态。start=发起流程；awaiting_check=待审批；agree=同意；against=反对；return=驳回；abandon=弃权；retrieve=追回',
  `FORM_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '表单定义ID',
  `FORM_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '表单名',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `ASSIGN_TIME_` datetime NULL DEFAULT NULL,
  `COMPLETE_TIME_` datetime NULL DEFAULT NULL,
  `DUR_MS_` bigint NULL DEFAULT NULL,
  `FILES_` text  NULL DEFAULT NULL COMMENT '附件',
  `INTERPOSE_` smallint NULL DEFAULT NULL COMMENT '是否干预',
  `IS_DELE_` int NOT NULL DEFAULT 0 COMMENT '是否已删，1已删除，0未删除',
  `IS_READ_` int NOT NULL DEFAULT 0 COMMENT '0：待阅，1：已阅',
  `AGENT_LEADER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '被代理的领导人id',
  `PROP1_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性1',
  `PROP2_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性2',
  `PROP3_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性3',
  `PROP4_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性4',
  `PROP5_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性5',
  `PROP6_` text  NULL COMMENT '扩展属性6',
  `Z_FILES_` varchar(1000)  NULL DEFAULT NULL COMMENT '正文附件',
  `FORM_DATA_` longtext  NULL,
  `PARENT_TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父任务id',
  `SIGN_TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT '任务类型',
  `SKIP_TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT '跳过类型 启动跳过 审批跳过 执行人为空跳过 相同执行人跳过',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `QUALFIEDS_ACCOUNT_` text  NULL COMMENT '有审批资格用户帐号串',
  `AUDITOR_ACCOUNT_` varchar(255)  NULL DEFAULT NULL COMMENT '实际审判人',
  `VARS_` longtext  NULL COMMENT '流程变量',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_OPINION_AUDITOR`(`AUDITOR_` ASC) USING BTREE,
  INDEX `IDX_OPINION_INSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_OPINION_TASK`(`TASK_ID_` ASC) USING BTREE,
  INDEX `IDX_CHECKOPINION_SUPINSTID`(`SUP_INST_ID_` ASC) USING BTREE
)COMMENT = '流程审批意见';

-- ----------------------------
-- Records of bpm_check_opinion
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_check_opinion_hi
-- ----------------------------
DROP TABLE IF EXISTS `bpm_check_opinion_hi`;
CREATE TABLE `bpm_check_opinion_hi`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT '流程定义ID',
  `SUP_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父流程实例ID',
  `PROC_INST_ID_` varchar(64)  NOT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `TASK_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '任务定义Key',
  `TASK_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '任务名称',
  `TOKEN_` varchar(64)  NULL DEFAULT NULL COMMENT '任务令牌',
  `QUALFIEDS_` text  NULL COMMENT '有审批资格用户ID串',
  `QUALFIED_NAMES_` text  NULL COMMENT '有审批资格用户名称串',
  `AUDITOR_` varchar(64)  NULL DEFAULT NULL COMMENT '执行人ID',
  `AUDITOR_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '执行人名',
  `ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '组织ID',
  `ORG_PATH_` varchar(600)  NULL DEFAULT NULL COMMENT '组织全路径',
  `OPINION_` varchar(4000)  NULL DEFAULT NULL COMMENT '审批意见',
  `STATUS_` varchar(40)  NOT NULL COMMENT '审批状态。start=发起流程；create=任务创建；agree=同意；against=反对；return=驳回；abandon=弃权；retrieve=追回',
  `FORM_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '表单定义ID',
  `FORM_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '表单名',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `ASSIGN_TIME_` datetime NULL DEFAULT NULL,
  `COMPLETE_TIME_` datetime NULL DEFAULT NULL,
  `DUR_MS_` bigint NULL DEFAULT NULL COMMENT '持续时间(ms)',
  `FILES_` varchar(4000)  NULL DEFAULT NULL,
  `INTERPOSE_` smallint NULL DEFAULT NULL,
  `PROP1_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性1',
  `PROP2_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性2',
  `PROP3_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性3',
  `PROP4_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性4',
  `PROP5_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性5',
  `PROP6_` text  NULL COMMENT '扩展属性6',
  `Z_FILES_` varchar(1000)  NULL DEFAULT NULL COMMENT '正文附件',
  `FORM_DATA_` text  NULL,
  `PARENT_TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父任务id',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_OPINIONHI_PROCINSTID`(`PROC_INST_ID_` ASC) USING BTREE
)COMMENT = '流程审批意见历史';

-- ----------------------------
-- Records of bpm_check_opinion_hi
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_check_record
-- ----------------------------
DROP TABLE IF EXISTS `bpm_check_record`;
CREATE TABLE `bpm_check_record`  (
  `ID_` varchar(64)  NOT NULL COMMENT '主键',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户ID',
  `CREATE_TIME_` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务id',
  `INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '实例id',
  `create_org_id_` varchar(64)  NULL DEFAULT NULL,
  `update_by_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '任务阅读记录';

-- ----------------------------
-- Records of bpm_check_record
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_commu_receiver
-- ----------------------------
DROP TABLE IF EXISTS `bpm_commu_receiver`;
CREATE TABLE `bpm_commu_receiver`  (
  `ID_` varchar(64)  NOT NULL,
  `COMMU_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '通知ID',
  `RECEIVER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '接收人ID',
  `RECEIVER` varchar(128)  NULL DEFAULT NULL COMMENT '接收人',
  `STATUS_` varchar(20)  NULL DEFAULT NULL COMMENT '状态',
  `OPINION_` varchar(512)  NULL DEFAULT NULL COMMENT '反馈意见',
  `RECEIVE_TIME_` datetime NULL DEFAULT NULL,
  `FEEDBACK_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_COMMURECEIVER_COMMUID`(`COMMU_ID_` ASC) USING BTREE,
  INDEX `IDX_COMMURECEIVER_RECEIVERID`(`RECEIVER_ID_` ASC) USING BTREE
)COMMENT = '任务通知接收人';

-- ----------------------------
-- Records of bpm_commu_receiver
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_cpto_receiver
-- ----------------------------
DROP TABLE IF EXISTS `bpm_cpto_receiver`;
CREATE TABLE `bpm_cpto_receiver`  (
  `ID_` varchar(64)  NOT NULL,
  `CPTO_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '关联ID',
  `RECEIVER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '接收人ID',
  `RECEIVER_` varchar(64)  NULL DEFAULT NULL COMMENT '接收人',
  `IS_READ_` smallint NULL DEFAULT NULL COMMENT '已读',
  `READ_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_CPTORECEIVER_CPTOID`(`CPTO_ID_` ASC) USING BTREE,
  INDEX `IDX_CPTORECEIVER_RECEIVERID`(`RECEIVER_ID_` ASC) USING BTREE
)COMMENT = '抄送接收人';

-- ----------------------------
-- Records of bpm_cpto_receiver
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_custom_signdata
-- ----------------------------
DROP TABLE IF EXISTS `bpm_custom_signdata`;
CREATE TABLE `bpm_custom_signdata`  (
  `ID_` varchar(64)  NOT NULL,
  `TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT '任务类型（并签，顺签，并批）',
  `STATUS_` varchar(64)  NULL DEFAULT NULL COMMENT '审批中，完成，二次并签，被撤回，撤回审批中，撤回无待办',
  `PARENT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父id',
  `PATH_` varchar(3000)  NULL DEFAULT NULL COMMENT '路径',
  `INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '实例id',
  `NODE_ID_` varchar(128)  NULL DEFAULT NULL COMMENT '节点id',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务id',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_CUSTOM_SIGN_PARENTID`(`PARENT_ID_` ASC) USING BTREE,
  INDEX `IDX_CUSTOM_SIGN_TYPE`(`TYPE_` ASC) USING BTREE,
  INDEX `IDX_CUSTOM_SIGN_TASKID`(`TASK_ID_` ASC) USING BTREE,
  INDEX `IDX_CUSTOM_SIGN_INSTID`(`INST_ID_` ASC) USING BTREE
)COMMENT = '并行签署';

-- ----------------------------
-- Records of bpm_custom_signdata
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_def_act
-- ----------------------------
DROP TABLE IF EXISTS `bpm_def_act`;
CREATE TABLE `bpm_def_act`  (
  `ID_` varchar(64)  NOT NULL,
  `AUTHORIZE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程授权主表ID',
  `DEF_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '授权流程KEY',
  `DEF_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '授权流程名称',
  `RIGHT_CONTENT_` varchar(128)  NULL DEFAULT NULL COMMENT '授权内容',
  `TYPE_` varchar(64)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_AUTHDEF_AUTHID`(`AUTHORIZE_ID_` ASC) USING BTREE
)COMMENT = '流程授权流程定义';

-- ----------------------------
-- Records of bpm_def_act
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_def_auth_type
-- ----------------------------
DROP TABLE IF EXISTS `bpm_def_auth_type`;
CREATE TABLE `bpm_def_auth_type`  (
  `ID_` varchar(64)  NOT NULL,
  `AUTHORIZE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程授权主表ID',
  `AUTHORIZE_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '流程授权类型定义（management）、启动（start）、实例（instance）和任务（task）',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_AUTHTYPE_AUTHID`(`AUTHORIZE_ID_` ASC) USING BTREE,
  INDEX `IDX_AUTHTYPE_AUTHTYPE`(`AUTHORIZE_TYPE_` ASC) USING BTREE
)COMMENT = '流程授权类型';

-- ----------------------------
-- Records of bpm_def_auth_type
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_def_authorize
-- ----------------------------
DROP TABLE IF EXISTS `bpm_def_authorize`;
CREATE TABLE `bpm_def_authorize`  (
  `ID_` varchar(64)  NOT NULL,
  `AUTHORIZE_DESC_` varchar(255)  NULL DEFAULT NULL COMMENT '流程授权说明',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATOR_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `MULTI_PLE` varchar(64)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '流程授权主表';

-- ----------------------------
-- Records of bpm_def_authorize
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_def_data
-- ----------------------------
DROP TABLE IF EXISTS `bpm_def_data`;
CREATE TABLE `bpm_def_data`  (
  `ID_` varchar(64)  NOT NULL,
  `DEF_XML_` longtext  NULL,
  `BPMN_XML_` longtext  NULL COMMENT '流程定义XML',
  `DEF_JSON_` longtext  NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '流程定义XML数据';

-- ----------------------------
-- Records of bpm_def_data
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_def_user
-- ----------------------------
DROP TABLE IF EXISTS `bpm_def_user`;
CREATE TABLE `bpm_def_user`  (
  `ID_` varchar(64)  NOT NULL,
  `AUTHORIZE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程授权主表ID',
  `OWNER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '授权对象ID',
  `OWNER_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '授权对象名称',
  `RIGHT_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '授权对象类型(角色,用户,岗位等)',
  `OBJ_TYPE_` varchar(64)  NULL DEFAULT NULL,
  `AUTH_ORG_` varchar(255)  NULL DEFAULT NULL,
  `AUTH_ORG_NAME_` varchar(255)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_DEFUSER_AUTHID`(`AUTHORIZE_ID_` ASC) USING BTREE,
  INDEX `IDX_DEFUSER_RIGHTTYPE`(`RIGHT_TYPE_` ASC) USING BTREE,
  INDEX `IDX_DEFUSER_OBJTYPE`(`OBJ_TYPE_` ASC) USING BTREE
)COMMENT = '流程授权中用户';

-- ----------------------------
-- Records of bpm_def_user
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_definition
-- ----------------------------
DROP TABLE IF EXISTS `bpm_definition`;
CREATE TABLE `bpm_definition`  (
  `DEF_ID_` varchar(64)  NOT NULL COMMENT '流程定义ID',
  `NAME_` varchar(64)  NOT NULL COMMENT '流程名称',
  `DEF_KEY_` varchar(64)  NOT NULL COMMENT '流程定义KEY',
  `DESC_` varchar(1024)  NULL DEFAULT NULL COMMENT '流程描述',
  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '所属分类ID',
  `STATUS_` varchar(40)  NOT NULL COMMENT '状态。草稿、发布、禁用',
  `TEST_STATUS_` varchar(40)  NOT NULL COMMENT '测试状态',
  `BPMN_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'BPMN - 流程定义ID',
  `BPMN_DEPLOY_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'BPMN - 流程发布ID',
  `VERSION_` int NULL DEFAULT NULL COMMENT '版本 - 当前版本号',
  `MAIN_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '版本 - 主版本流程ID',
  `IS_MAIN_` char(1)  NOT NULL COMMENT '版本 - 是否主版本',
  `REASON_` varchar(1024)  NULL DEFAULT NULL COMMENT '版本 - 变更理由',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '创建者所属组织ID',
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '更新人ID',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `DESIGNER_` varchar(20)  NULL DEFAULT NULL COMMENT '设计器类型',
  `SUPPORT_MOBILE_` int NULL DEFAULT 0 COMMENT '支持手机表单',
  `REV_` int NOT NULL DEFAULT 1 COMMENT '关联锁',
  `SHOW_URGENT_STATE_` int NULL DEFAULT NULL COMMENT '是否显示紧急状态',
  `IS_READ_REVOKE` varchar(64)  NULL DEFAULT NULL COMMENT '传阅已阅是否允许撤回',
  `URGENT_MAIL_TEL` text  NULL COMMENT '人工催办内容邮件模板',
  `URGENT_SMS_TEL` text  NULL COMMENT '人工催办内容短信模板',
  `TYPE_NAME_` varchar(64)  NULL DEFAULT NULL,
  `SHOW_MODIFY_RECORD_` int NULL DEFAULT NULL COMMENT '是否显示表单留痕',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `MOBILE_START_URL_` varchar(200)  NULL DEFAULT NULL COMMENT '手机端启动地址',
  `PC_START_URL_` varchar(200)  NULL DEFAULT NULL COMMENT 'pc端启动地址',
  `TAGS_` varchar(400)  NULL DEFAULT NULL COMMENT '流程标签',
  `DESIGN_PATTERN_` varchar(20)  NULL DEFAULT NULL COMMENT '设计模式 normal simple',
  `FLOW_TYPE_` int NULL DEFAULT NULL COMMENT '流程类型',
  `DEPLOY_DESC_` varchar(500)  NULL DEFAULT NULL COMMENT '发布说明',
  PRIMARY KEY (`DEF_ID_`) USING BTREE,
  INDEX `IDX_DEFINITION_DEFKEY`(`DEF_KEY_` ASC) USING BTREE,
  INDEX `IDX_DEFINITION_BPMNDEFID`(`BPMN_DEF_ID_` ASC) USING BTREE
)COMMENT = '流程定义';

-- ----------------------------
-- Records of bpm_definition
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_deputy
-- ----------------------------
DROP TABLE IF EXISTS `bpm_deputy`;
CREATE TABLE `bpm_deputy`  (
  `ID_` varchar(64)  NOT NULL,
  `USER_ID_` varchar(64)  NOT NULL COMMENT '被代理人id',
  `USER_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '被代理人姓名',
  `AGENT_ID_` varchar(64)  NOT NULL COMMENT '代理人id',
  `AGENT_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '代理人姓名',
  `IS_MAIL_` int NULL DEFAULT 1 COMMENT '是否接收邮件(1:接收，0：不接收)',
  `IS_USABLE_` int NULL DEFAULT 1 COMMENT '是否可用（1：启用，0：禁用）',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_DEPUTY_USERID`(`USER_ID_` ASC) USING BTREE,
  INDEX `IDX_DEPUTY_AGENTID`(`AGENT_ID_` ASC) USING BTREE
)COMMENT = '流程代理表';

-- ----------------------------
-- Records of bpm_deputy
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_documentation_config
-- ----------------------------
DROP TABLE IF EXISTS `bpm_documentation_config`;
CREATE TABLE `bpm_documentation_config`  (
  `ID_` varchar(255)  NOT NULL,
  `DATA_KEY_` varchar(255)  NULL DEFAULT NULL COMMENT '数据源key',
  `AUTORUN_` varchar(10)  NULL DEFAULT NULL COMMENT '是否自动执行',
  `AUTORUN_CONFIG_` varchar(255)  NULL DEFAULT NULL COMMENT '自动执行配置',
  `DELETE_DATA_` varchar(10)  NULL DEFAULT NULL COMMENT '是否删除数据',
  `LIMIT_` varchar(10)  NULL DEFAULT NULL COMMENT '是否限制数据',
  `LIMIT_NUMBER_` varchar(255)  NULL DEFAULT NULL COMMENT '限制数量',
  `UPDATE_BY_` varchar(255)  NULL DEFAULT NULL COMMENT '修改人',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `BEFORE_MONTH_` varchar(10)  NULL DEFAULT NULL COMMENT '同步时间',
  `JOB_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '定时任务名称',
  `TENANT_ID_` varchar(255)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '数据归档配置表';

-- ----------------------------
-- Records of bpm_documentation_config
-- ----------------------------
INSERT INTO `bpm_documentation_config` VALUES ('1', NULL, '1', '{\"type\":4,\"timeInterval\":\"MON,TUE,WED,SUN|11:49:20\"}', '2', '1', '500', '1', '2023-03-23 15:46:12', '0', '流程归档数据同步', '-1');

-- ----------------------------
-- Table structure for bpm_documentation_table
-- ----------------------------
DROP TABLE IF EXISTS `bpm_documentation_table`;
CREATE TABLE `bpm_documentation_table`  (
  `ID_` varchar(255)  NOT NULL,
  `TABLE_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '表名',
  `DML_` text  NULL COMMENT '表查询语句',
  `DDL_` text  NULL COMMENT '表定义语句',
  `SYSTEM_` varchar(10)  NULL DEFAULT NULL COMMENT '是否系统默认表',
  `START_` varchar(255)  NULL DEFAULT NULL COMMENT '是否启动',
  `INFO_` varchar(255)  NULL DEFAULT NULL COMMENT '说明',
  `ORDER_` varchar(255)  NULL DEFAULT NULL COMMENT '同步顺序',
  `UPDATE_BY_` varchar(255)  NULL DEFAULT NULL COMMENT '创建人',
  `PARENT_FIELD_` varchar(255)  NULL DEFAULT NULL COMMENT '主表字段',
  `FIELD_` varchar(255)  NULL DEFAULT NULL COMMENT '子表字段',
  `TIME_KEY_` varchar(255)  NULL DEFAULT NULL COMMENT '同步表时间字段',
  `PARENT_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '父表id',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `TENANT_ID_` varchar(255)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '同步数据目标表';

-- ----------------------------
-- Records of bpm_documentation_table
-- ----------------------------
INSERT INTO `bpm_documentation_table` VALUES ('1644250277726375936', 'bpm_pro_inst', '', 'CREATE TABLE `bpm_pro_inst`  (\n  `ID_` varchar(64)  NOT NULL,\n  `SUBJECT_` varchar(256)  NULL DEFAULT NULL,\n  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT \'流程定义ID\',\n  `BPMN_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'BPMN流程定义ID\',\n  `PROC_DEF_KEY_` varchar(128)  NULL DEFAULT NULL COMMENT \'流程定义Key\',\n  `PROC_DEF_NAME_` varchar(128)  NOT NULL COMMENT \'流程名称\',\n  `BIZ_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT \'业务主键\',\n  `SYS_CODE_` varchar(64)  NULL DEFAULT NULL COMMENT \'业务系统编码\',\n  `FORM_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT \'绑定的表单主键\',\n  `STATUS_` varchar(40)  NULL DEFAULT NULL COMMENT \'实例状态\',\n  `END_TIME_` datetime(0) NULL DEFAULT NULL,\n  `DURATION_` bigint(0) NULL DEFAULT NULL COMMENT \'持续时间(ms)\',\n  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'所属分类ID\',\n  `RESULT_TYPE_` varchar(40)  NULL DEFAULT NULL COMMENT \'流程结束后的最终审批结果，agree=同意；refuse=拒绝\',\n  `BPMN_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'BPMN流程实例ID\',\n  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT \'创建人ID\',\n  `CREATE_TIME_` datetime(0) NULL DEFAULT NULL,\n  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'创建者所属组织ID\',\n  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT \'更新人ID\',\n  `UPDATE_TIME_` datetime(0) NULL DEFAULT NULL,\n  `IS_FORMMAL_` char(1)  NOT NULL COMMENT \'是否正式数据\',\n  `PARENT_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'父实例Id\',\n  `IS_FORBIDDEN_` smallint(0) NULL DEFAULT NULL COMMENT \'禁止\',\n  `DATA_MODE_` varchar(20)  NULL DEFAULT NULL COMMENT \'业务数据存储模式。\\r\\npk:主键\\r\\nbo:业务对象\',\n  `CREATOR_` varchar(64)  NULL DEFAULT NULL COMMENT \'创建人\',\n  `SUPPORT_MOBILE_` int(0) NULL DEFAULT 0 COMMENT \'支持手机端\',\n  `SUPER_NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'子流程节点的ID\',\n  `IS_DELE_` int(0) NOT NULL DEFAULT 0 COMMENT \'是否已删，1已删除，0未删除\',\n  `URGENT_STATE_` varchar(64)  NULL DEFAULT NULL COMMENT \'紧急状态\',\n  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,\n  `MOBILE_INST_URL_` varchar(200)  NULL DEFAULT NULL COMMENT \'手机端实例地址\',\n  `PC_INST_URL_` varchar(200)  NULL DEFAULT NULL COMMENT \'pc端实例地址\',\n  `CREATE_ORG_PATH_` text  NULL,\n  `CREATE_ACCOUNT_` varchar(64)  NULL DEFAULT NULL COMMENT \'流程发起人账号\',\n  PRIMARY KEY (`ID_`) USING BTREE,\n  UNIQUE INDEX `IDX_PRO_INST_BPMNINSTID`(`BPMN_INST_ID_`) USING BTREE,\n  INDEX `IDX_PRO_INST_PROCDEFKEY`(`PROC_DEF_KEY_`) USING BTREE,\n  INDEX `IDX_PRO_INST_PROCDEFID`(`PROC_DEF_ID_`) USING BTREE\n)  COMMENT = \'流程实例\';', '1', '1', NULL, '1', '1', NULL, NULL, 'UPDATE_TIME_', '0', '2023-04-14 10:04:31', '-1');
INSERT INTO `bpm_documentation_table` VALUES ('1644251197944090624', 'bpm_bus_link', NULL, 'CREATE TABLE `bpm_bus_link`  (\n  `ID_` varchar(64)  NOT NULL,\n  `DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'流程定义ID\',\n  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'流程实例ID\',\n  `BUSINESSKEY_` bigint(0) NULL DEFAULT NULL COMMENT \'业务键\',\n  `BUSINESSKEY_STR_` varchar(64)  NULL DEFAULT NULL COMMENT \'业务键字符型\',\n  `SYS_CODE_` varchar(64)  NULL DEFAULT NULL COMMENT \'业务系统编码\',\n  `FORM_IDENTIFY_` varchar(64)  NOT NULL COMMENT \'表单标识\',\n  `START_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'发起人\',\n  `STARTOR_` varchar(128)  NULL DEFAULT NULL COMMENT \'发起人\',\n  `CREATE_DATE_` datetime(0) NULL DEFAULT NULL,\n  `START_GROUP_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'发起组织ID\',\n  `START_GROUP_` varchar(128)  NULL DEFAULT NULL COMMENT \'发起组织\',\n  `IS_MAIN_` smallint(0) NULL DEFAULT NULL COMMENT \'主记录\',\n  `BO_DEF_CODE_` varchar(64)  NULL DEFAULT NULL COMMENT \'bodefcode数据\',\n  `SAVE_MODE_` varchar(50)  NULL DEFAULT NULL COMMENT \'保存模式 (boObject,database)\',\n  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,\n  PRIMARY KEY (`ID_`) USING BTREE,\n  INDEX `IDX_BUSLINK_INSTID`(`PROC_INST_ID_`) USING BTREE,\n  INDEX `IDX_BUSLINK_BUSINESSKEY`(`BUSINESSKEY_STR_`) USING BTREE\n)  COMMENT = \'流程实例与业务数据关系表，每一条记录对应业务的物理表，属于物理表的额外属性\';\n', '1', '0', NULL, '1', '1', 'id_', 'PROC_INST_ID_', NULL, '1644250277726375936', '2023-04-07 16:10:09', '-1');
INSERT INTO `bpm_documentation_table` VALUES ('1644251940189097984', 'bpm_pro_status', NULL, 'CREATE TABLE `bpm_pro_status`  (\n  `ID_` varchar(64)  NOT NULL,\n  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT \'流程实例ID\',\n  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT \'ACT流程定义ID\',\n  `NODE_ID_` varchar(255)  NOT NULL COMMENT \'节点ID\',\n  `NODE_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT \'节点名称\',\n  `STATUS_` varchar(50)  NOT NULL COMMENT \'状态\',\n  `LAST_UPDATE_` datetime(0) NULL DEFAULT NULL,\n  `LAST_USERID_` varchar(64)  NULL DEFAULT NULL COMMENT \'最后更新人\',\n  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,\n  `RECYCLE_NODE_` varchar(2)  NULL DEFAULT NULL COMMENT \'驳回按流程图执行回收的节点 0默认值  1因为驳回按照流程图执行目标节点之后的节点为1，如果重新运行到该节点变为0\',\n  PRIMARY KEY (`ID_`) USING BTREE,\n  INDEX `IDX_PROSTATUS_INSTID`(`PROC_INST_ID_`) USING BTREE,\n  INDEX `IDX_PROSTATUS_NODEID`(`NODE_ID_`) USING BTREE\n)  COMMENT = \'流程节点审批状态\';', '1', '0', NULL, '2', '1', 'id_', 'PROC_INST_ID_', NULL, '1644250277726375936', '2023-04-07 16:13:06', '-1');
INSERT INTO `bpm_documentation_table` VALUES ('1644252316812431360', 'bpm_check_opinion', NULL, 'CREATE TABLE `bpm_check_opinion`  (\n  `ID_` varchar(64)  NOT NULL,\n  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT \'流程定义ID\',\n  `SUP_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'父流程实例ID\',\n  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT \'流程实例ID\',\n  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'任务ID\',\n  `TASK_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT \'任务定义Key\',\n  `TASK_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT \'任务名称\',\n  `TOKEN_` varchar(64)  NULL DEFAULT NULL COMMENT \'任务令牌\',\n  `QUALFIEDS_` text  NULL COMMENT \'有审批资格用户ID串\',\n  `QUALFIED_NAMES_` text  NULL COMMENT \'有审批资格用户名称串\',\n  `AUDITOR_` varchar(64)  NULL DEFAULT NULL COMMENT \'执行人ID\',\n  `AUDITOR_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT \'执行人名\',\n  `ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'组织ID\',\n  `ORG_PATH_` varchar(600)  NULL DEFAULT NULL COMMENT \'组织全路径\',\n  `OPINION_` varchar(4000)  NULL DEFAULT NULL COMMENT \'审批意见\',\n  `STATUS_` varchar(40)  NOT NULL COMMENT \'审批状态。start=发起流程；awaiting_check=待审批；agree=同意；against=反对；return=驳回；abandon=弃权；retrieve=追回\',\n  `FORM_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'表单定义ID\',\n  `FORM_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT \'表单名\',\n  `CREATE_TIME_` datetime(0) NULL DEFAULT NULL,\n  `ASSIGN_TIME_` datetime(0) NULL DEFAULT NULL,\n  `COMPLETE_TIME_` datetime(0) NULL DEFAULT NULL,\n  `DUR_MS_` bigint(0) NULL DEFAULT NULL,\n  `FILES_` varchar(4000)  NULL DEFAULT NULL COMMENT \'附件\',\n  `INTERPOSE_` smallint(0) NULL DEFAULT NULL COMMENT \'是否干预\',\n  `IS_DELE_` int(0) NOT NULL DEFAULT 0 COMMENT \'是否已删，1已删除，0未删除\',\n  `IS_READ_` int(0) NOT NULL DEFAULT 0 COMMENT \'0：待阅，1：已阅\',\n  `AGENT_LEADER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'被代理的领导人id\',\n  `PROP1_` varchar(200)  NULL DEFAULT NULL COMMENT \'扩展属性1\',\n  `PROP2_` varchar(200)  NULL DEFAULT NULL COMMENT \'扩展属性2\',\n  `PROP3_` varchar(200)  NULL DEFAULT NULL COMMENT \'扩展属性3\',\n  `PROP4_` varchar(200)  NULL DEFAULT NULL COMMENT \'扩展属性4\',\n  `PROP5_` varchar(200)  NULL DEFAULT NULL COMMENT \'扩展属性5\',\n  `PROP6_` text  NULL COMMENT \'扩展属性6\',\n  `Z_FILES_` varchar(1000)  NULL DEFAULT NULL COMMENT \'正文附件\',\n  `FORM_DATA_` longtext  NULL,\n  `PARENT_TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'父任务id\',\n  `SIGN_TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT \'任务类型\',\n  `SKIP_TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT \'跳过类型 启动跳过 审批跳过 执行人为空跳过 相同执行人跳过\',\n  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,\n  `QUALFIEDS_ACCOUNT_` text  NULL COMMENT \'有审批资格用户帐号串\',\n  `AUDITOR_ACCOUNT_` varchar(255)  NULL DEFAULT NULL COMMENT \'实际审判人\',\n  `VARS_` longtext  NULL COMMENT \'流程变量\',\n  PRIMARY KEY (`ID_`) USING BTREE,\n  INDEX `IDX_OPINION_AUDITOR`(`AUDITOR_`) USING BTREE,\n  INDEX `IDX_OPINION_INSTID`(`PROC_INST_ID_`) USING BTREE,\n  INDEX `IDX_OPINION_TASK`(`TASK_ID_`) USING BTREE,\n  INDEX `IDX_CHECKOPINION_SUPINSTID`(`SUP_INST_ID_`) USING BTREE\n)  COMMENT = \'流程审批意见\';\n', '1', '0', NULL, '3', '1', 'id_', 'proc_inst_id_', NULL, '1644250277726375936', '2023-04-07 16:15:43', '-1');
INSERT INTO `bpm_documentation_table` VALUES ('1644253067093725184', 'bpm_exe_stack', NULL, 'CREATE TABLE `bpm_exe_stack`  (\n  `ID_` varchar(64)  NOT NULL,\n  `PRCO_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'流程定义ID\',\n  `NODE_ID_` varchar(64)  NOT NULL COMMENT \'节点ID\',\n  `NODE_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT \'节点名\',\n  `START_TIME_` datetime(0) NULL DEFAULT NULL,\n  `END_TIME` datetime(0) NULL DEFAULT NULL,\n  `IS_MULITI_TASK_` smallint(0) NOT NULL COMMENT \'多实例任务\\r\\n1=是\\r\\n0=否\',\n  `PARENT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'父ID\',\n  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'流程实例ID\',\n  `NODE_PATH_` varchar(1024)  NULL DEFAULT NULL COMMENT \'节点路径\\r\\n格式如：\\r\\n0.1.2.\\r\\n其中2则为本行记录的主键值\',\n  `DEPTH_` smallint(0) NULL DEFAULT NULL COMMENT \'节点层\',\n  `TASK_TOKEN_` varchar(255)  NULL DEFAULT NULL COMMENT \'是针对分发任务时，携带的令牌，方便查找其父任务堆栈\',\n  `NODE_TYPE_` varchar(255)  NULL DEFAULT NULL COMMENT \'节点类型\',\n  `TARGET_NODE_` varchar(200)  NULL DEFAULT NULL COMMENT \'驳回时返回节点\',\n  `TARGET_TOKEN_` varchar(255)  NULL DEFAULT NULL,\n  `INTERPOSE_` smallint(0) NULL DEFAULT NULL COMMENT \'是否干预执行\',\n  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,\n  PRIMARY KEY (`ID_`) USING BTREE,\n  INDEX `IDX_EXESTACK_INSTID`(`PROC_INST_ID_`) USING BTREE\n)  COMMENT = \'流程执行堆栈树\';', '1', '0', NULL, '4', '1', 'id_', 'PROC_INST_ID_', NULL, '1644250277726375936', '2023-04-14 10:04:54', '-1');
INSERT INTO `bpm_documentation_table` VALUES ('1644254426346016768', 'bpm_flow_mq_log', NULL, 'CREATE TABLE `bpm_flow_mq_log`  (\n  `ID_` varchar(64)  NOT NULL COMMENT \'主键\',\n  `TYPE_` varchar(40)  NOT NULL COMMENT \'类型\',\n  `TITLE_` varchar(300)  NULL DEFAULT NULL COMMENT \'标题\',\n  `CONTENT_` text  NULL COMMENT \'内容\',\n  `STATUS_` int(0) NOT NULL COMMENT \'状态\',\n  `TRY_TIME_` int(0) NULL DEFAULT NULL COMMENT \'重试次数\',\n  `EXCEPTION_` varchar(2000)  NULL DEFAULT NULL COMMENT \'异常信息\',\n  `LOG_TIME_` datetime(0) NULL DEFAULT NULL COMMENT \'日志记录时间\',\n  `TARGET_` varchar(64)  NULL DEFAULT NULL COMMENT \'日志目标类型\',\n  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'实例ID\',\n  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'任务ID\',\n  `OWNER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'任务所属人id\',\n  `OWNER_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT \'任务所属人姓名\',\n  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'租户id\',\n  `YEARS_PARTITION_` int(0) NULL DEFAULT NULL COMMENT \'日志所属年份\',\n  PRIMARY KEY (`ID_`) USING BTREE,\n  INDEX `IDX_YEARS_PARTITION_`(`YEARS_PARTITION_`) USING BTREE,\n  INDEX `IDX_PROC_INST_ID_`(`PROC_INST_ID_`) USING BTREE,\n  INDEX `idx_bpm_flow_message_type`(`TYPE_`) USING BTREE\n)  COMMENT = \'统一待办推送日志\';', '1', '0', NULL, '5', '1', 'id_', 'PROC_INST_ID_', NULL, '1644250277726375936', '2023-04-07 16:23:10', '-1');
INSERT INTO `bpm_documentation_table` VALUES ('1644254843394052096', 'bpm_read_record', NULL, 'CREATE TABLE `bpm_read_record`  (\n  `ID_` varchar(255)  NOT NULL,\n  `PROC_DEF_ID_` varchar(255)  NULL DEFAULT NULL COMMENT \'流程定义ID\',\n  `SUP_INST_ID_` varchar(255)  NULL DEFAULT NULL COMMENT \'父流程实例ID\',\n  `PROC_INST_ID_` varchar(255)  NULL DEFAULT NULL COMMENT \'流程实例ID\',\n  `TASK_ID_` varchar(255)  NULL DEFAULT NULL COMMENT \'任务ID\',\n  `TASK_KEY_` varchar(255)  NULL DEFAULT NULL COMMENT \'任务定义Key\',\n  `TASK_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT \'任务名称\',\n  `READER_` varchar(255)  NULL DEFAULT NULL COMMENT \'阅读人ID\',\n  `READER_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT \'阅读人名\',\n  `READ_TIME_` datetime(0) NULL DEFAULT NULL,\n  `ORG_ID_` varchar(255)  NULL DEFAULT NULL COMMENT \'组织id\',\n  `ORG_PATH_` varchar(255)  NULL DEFAULT NULL COMMENT \'组织名称\',\n  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,\n  PRIMARY KEY (`ID_`) USING BTREE,\n  INDEX `IDX_READRECORD_PROCINSTID`(`PROC_INST_ID_`) USING BTREE,\n  INDEX `IDX_READRECORD_TASKID`(`TASK_ID_`) USING BTREE,\n  INDEX `IDX_READRECORD_TASKKEY`(`TASK_KEY_`) USING BTREE\n)  COMMENT = \'任务阅读记录表\';', '1', '0', NULL, '6', '1', 'id_', 'PROC_INST_ID_', NULL, '1644250277726375936', '2023-04-07 16:24:59', '-1');
INSERT INTO `bpm_documentation_table` VALUES ('1644272017298935808', 'bpm_exe_stack_executor', NULL, 'CREATE TABLE `bpm_exe_stack_executor`  (\n  `ID_` varchar(64)  NOT NULL,\n  `STACK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'堆栈ID\',\n  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'任务ID\',\n  `ASSIGNEE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT \'执行人\',\n  `CREATE_TIME_` datetime(0) NULL DEFAULT NULL,\n  `END_TIME_` datetime(0) NULL DEFAULT NULL,\n  `STATUS_` smallint(0) NULL DEFAULT NULL COMMENT \'状态(0,初始,1,完成,2,取消)\',\n  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,\n  `TARGET_NODE_` varchar(64)  NULL DEFAULT NULL COMMENT \'目标节点\',\n  PRIMARY KEY (`ID_`) USING BTREE,\n  INDEX `IDX_STACKEXECUTOR_STACKID`(`STACK_ID_`) USING BTREE,\n  INDEX `IDX_STACKEXECUTOR_TASKID`(`TASK_ID_`) USING BTREE\n)  COMMENT = \'堆栈执行人\';', NULL, '0', NULL, '7', '1', 'id_', 'STACK_ID_', '', '1644253067093725184', '2023-04-14 10:05:07', '-1');

-- ----------------------------
-- Table structure for bpm_exe_stack
-- ----------------------------
DROP TABLE IF EXISTS `bpm_exe_stack`;
CREATE TABLE `bpm_exe_stack`  (
  `ID_` varchar(64)  NOT NULL,
  `PRCO_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义ID',
  `NODE_ID_` varchar(64)  NOT NULL COMMENT '节点ID',
  `NODE_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '节点名',
  `START_TIME_` datetime NULL DEFAULT NULL,
  `END_TIME` datetime NULL DEFAULT NULL,
  `IS_MULITI_TASK_` smallint NOT NULL COMMENT '多实例任务\r\n1=是\r\n0=否',
  `PARENT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父ID',
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `NODE_PATH_` varchar(1024)  NULL DEFAULT NULL COMMENT '节点路径\r\n格式如：\r\n0.1.2.\r\n其中2则为本行记录的主键值',
  `DEPTH_` smallint NULL DEFAULT NULL COMMENT '节点层',
  `TASK_TOKEN_` varchar(255)  NULL DEFAULT NULL COMMENT '是针对分发任务时，携带的令牌，方便查找其父任务堆栈',
  `NODE_TYPE_` varchar(255)  NULL DEFAULT NULL COMMENT '节点类型',
  `TARGET_NODE_` varchar(200)  NULL DEFAULT NULL COMMENT '驳回时返回节点',
  `TARGET_TOKEN_` varchar(255)  NULL DEFAULT NULL,
  `INTERPOSE_` smallint NULL DEFAULT NULL COMMENT '是否干预执行',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_EXESTACK_INSTID`(`PROC_INST_ID_` ASC) USING BTREE
)COMMENT = '流程执行堆栈树';

-- ----------------------------
-- Records of bpm_exe_stack
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_exe_stack_executor
-- ----------------------------
DROP TABLE IF EXISTS `bpm_exe_stack_executor`;
CREATE TABLE `bpm_exe_stack_executor`  (
  `ID_` varchar(64)  NOT NULL,
  `STACK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '堆栈ID',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `ASSIGNEE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '执行人',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `END_TIME_` datetime NULL DEFAULT NULL,
  `STATUS_` smallint NULL DEFAULT NULL COMMENT '状态(0,初始,1,完成,2,取消)',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `TARGET_NODE_` varchar(64)  NULL DEFAULT NULL COMMENT '目标节点',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_STACKEXECUTOR_STACKID`(`STACK_ID_` ASC) USING BTREE,
  INDEX `IDX_STACKEXECUTOR_TASKID`(`TASK_ID_` ASC) USING BTREE
)COMMENT = '堆栈执行人';

-- ----------------------------
-- Records of bpm_exe_stack_executor
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_exe_stack_his
-- ----------------------------
DROP TABLE IF EXISTS `bpm_exe_stack_his`;
CREATE TABLE `bpm_exe_stack_his`  (
  `ID_` varchar(64)  NOT NULL,
  `PRCO_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义ID',
  `NODE_ID_` varchar(64)  NOT NULL COMMENT '节点ID',
  `NODE_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '节点名',
  `START_TIME_` datetime NULL DEFAULT NULL,
  `END_TIME` datetime NULL DEFAULT NULL,
  `IS_MULITI_TASK_` smallint NOT NULL COMMENT '多实例任务\r\n1=是\r\n0=否',
  `PARENT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父ID',
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `NODE_PATH_` varchar(1024)  NULL DEFAULT NULL COMMENT '节点路径\r\n格式如：\r\n0.1.2.\r\n其中2则为本行记录的主键值',
  `DEPTH_` smallint NULL DEFAULT NULL COMMENT '节点层',
  `TASK_TOKEN_` varchar(255)  NULL DEFAULT NULL COMMENT '是针对分发任务时，携带的令牌，方便查找其父任务堆栈',
  `NODE_TYPE_` varchar(255)  NULL DEFAULT NULL COMMENT '节点类型',
  `TARGET_NODE_` varchar(20)  NULL DEFAULT NULL COMMENT '驳回时返回节点',
  `TARGET_TOKEN_` varchar(255)  NULL DEFAULT NULL,
  `INTERPOSE_` smallint NULL DEFAULT NULL COMMENT '是否干预执行',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_EXESTACKHIS_INSTID`(`PROC_INST_ID_` ASC) USING BTREE
)COMMENT = '流程执行堆栈树';

-- ----------------------------
-- Records of bpm_exe_stack_his
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_exe_stack_relation
-- ----------------------------
DROP TABLE IF EXISTS `bpm_exe_stack_relation`;
CREATE TABLE `bpm_exe_stack_relation`  (
  `RELATION_ID_` varchar(64)  NOT NULL COMMENT '关系ID',
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '流程实例ID',
  `FROM_STACK_ID_` varchar(64)  NOT NULL COMMENT '来自堆栈ID',
  `TO_STACK_ID_` varchar(64)  NOT NULL COMMENT '到达堆栈ID',
  `FROM_NODE_ID_` varchar(64)  NOT NULL COMMENT '来自节点',
  `TO_NODE_ID_` varchar(64)  NOT NULL COMMENT '到达节点',
  `RELATION_STATE_` smallint NOT NULL DEFAULT 1 COMMENT '关系状态：1正常，0回收作废',
  `FROM_NODE_TYPE_` varchar(64)  NOT NULL COMMENT '来自的节点类型',
  `TO_NODE_TYPE_` varchar(64)  NOT NULL COMMENT '到达的节点类型',
  `CREATED_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`RELATION_ID_`) USING BTREE,
  INDEX `IDX_STACKREL_FROMSTACK`(`FROM_STACK_ID_` ASC) USING BTREE,
  INDEX `IDX_STACKREL_INSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_STACKREL_TOSTACK`(`TO_STACK_ID_` ASC) USING BTREE
)COMMENT = '堆栈关系表';

-- ----------------------------
-- Records of bpm_exe_stack_relation
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_exe_stack_relation_his
-- ----------------------------
DROP TABLE IF EXISTS `bpm_exe_stack_relation_his`;
CREATE TABLE `bpm_exe_stack_relation_his`  (
  `RELATION_ID_` varchar(64)  NOT NULL COMMENT '关系ID',
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '流程实例ID',
  `FROM_STACK_ID_` varchar(64)  NOT NULL COMMENT '来自堆栈ID',
  `TO_STACK_ID_` varchar(64)  NOT NULL COMMENT '到达堆栈ID',
  `FROM_NODE_ID_` varchar(64)  NOT NULL COMMENT '来自节点',
  `TO_NODE_ID_` varchar(64)  NOT NULL COMMENT '到达节点',
  `RELATION_STATE_` smallint NOT NULL DEFAULT 1 COMMENT '关系状态：1正常，0回收作废',
  `FROM_NODE_TYPE_` varchar(64)  NOT NULL COMMENT '来自的节点类型',
  `TO_NODE_TYPE_` varchar(64)  NOT NULL COMMENT '到达的节点类型',
  `CREATED_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`RELATION_ID_`) USING BTREE,
  INDEX `IDX_STACKRELHIS_FROMSTACK`(`FROM_STACK_ID_` ASC) USING BTREE,
  INDEX `IDX_STACKRELHIS_INSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_STACKRELHIS_TOSTACK`(`TO_STACK_ID_` ASC) USING BTREE
)COMMENT = '堆栈关系历史表';

-- ----------------------------
-- Records of bpm_exe_stack_relation_his
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_extend_class
-- ----------------------------
DROP TABLE IF EXISTS `bpm_extend_class`;
CREATE TABLE `bpm_extend_class`  (
  `ID_` varchar(64)  NOT NULL,
  `JAR_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '所属jar包id',
  `SIMPLE_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '类名首字母小写，即beanId',
  `PATH_` varchar(500)  NULL DEFAULT NULL COMMENT '类名全路径',
  `DESC_` varchar(255)  NULL DEFAULT NULL COMMENT '类描述',
  `MD5_` varchar(255)  NULL DEFAULT NULL COMMENT 'MD5版本号',
  `TYPE_` varchar(1)  NULL DEFAULT NULL COMMENT '脚本类型1：条件脚本，2：人员脚本',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '已发布扩展脚本管理表';

-- ----------------------------
-- Records of bpm_extend_class
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_extend_jar
-- ----------------------------
DROP TABLE IF EXISTS `bpm_extend_jar`;
CREATE TABLE `bpm_extend_jar`  (
  `ID_` varchar(64)  NOT NULL,
  `NAME_` varchar(255)  NULL DEFAULT NULL COMMENT 'jar包名称',
  `DESC_` varchar(255)  NULL DEFAULT NULL COMMENT 'jar包描述',
  `JAR_FILE_` varchar(2000)  NULL DEFAULT NULL COMMENT 'jar包的附件路径',
  `JAR_BYTES_` longblob NULL COMMENT 'jar包的二进制数据',
  `CREATE_BY_` varchar(255)  NULL DEFAULT NULL COMMENT '上传人id',
  `CREATE_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '上传人姓名',
  `UPDATE_BY_` varchar(255)  NULL DEFAULT NULL COMMENT '发布人id',
  `UPDATE_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '发布人姓名',
  `CREATE_TIME_` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `SIZE_` int NULL DEFAULT NULL COMMENT 'jar包大小(kb)',
  `STATUS_` int NULL DEFAULT NULL COMMENT 'jar包状态。1：未发布，2：已发布',
  `TYPE_` int NULL DEFAULT 0 COMMENT 'jar包类型。0：script脚本扩展，1：用户数据同步',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '扩展jar包管理表';

-- ----------------------------
-- Records of bpm_extend_jar
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_flow_collect
-- ----------------------------
DROP TABLE IF EXISTS `bpm_flow_collect`;
CREATE TABLE `bpm_flow_collect`  (
  `ID_` varchar(64)  NOT NULL COMMENT '主键',
  `DEF_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义key',
  `CREATOR_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATE_TIME_` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`) USING BTREE,
  UNIQUE INDEX `BPM_FLOW_COLLECT_ID__uindex`(`ID_` ASC) USING BTREE
)COMMENT = '流程收藏记录';

-- ----------------------------
-- Records of bpm_flow_collect
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_flow_default_button
-- ----------------------------
DROP TABLE IF EXISTS `bpm_flow_default_button`;
CREATE TABLE `bpm_flow_default_button`  (
  `ID_` varchar(64)  NOT NULL,
  `NAME_` varchar(64)  NOT NULL COMMENT '按钮名称',
  `ALIAS_` varchar(64)  NOT NULL COMMENT '按钮别名',
  `BEFORESCRIPT_` text  NULL COMMENT '前置脚本',
  `AFTERSCRIPT_` text  NULL COMMENT '后置脚本',
  `GROOVYSCRIPT_` text  NULL COMMENT '后台java脚本',
  `COMPLETEEVENTGROOVYSCRIPT_` text  NULL COMMENT '后台完成任务后执行的java脚本',
  `REJECTMODE_` varchar(64)  NULL DEFAULT NULL COMMENT '驳回模式 reject 驳回指定节点  rejectPre 驳回上一步   backToStart 驳回发起人',
  `REJECTNODE_` varchar(64)  NULL DEFAULT NULL COMMENT '指定驳回的节点',
  `ISLOCK_` int NULL DEFAULT NULL,
  `SUPPORTSCRIPT_` int NULL DEFAULT NULL COMMENT '是否支持脚本',
  `MSGCONFIG_` varchar(255)  NULL DEFAULT NULL COMMENT '按钮消息配置',
  `TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT '按钮节点类型',
  `DISABLED_` int NULL DEFAULT NULL COMMENT '启用或者禁用',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '流程各个节点的按钮初始化';

-- ----------------------------
-- Records of bpm_flow_default_button
-- ----------------------------
INSERT INTO `bpm_flow_default_button` VALUES ('1', '启动', 'startFlow', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 1, '', 'start', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('10', '签收', 'lockUnlock', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 0, '', 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('11', '保存', 'saveDraft', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 1, '', 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('12', '挂起', 'hangUp', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 0, '', 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('13', '取消挂起', 'cancelHangUp', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 0, '', 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('14', '反对', 'oppose', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 1, '', 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('15', '流转', 'startTrans', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 0, '', 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('16', '加签', 'addSign', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 0, '', 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('17', '终止', 'endProcess', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 1, '', 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('18', '传阅', 'instanceTrans', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 0, '', 'userTask', 1);
INSERT INTO `bpm_flow_default_button` VALUES ('19', '驳回发起人', 'backToStart', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 1, '', 'userTask', 1);
INSERT INTO `bpm_flow_default_button` VALUES ('2', '保存', 'saveDraft', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 1, NULL, 'start', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('20', '同意', 'agree', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 1, NULL, 'signTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('21', '沟通反馈', 'commu', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 1, '', 'signTask', 1);
INSERT INTO `bpm_flow_default_button` VALUES ('22', '驳回', 'reject', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 1, NULL, 'signTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('23', '征询', 'inqu', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 0, NULL, 'signTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('24', '转办', 'delegate', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 0, NULL, 'signTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('25', '保存', 'saveDraft', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 1, NULL, 'signTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('26', '反对', 'oppose', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 1, NULL, 'signTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('27', '驳回发起人', 'backToStart', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 1, '', 'signTask', 1);
INSERT INTO `bpm_flow_default_button` VALUES ('28', '传阅', 'instanceTrans', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 0, '', 'signTask', 1);
INSERT INTO `bpm_flow_default_button` VALUES ('29', '加签', 'addSign', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 0, NULL, 'signTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('3', '同意', 'agree', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 1, '', 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('4', '同意（流转）', 'agreeTrans', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 1, NULL, 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('5', '反对（流转）', 'opposeTrans', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 1, NULL, 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('6', '沟通反馈', 'commu', '', '', '', '', 'backToStart,rejectPre,reject', '', 0, 1, '', 'userTask', 1);
INSERT INTO `bpm_flow_default_button` VALUES ('7', '驳回', 'reject', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 1, NULL, 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('8', '征询', 'inqu', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 0, NULL, 'userTask', 0);
INSERT INTO `bpm_flow_default_button` VALUES ('9', '转办', 'delegate', NULL, NULL, NULL, NULL, 'backToStart,rejectPre,reject', NULL, 0, 0, NULL, 'userTask', 0);

-- ----------------------------
-- Table structure for bpm_flow_mq_log
-- ----------------------------
DROP TABLE IF EXISTS `bpm_flow_mq_log`;
CREATE TABLE `bpm_flow_mq_log`  (
  `ID_` varchar(64)  NOT NULL COMMENT '主键',
  `TYPE_` varchar(40)  NOT NULL COMMENT '类型',
  `TITLE_` varchar(300)  NULL DEFAULT NULL COMMENT '标题',
  `CONTENT_` text  NULL COMMENT '内容',
  `STATUS_` int NOT NULL COMMENT '状态',
  `TRY_TIME_` int NULL DEFAULT NULL COMMENT '重试次数',
  `EXCEPTION_` varchar(2000)  NULL DEFAULT NULL COMMENT '异常信息',
  `LOG_TIME_` datetime NULL DEFAULT NULL COMMENT '日志记录时间',
  `TARGET_` varchar(64)  NULL DEFAULT NULL COMMENT '日志目标类型',
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '实例ID',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `OWNER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务所属人id',
  `OWNER_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '任务所属人姓名',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户id',
  `YEARS_PARTITION_` int NULL DEFAULT NULL COMMENT '日志所属年份',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_YEARS_PARTITION_`(`YEARS_PARTITION_` ASC) USING BTREE,
  INDEX `IDX_PROC_INST_ID_`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `idx_bpm_flow_message_type`(`TYPE_` ASC) USING BTREE
)COMMENT = '统一待办推送日志';

-- ----------------------------
-- Records of bpm_flow_mq_log
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_form_modify_record
-- ----------------------------
DROP TABLE IF EXISTS `bpm_form_modify_record`;
CREATE TABLE `bpm_form_modify_record`  (
  `ID_` varchar(64)  NOT NULL,
  `USER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '修改人id',
  `USER_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '修改人姓名',
  `INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例id',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务id',
  `TASK_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '任务名称',
  `NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '节点id',
  `MODIFY_TIME_` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `IP_` varchar(64)  NULL DEFAULT NULL COMMENT '修改人ip',
  `DETAIL_` text  NULL COMMENT '修改详情',
  `REASON_` text  NULL COMMENT '修改原因',
  `BO_ALIAS_` varchar(64)  NULL DEFAULT NULL COMMENT 'bo别名',
  `REF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '外键（表单记录主键）',
  `DATA_` longtext  NULL COMMENT '表单数据',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '表单修改记录表';

-- ----------------------------
-- Records of bpm_form_modify_record
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_free_process_def
-- ----------------------------
DROP TABLE IF EXISTS `bpm_free_process_def`;
CREATE TABLE `bpm_free_process_def`  (
  `id_` varchar(64)  NOT NULL COMMENT '新流程定义ID',
  `source_def_id_` varchar(64)  NULL DEFAULT NULL COMMENT '原流程定义ID',
  `proc_inst_id_` varchar(255)  NULL DEFAULT NULL COMMENT '实例ID',
  `BPMN_XML_` longtext  NULL COMMENT 'xml',
  `TENANT_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`id_`) USING BTREE
)COMMENT = '自由流程定义备份表';

-- ----------------------------
-- Records of bpm_free_process_def
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_hr_script
-- ----------------------------
DROP TABLE IF EXISTS `bpm_hr_script`;
CREATE TABLE `bpm_hr_script`  (
  `ID_` varchar(64)  NOT NULL,
  `ALIAS_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '脚本的别名',
  `ALIAS_DESC_` varchar(512)  NULL DEFAULT NULL COMMENT '脚本的描叙',
  `CLASS_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '调用类的路径',
  `CLASS_INS_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '调用类的对象名',
  `METHOD_NAME_` varchar(40)  NULL DEFAULT NULL COMMENT '调用的方法名',
  `METHOD_DESC_` varchar(255)  NULL DEFAULT NULL COMMENT '调用的方法的描叙',
  `RETURN_TYPE_` varchar(40)  NULL DEFAULT NULL COMMENT '方法返回类型',
  `ARGUMENT_` varchar(4000)  NULL DEFAULT NULL COMMENT '方法相关设置',
  `ENABLE_` smallint NOT NULL COMMENT '是否有效，有效 1，无效 0',
  `TYPE_` smallint NULL DEFAULT NULL COMMENT '脚本类型，条件脚本 1，别名脚本 2，人员脚本 3',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '系统脚本';

-- ----------------------------
-- Records of bpm_hr_script
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_inst_delete_log
-- ----------------------------
DROP TABLE IF EXISTS `bpm_inst_delete_log`;
CREATE TABLE `bpm_inst_delete_log`  (
  `ID_` varchar(64)  NOT NULL,
  `FULLNAME_` varchar(255)  NULL DEFAULT NULL COMMENT '操作人姓名',
  `ACCOUNT_` varchar(255)  NULL DEFAULT NULL COMMENT '操作人账号',
  `DELETE_TIME_` datetime NULL DEFAULT NULL COMMENT '删除时间',
  `INST_SUBJECT_` varchar(128)  NULL DEFAULT NULL COMMENT '删除流程实例对象',
  `CONTENT_` varchar(550)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '流程实例删除日志';

-- ----------------------------
-- Records of bpm_inst_delete_log
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_inst_form
-- ----------------------------
DROP TABLE IF EXISTS `bpm_inst_form`;
CREATE TABLE `bpm_inst_form`  (
  `ID_` varchar(64)  NOT NULL,
  `DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义id',
  `INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例id',
  `FORM_VALUE_` varchar(255)  NULL DEFAULT NULL COMMENT '表单 inner 记录id  frame 记录formValue',
  `NODE_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '节点id',
  `FORM_TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT '表单类型 pc mobile',
  `FORM_CATEGORY_` varchar(64)  NULL DEFAULT NULL COMMENT 'url表单 frame  在线表单 inner',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_INST_FORM_INSTID`(`INST_ID_` ASC) USING BTREE
)COMMENT = '记录流程启动时，节点使用的表单';

-- ----------------------------
-- Records of bpm_inst_form
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_interpose_recored
-- ----------------------------
DROP TABLE IF EXISTS `bpm_interpose_recored`;
CREATE TABLE `bpm_interpose_recored`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义ID',
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '流程实例ID',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `TASK_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '任务名称',
  `AUDITOR_` varchar(64)  NULL DEFAULT NULL COMMENT '执行人ID',
  `AUDITOR_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '执行人名',
  `OPINION_` varchar(2000)  NULL DEFAULT NULL,
  `STATUS_` varchar(40)  NOT NULL COMMENT '干预动作',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `COMPLETE_TIME_` datetime NULL DEFAULT NULL,
  `DUR_MS_` int NULL DEFAULT NULL COMMENT '持续时间(ms)',
  `FILES_` varchar(2000)  NULL DEFAULT NULL,
  `IS_DONE_` varchar(4000)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_INTERPOSE_INSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_INTERPOSE_TASK`(`TASK_ID_` ASC) USING BTREE
)COMMENT = '流程干预记录表';

-- ----------------------------
-- Records of bpm_interpose_recored
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_meetingroom
-- ----------------------------
DROP TABLE IF EXISTS `bpm_meetingroom`;
CREATE TABLE `bpm_meetingroom`  (
  `ID_` varchar(64)  NOT NULL,
  `NAME_` varchar(100)  NULL DEFAULT NULL COMMENT '会议室名称',
  `NEED_PENDING_` smallint NULL DEFAULT NULL COMMENT '是否需要审批',
  `PENDING_USER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '审批人ID',
  `PENDING_USER_NAME_` varchar(100)  NULL DEFAULT NULL COMMENT '审批人',
  `SUPPORT_SERVICE_` varchar(500)  NULL DEFAULT NULL COMMENT '支持的服务',
  `LOCATION_` varchar(300)  NULL DEFAULT NULL COMMENT '会议室地址',
  `CAPACITY_` int NULL DEFAULT NULL COMMENT '会议室容量',
  `MEMO_` varchar(600)  NULL DEFAULT NULL COMMENT '会议室备注',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '会议室';

-- ----------------------------
-- Records of bpm_meetingroom
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_meetingroom_appointment
-- ----------------------------
DROP TABLE IF EXISTS `bpm_meetingroom_appointment`;
CREATE TABLE `bpm_meetingroom_appointment`  (
  `ID_` varchar(64)  NOT NULL,
  `MEETINGROOM_ID_` varchar(64)  NULL DEFAULT NULL,
  `MEETING_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '会议id',
  `MEETING_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '会议名称',
  `HOSTESS_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '主持人姓名',
  `APPOINTMENT_BEG_TIME_` datetime NULL DEFAULT NULL,
  `APPOINTMENT_END_TIME_` datetime NULL DEFAULT NULL,
  `APPOINTMENT_STATUS_` int NULL DEFAULT NULL COMMENT '预约状态',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_MR_MEETINGROOM`(`MEETINGROOM_ID_` ASC) USING BTREE,
  INDEX `IDX_MR_PROINSTANCE`(`MEETING_ID_` ASC) USING BTREE
)COMMENT = '会议室预约';

-- ----------------------------
-- Records of bpm_meetingroom_appointment
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_message_type
-- ----------------------------
DROP TABLE IF EXISTS `bpm_message_type`;
CREATE TABLE `bpm_message_type`  (
  `ID_` varchar(64)  NOT NULL,
  `CLASSIFICATION_CODE_` varchar(100)  NULL DEFAULT NULL COMMENT '分类名称',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL,
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL,
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `IS_PENDING_` smallint NULL DEFAULT NULL COMMENT '是否需要审批',
  `PENDING_USER_ID_` varchar(100)  NULL DEFAULT NULL COMMENT '审批人id',
  `PENDING_USER_NAME_` varchar(200)  NULL DEFAULT NULL COMMENT '审批人姓名',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '分类管理';

-- ----------------------------
-- Records of bpm_message_type
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_mobile_category
-- ----------------------------
DROP TABLE IF EXISTS `bpm_mobile_category`;
CREATE TABLE `bpm_mobile_category`  (
  `ID_` varchar(64)  NOT NULL COMMENT '主键',
  `DEF_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义key',
  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '分类ID',
  `TYPE_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '分类key',
  `DEF_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '流程定义名称',
  `CREATOR_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '移动端流程分类表';

-- ----------------------------
-- Records of bpm_mobile_category
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_multi_script
-- ----------------------------
DROP TABLE IF EXISTS `bpm_multi_script`;
CREATE TABLE `bpm_multi_script`  (
  `ID_` varchar(64)  NOT NULL,
  `ALIAS_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '脚本的别名',
  `ALIAS_DESC_` varchar(512)  NULL DEFAULT NULL COMMENT '脚本的描叙',
  `CLASS_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '调用类的路径',
  `CLASS_INS_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '调用类的对象名',
  `METHOD_NAME_` varchar(40)  NULL DEFAULT NULL COMMENT '调用的方法名',
  `METHOD_DESC_` varchar(1000)  NULL DEFAULT NULL,
  `RETURN_TYPE_` varchar(40)  NULL DEFAULT NULL COMMENT '方法返回类型',
  `ARGUMENT_` varchar(4000)  NULL DEFAULT NULL COMMENT '方法相关设置',
  `ENABLE_` smallint NOT NULL COMMENT '是否有效，有效 1，无效 0',
  `TYPE_` smallint NULL DEFAULT NULL COMMENT '脚本类型，条件脚本 1，别名脚本 2，人员脚本 3',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_MULTISCRIPT_ALIASNAME`(`ALIAS_NAME_` ASC) USING BTREE
)COMMENT = '系统脚本';

-- ----------------------------
-- Records of bpm_multi_script
-- ----------------------------
INSERT INTO `bpm_multi_script` VALUES ('1', NULL, NULL, 'com.hotent.runtime.script.UserScript', 'userScript', 'getRoleByAlias', '根据角色别名获取角色列表', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"角色别名\",\"paraCt\":\"base:role-selector\",\"paraCtBindName\":\"code\",\"paraCtBindKey\":\"code\",\"multiSelect\":false}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('10', NULL, NULL, 'com.hotent.runtime.script.UserRelScript', 'userRelScript', 'getUpChargesByOrgId', '获取上级组织负责人(包含主负责人)或主负责人', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"组织ID\",\"paraCt\":\"base:org-selector\",\"paraCtBindName\":\"组织ID\",\"paraCtBindKey\":\"id\",\"multiSelect\":false,\"$$hashKey\":\"object:3067\"},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.Boolean\",\"paraDesc\":\"是否主负责人(值为true或false)\",\"paraCt\":null,\"paraCtBindName\":\"\",\"paraCtBindKey\":null,\"multiSelect\":false,\"$$hashKey\":\"object:3068\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('11', NULL, NULL, 'com.hotent.runtime.script.UserRelScript', 'userRelScript', 'getChargesByPreNode', '获取上一节点执行人的部门负责人(主组织)', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.Boolean\",\"paraDesc\":\"是否主负责人(值为true或false)\",\"paraCt\":\"\"},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"传维度id或编码都可以          \"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('12', NULL, NULL, 'com.hotent.runtime.script.UserRelScript', 'userRelScript', 'getByRelPreNode', '通过上一节点执行人获取汇报线上级 人员列表', 'java.util.Set', '[{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"汇报线类型编码\",\"paraCt\":\"\",\"paraCtBindName\":\"ID_\",\"paraCtBindKey\":\"\",\"multiSelect\":false}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('13', NULL, NULL, 'com.hotent.runtime.script.UserRelScript', 'userRelScript', 'getByRelStartUser', '通过发起人获取汇报线上级 人员列表', 'java.util.Set', '[{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"汇报线类型编码\",\"paraCt\":\"\",\"paraCtBindName\":\"ID_\",\"paraCtBindKey\":\"\",\"multiSelect\":false}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('1318030354614980608', NULL, NULL, 'com.hotent.runtime.script.UserScript', 'userScript', 'getUserFromSubData', '从子表数据中提取节点审批人(固定值生效)', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"业务对象别名\"},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"子表别名（sub_)\"},{\"paraName\":\"arg2\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"用户帐号字段\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('1338367741324824576', NULL, NULL, 'com.hotent.runtime.script.UserScript', 'userScript', 'getByCompanyRole', '找这个组织底下拥有这个角色的人员', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"组织别名\",\"paraCt\":\"base:org-selector\",\"paraCtBindKey\":\"code\"},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"角色别名\",\"paraCt\":\"base:role-selector\",\"paraCtBindKey\":\"code\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('1338375124944031744', NULL, NULL, 'com.hotent.runtime.script.UserScript', 'userScript', 'getLeaderStep', '获取逐级审批(获取主负责人)', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.Integer\",\"paraDesc\":\"级别\"},{\"paraName\":\"arg1\",\"paraType\":\"boolean\",\"paraDesc\":\"是否需要上级（true，false）\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('1338377219818524672', NULL, NULL, 'com.hotent.runtime.script.UserScript', 'userScript', 'getUserById', '根据ID获取审批人', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"ID\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('1338379764150439936', NULL, NULL, 'com.hotent.runtime.script.UserRelScript', 'userRelScript', 'getUserFromBusSql', 'sql查询用户ID(固定值SQL要用\" \"包裹)', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"查询SQL，返回结果只有一列\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('1338381406014935040', NULL, NULL, 'com.hotent.runtime.script.UserScript', 'userScript', 'getLeaderStepByOrgId', '根据组织ID获取逐级审批', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"组织ID\",\"paraCt\":\"base:org-selector\",\"paraCtBindKey\":\"id\"},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.Integer\",\"paraDesc\":\"组织级别\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('16', NULL, NULL, 'com.hotent.runtime.script.OrgScript', 'orgScript', 'getChargesByPOrg', '获取上一节点用户的上级部门（主）的负责人(主组织生效)', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.Boolean\",\"paraDesc\":\"是否主负责人(值为true或false)\",\"paraCt\":\"null\",\"$$hashKey\":\"object:2340\",\"multiSelect\":false},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"维度编码（不传为默认维度）\",\"multiSelect\":false,\"paraCt\":\"base:dem-selector\",\"paraCtBindKey\":\"code\",\"paraCtBindName\":\"code\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('17', NULL, NULL, 'com.hotent.runtime.script.OrgScript', 'orgScript', 'getChargesByStartPOrg', '获取发起人的上级部门的（主）负责人', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.Boolean\",\"paraDesc\":\"是否主负责人(值为true或false)\",\"paraCt\":\"\",\"$$hashKey\":\"object:1955\",\"multiSelect\":false},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"维度编码（不传为默认维度）\",\"multiSelect\":false,\"paraCt\":\"base:dem-selector\",\"paraCtBindKey\":\"code\",\"paraCtBindName\":\"code\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('18', NULL, NULL, 'com.hotent.runtime.script.OrgScript', 'orgScript', 'getChargesByOrg', '获取上一点节用户所在部门的（主）负责人', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"boolean\",\"paraDesc\":\"是否主负责人(值为true或false)\",\"paraCt\":\"\",\"$$hashKey\":\"object:1387\",\"multiSelect\":false},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"维度编码（不传为默认维度）\",\"multiSelect\":false,\"paraCt\":\"base:dem-selector\",\"paraCtBindKey\":\"code\",\"paraCtBindName\":\"code\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('19', NULL, NULL, 'com.hotent.runtime.script.OrgScript', 'orgScript', 'getChargesByStartOrg', '获取发起人所在部门的（主）负责人', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.Boolean\",\"paraDesc\":\"是否主负责人(值为true或false)\",\"paraCt\":\"null\",\"$$hashKey\":\"object:1002\",\"multiSelect\":false},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"维度编码（不传为默认维度）\",\"multiSelect\":false,\"paraCt\":\"base:dem-selector\",\"paraCtBindKey\":\"code\",\"paraCtBindName\":\"code\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('2', NULL, NULL, 'com.hotent.runtime.script.UserScript', 'userScript', 'getOrgById', '根据组织id查询组织作为候选处理人（不抽取）', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"组织编码\",\"paraCt\":\"base:org-selector\",\"paraCtBindName\":\"id_\",\"paraCtBindKey\":\"id\",\"multiSelect\":false,\"$$hashKey\":\"object:645\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('20', NULL, NULL, 'com.hotent.runtime.script.OrgScript', 'orgScript', 'getByOrgRelDefCode', '通过职务编码和组织编码查询用户', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"组织编码\",\"paraCt\":\"base:org-selector\",\"paraCtBindName\":\"code\",\"paraCtBindKey\":\"code\",\"multiSelect\":false},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"职务编码\",\"paraCt\":\"base:job-selector\",\"paraCtBindName\":\"code\",\"paraCtBindKey\":\"code\",\"multiSelect\":false}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('22', NULL, NULL, 'com.hotent.runtime.script.OrgScript', 'orgScript', 'getMasterFromUnder', '通过下属管理获取上一节点用户的上级', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"维度id或编码\",\"multiSelect\":false,\"paraCt\":\"base:dem-selector\",\"paraCtBindKey\":\"id\",\"paraCtBindName\":\"id\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('3', NULL, NULL, 'com.hotent.runtime.script.BpmUserScript', 'bpmUserScript', 'getListUserByRelCode', '根据岗位编码获取人员列表', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"岗位编码\",\"paraCt\":\"base:pos-selector\",\"paraCtBindName\":\"code\",\"paraCtBindKey\":\"code\",\"multiSelect\":false}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('4', NULL, NULL, 'com.hotent.runtime.script.UserScript', 'userScript', 'getMainByOrgId', '获取该组织中为主组织的人员列表', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"组织ID\",\"paraCt\":\"base:org-selector\",\"paraCtBindName\":\"id_\",\"paraCtBindKey\":\"id\",\"multiSelect\":false,\"$$hashKey\":\"object:3514\"}]', 1, 2, '-1');
INSERT INTO `bpm_multi_script` VALUES ('9', NULL, NULL, 'com.hotent.runtime.script.UserRelScript', 'userRelScript', 'getChargesByOrgId', '获取组织负责人(包含主负责人)或主负责人', 'java.util.Set', '[{\"paraName\":\"arg0\",\"paraType\":\"java.lang.String\",\"paraDesc\":\"组织ID\",\"paraCt\":\"base:org-selector\",\"paraCtBindName\":\"ID_\",\"paraCtBindKey\":\"id\",\"multiSelect\":false},{\"paraName\":\"arg1\",\"paraType\":\"java.lang.Boolean\",\"paraDesc\":\"是否主负责人(值为true或false)\",\"paraCt\":null,\"paraCtBindName\":\"\",\"paraCtBindKey\":null,\"multiSelect\":false,\"$$hashKey\":\"object:2506\"}]', 1, 2, '-1');

-- ----------------------------
-- Table structure for bpm_node_setting
-- ----------------------------
DROP TABLE IF EXISTS `bpm_node_setting`;
CREATE TABLE `bpm_node_setting`  (
  `ID_` varchar(255)  NOT NULL COMMENT '主键',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATE_TIME_` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '创建者所属组织ID',
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '更新人ID',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户ID',
  `NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '节点id',
  `DEF_ID` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义id',
  `FORECAST_` int NULL DEFAULT NULL COMMENT '审批预测值(1为同意,2为反对,默认为1)',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '流程定义节点设置表';

-- ----------------------------
-- Records of bpm_node_setting
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_often_flow
-- ----------------------------
DROP TABLE IF EXISTS `bpm_often_flow`;
CREATE TABLE `bpm_often_flow`  (
  `ID_` varchar(64)  NOT NULL,
  `DEF_KEY_` varchar(64)  NOT NULL COMMENT '流程定义KEY',
  `USER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '所属人id。-1为所有人都有权限',
  `USER_NAME_` varchar(128)  NULL DEFAULT NULL,
  `ORDER_` smallint NULL DEFAULT NULL COMMENT '排序号',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_OFTENFLOW_DEFKEY`(`DEF_KEY_` ASC) USING BTREE,
  INDEX `IDX_OFTENFLOW_USERID`(`USER_ID_` ASC) USING BTREE
)COMMENT = '通用流程';

-- ----------------------------
-- Records of bpm_often_flow
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_often_flow_user
-- ----------------------------
DROP TABLE IF EXISTS `bpm_often_flow_user`;
CREATE TABLE `bpm_often_flow_user`  (
  `ID_` varchar(64)  NOT NULL COMMENT '主键',
  `OFTEN_FLOW_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '常用流程表主键ID',
  `OWNER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '授权对象ID',
  `OWNER_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '授权对象名称',
  `RIGHT_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '授权对象类型(角色,用户,岗位等)',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_OFTENFLOWUSER_OFTENFLOWID`(`OFTEN_FLOW_ID_` ASC) USING BTREE
)COMMENT = '常用流程授权对象表';

-- ----------------------------
-- Records of bpm_often_flow_user
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_print_record
-- ----------------------------
DROP TABLE IF EXISTS `bpm_print_record`;
CREATE TABLE `bpm_print_record`  (
  `ID_` varchar(64)  NOT NULL COMMENT '主键',
  `PROC_DEF_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义KEY',
  `PROC_DEF_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义名称',
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义ID',
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程节点ID',
  `FORM_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '表单key',
  `TEMPLATE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '打印模板ID',
  `TEMPLATE_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '打印模板名称',
  `FILE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '打印文件id',
  `LAST_VERSION_` int NULL DEFAULT 0 COMMENT '是否最后的版本（1：是，0：否）',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL,
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL,
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL,
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_PRINTRECORD_PROCINSTID`(`PROC_INST_ID_` ASC) USING BTREE
)COMMENT = '流程打印文件管理表';

-- ----------------------------
-- Records of bpm_print_record
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_pro_bo
-- ----------------------------
DROP TABLE IF EXISTS `bpm_pro_bo`;
CREATE TABLE `bpm_pro_bo`  (
  `ID_` varchar(64)  NOT NULL,
  `PROCESS_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程ID',
  `PROCESS_KEY_` varchar(128)  NULL DEFAULT NULL COMMENT '流程KEY',
  `BO_CODE_` varchar(128)  NULL DEFAULT NULL COMMENT '业务对象CODE',
  `BO_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '业务对象名称',
  `CREATOR_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_PROBO_PROCESSID`(`PROCESS_ID_` ASC) USING BTREE,
  INDEX `IDX_PROBO_BOCODE`(`BO_CODE_` ASC) USING BTREE
)COMMENT = '流程业务对象设置表';

-- ----------------------------
-- Records of bpm_pro_bo
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_pro_cpto
-- ----------------------------
DROP TABLE IF EXISTS `bpm_pro_cpto`;
CREATE TABLE `bpm_pro_cpto`  (
  `ID_` varchar(64)  NOT NULL,
  `INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `BPMN_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'ACT实例ID',
  `NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '节点ID',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `OPINION_` varchar(1500)  NULL DEFAULT NULL COMMENT '意见',
  `SUBJECT_` varchar(128)  NULL DEFAULT NULL COMMENT '流程实例标题',
  `TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '抄送类型(copyto抄送,trans转发)',
  `STARTOR_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程发起人',
  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程分类',
  `STARTOR_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_PROCPTO_INSTID`(`INST_ID_` ASC) USING BTREE,
  INDEX `IDX_PROCPTO_START`(`STARTOR_ID_` ASC) USING BTREE
)COMMENT = '流程实例抄送';

-- ----------------------------
-- Records of bpm_pro_cpto
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_pro_inst
-- ----------------------------
DROP TABLE IF EXISTS `bpm_pro_inst`;
CREATE TABLE `bpm_pro_inst`  (
  `ID_` varchar(64)  NOT NULL,
  `SUBJECT_` varchar(256)  NULL DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT '流程定义ID',
  `BPMN_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'BPMN流程定义ID',
  `PROC_DEF_KEY_` varchar(128)  NULL DEFAULT NULL COMMENT '流程定义Key',
  `PROC_DEF_NAME_` varchar(128)  NOT NULL COMMENT '流程名称',
  `BIZ_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '业务主键',
  `SYS_CODE_` varchar(64)  NULL DEFAULT NULL COMMENT '业务系统编码',
  `FORM_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '绑定的表单主键',
  `STATUS_` varchar(40)  NULL DEFAULT NULL COMMENT '实例状态',
  `END_TIME_` datetime NULL DEFAULT NULL,
  `DURATION_` bigint NULL DEFAULT NULL COMMENT '持续时间(ms)',
  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '所属分类ID',
  `RESULT_TYPE_` varchar(40)  NULL DEFAULT NULL COMMENT '流程结束后的最终审批结果，agree=同意；refuse=拒绝',
  `BPMN_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'BPMN流程实例ID',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '创建者所属组织ID',
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '更新人ID',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `IS_FORMMAL_` char(1)  NOT NULL COMMENT '是否正式数据',
  `PARENT_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父实例Id',
  `IS_FORBIDDEN_` smallint NULL DEFAULT NULL COMMENT '禁止',
  `DATA_MODE_` varchar(20)  NULL DEFAULT NULL COMMENT '业务数据存储模式。\r\npk:主键\r\nbo:业务对象',
  `CREATOR_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人',
  `SUPPORT_MOBILE_` int NULL DEFAULT 0 COMMENT '支持手机端',
  `SUPER_NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '子流程节点的ID',
  `IS_DELE_` int NOT NULL DEFAULT 0 COMMENT '是否已删，1已删除，0未删除',
  `URGENT_STATE_` varchar(64)  NULL DEFAULT NULL COMMENT '紧急状态',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `MOBILE_INST_URL_` varchar(200)  NULL DEFAULT NULL COMMENT '手机端实例地址',
  `PC_INST_URL_` varchar(200)  NULL DEFAULT NULL COMMENT 'pc端实例地址',
  `CREATE_ORG_PATH_` text  NULL,
  `CREATE_ACCOUNT_` varchar(64)  NULL DEFAULT NULL COMMENT '流程发起人账号',
  PRIMARY KEY (`ID_`) USING BTREE,
  UNIQUE INDEX `IDX_PRO_INST_BPMNINSTID`(`BPMN_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_PRO_INST_PROCDEFKEY`(`PROC_DEF_KEY_` ASC) USING BTREE,
  INDEX `IDX_PRO_INST_PROCDEFID`(`PROC_DEF_ID_` ASC) USING BTREE
)COMMENT = '流程实例';

-- ----------------------------
-- Records of bpm_pro_inst
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_pro_inst_hi
-- ----------------------------
DROP TABLE IF EXISTS `bpm_pro_inst_hi`;
CREATE TABLE `bpm_pro_inst_hi`  (
  `ID_` varchar(64)  NOT NULL,
  `SUBJECT_` varchar(128)  NOT NULL COMMENT '流程实例标题',
  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT '流程定义ID',
  `BPMN_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'BPMN流程定义ID',
  `PROC_DEF_KEY_` varchar(128)  NULL DEFAULT NULL COMMENT '流程定义Key',
  `PROC_DEF_NAME_` varchar(128)  NOT NULL COMMENT '流程名称',
  `BIZ_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '关联数据业务主键',
  `SYS_CODE_` varchar(64)  NULL DEFAULT NULL COMMENT '业务系统编码',
  `FORM_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '绑定的表单主键',
  `STATUS_` varchar(40)  NULL DEFAULT NULL COMMENT '实例状态',
  `END_TIME_` datetime NULL DEFAULT NULL,
  `DURATION_` bigint NULL DEFAULT NULL COMMENT '持续时间',
  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '所属分类ID',
  `RESULT_TYPE_` varchar(40)  NULL DEFAULT NULL COMMENT '流程结束后的最终审批结果，agree=同意；refuse=拒绝',
  `BPMN_INST_ID_` varchar(64)  NOT NULL COMMENT 'BPMN流程实例ID',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '创建者所属组织ID',
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '更新人ID',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `IS_FORMMAL_` char(1)  NOT NULL COMMENT '是否正式数据 0非正式,1正式',
  `PARENT_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父实例Id',
  `IS_FORBIDDEN_` smallint NULL DEFAULT NULL,
  `DATA_MODE_` varchar(20)  NULL DEFAULT NULL,
  `CREATOR_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人',
  `SUPPORT_MOBILE_` int NULL DEFAULT 0 COMMENT '支持手机端',
  `SUPER_NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '子流程节点ID',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `MOBILE_INST_URL_` varchar(200)  NULL DEFAULT NULL COMMENT '手机端实例地址',
  `PC_INST_URL_` varchar(200)  NULL DEFAULT NULL COMMENT 'pc端实例地址',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_PROINSTHI_BIZKEY`(`BIZ_KEY_` ASC) USING BTREE,
  INDEX `IDX_PROINSTHI_BPMINSTID`(`BPMN_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_PROINSTHI_PARENTID`(`PARENT_INST_ID_` ASC) USING BTREE
)COMMENT = '流程实例历史';

-- ----------------------------
-- Records of bpm_pro_inst_hi
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_pro_inst_status
-- ----------------------------
DROP TABLE IF EXISTS `bpm_pro_inst_status`;
CREATE TABLE `bpm_pro_inst_status`  (
  `ID_` varchar(64)  NOT NULL,
  `KEY_` varchar(255)  NULL DEFAULT NULL COMMENT '流程实例状态',
  `VALUE_` varchar(255)  NULL DEFAULT NULL COMMENT '流程实例状态对应的排序号',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_PROINSTSTATUS_KEY`(`KEY_` ASC) USING BTREE
)COMMENT = '流程实例状态排序表';

-- ----------------------------
-- Records of bpm_pro_inst_status
-- ----------------------------
INSERT INTO `bpm_pro_inst_status` VALUES ('1', 'draft', '1');
INSERT INTO `bpm_pro_inst_status` VALUES ('2', 'revoke', '2');
INSERT INTO `bpm_pro_inst_status` VALUES ('3', 'back', '3');
INSERT INTO `bpm_pro_inst_status` VALUES ('4', 'backToStart', '4');
INSERT INTO `bpm_pro_inst_status` VALUES ('5', 'running', '5');
INSERT INTO `bpm_pro_inst_status` VALUES ('6', 'manualend', '6');
INSERT INTO `bpm_pro_inst_status` VALUES ('7', 'end', '7');

-- ----------------------------
-- Table structure for bpm_pro_publicity_read
-- ----------------------------
DROP TABLE IF EXISTS `bpm_pro_publicity_read`;
CREATE TABLE `bpm_pro_publicity_read`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '实例id',
  `USER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '用户id',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `PROC_INST_ID_`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_USER_ID`(`USER_ID_` ASC) USING BTREE
)COMMENT = '流程公示阅读记录';

-- ----------------------------
-- Records of bpm_pro_publicity_read
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_pro_status
-- ----------------------------
DROP TABLE IF EXISTS `bpm_pro_status`;
CREATE TABLE `bpm_pro_status`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '流程实例ID',
  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT 'ACT流程定义ID',
  `NODE_ID_` varchar(255)  NOT NULL COMMENT '节点ID',
  `NODE_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '节点名称',
  `STATUS_` varchar(50)  NOT NULL COMMENT '状态',
  `LAST_UPDATE_` datetime NULL DEFAULT NULL,
  `LAST_USERID_` varchar(64)  NULL DEFAULT NULL COMMENT '最后更新人',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `RECYCLE_NODE_` varchar(2)  NULL DEFAULT NULL COMMENT '驳回按流程图执行回收的节点 0默认值  1因为驳回按照流程图执行目标节点之后的节点为1，如果重新运行到该节点变为0',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_PROSTATUS_INSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_PROSTATUS_NODEID`(`NODE_ID_` ASC) USING BTREE
)COMMENT = '流程节点审批状态';

-- ----------------------------
-- Records of bpm_pro_status
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_pro_status_hi
-- ----------------------------
DROP TABLE IF EXISTS `bpm_pro_status_hi`;
CREATE TABLE `bpm_pro_status_hi`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '流程实例ID',
  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT 'ACT流程定义ID',
  `NODE_ID_` varchar(255)  NOT NULL COMMENT '节点ID',
  `NODE_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '节点名称',
  `STATUS_` varchar(50)  NOT NULL COMMENT '状态',
  `LAST_UPDATE_` datetime NULL DEFAULT NULL,
  `LAST_USERID_` varchar(64)  NULL DEFAULT NULL COMMENT '最后更新人',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_PROSTATUSHI_INSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_PROSTATUSHI_NODEID`(`NODE_ID_` ASC) USING BTREE
)COMMENT = '流程节点审批历史状态';

-- ----------------------------
-- Records of bpm_pro_status_hi
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_read_record
-- ----------------------------
DROP TABLE IF EXISTS `bpm_read_record`;
CREATE TABLE `bpm_read_record`  (
  `ID_` varchar(255)  NOT NULL,
  `PROC_DEF_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '流程定义ID',
  `SUP_INST_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '父流程实例ID',
  `PROC_INST_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `TASK_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '任务ID',
  `TASK_KEY_` varchar(255)  NULL DEFAULT NULL COMMENT '任务定义Key',
  `TASK_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '任务名称',
  `READER_` varchar(255)  NULL DEFAULT NULL COMMENT '阅读人ID',
  `READER_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '阅读人名',
  `READ_TIME_` datetime NULL DEFAULT NULL,
  `ORG_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '组织id',
  `ORG_PATH_` varchar(255)  NULL DEFAULT NULL COMMENT '组织名称',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_READRECORD_PROCINSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_READRECORD_TASKID`(`TASK_ID_` ASC) USING BTREE,
  INDEX `IDX_READRECORD_TASKKEY`(`TASK_KEY_` ASC) USING BTREE
)COMMENT = '任务阅读记录表';

-- ----------------------------
-- Records of bpm_read_record
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_reminder_history
-- ----------------------------
DROP TABLE IF EXISTS `bpm_reminder_history`;
CREATE TABLE `bpm_reminder_history`  (
  `ID_` varchar(64)  NOT NULL,
  `INST_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `ISNT_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '流程实例标题',
  `NODE_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '节点名称',
  `NODE_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '节点ID',
  `EXECUTE_DATE_` datetime NULL DEFAULT NULL COMMENT '执行时间',
  `REMIND_TYPE_` varchar(255)  NULL DEFAULT NULL COMMENT '执行类型',
  `USER_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '说明',
  `NOTE_` varchar(255)  NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_REMINDER_TASKID`(`TASK_ID_` ASC) USING BTREE
)COMMENT = '催办历史';

-- ----------------------------
-- Records of bpm_reminder_history
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_report_act
-- ----------------------------
DROP TABLE IF EXISTS `bpm_report_act`;
CREATE TABLE `bpm_report_act`  (
  `ID_` varchar(64)  NOT NULL,
  `REPORT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '报表主表ID',
  `BPM_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义ID',
  `REPORT_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '报表名称',
  `DIMENSION_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '组织维度id',
  `GRADE_` varchar(255)  NULL DEFAULT NULL COMMENT '统计级别',
  `PARAMS_` varchar(255)  NULL DEFAULT NULL COMMENT '统计参数',
  `RIGHT_CONTENT_` varchar(255)  NULL DEFAULT NULL COMMENT '授权内容(报表类型显示)',
  `IS_DEFAULT_` varchar(64)  NULL DEFAULT NULL COMMENT '默认显示视图(1：柱状图，2：饼图)',
  `X_AXIS_` varchar(255)  NULL DEFAULT NULL COMMENT 'x轴数据',
  `Y_AXIS_` varchar(255)  NULL DEFAULT NULL COMMENT 'y轴数据',
  `PORP_` text  NULL COMMENT '统计参数',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_REPORTACT_REPORTID`(`REPORT_ID_` ASC) USING BTREE
)COMMENT = '报表子表';

-- ----------------------------
-- Records of bpm_report_act
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_report_list
-- ----------------------------
DROP TABLE IF EXISTS `bpm_report_list`;
CREATE TABLE `bpm_report_list`  (
  `ID_` varchar(64)  NOT NULL,
  `NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '报表主表名称',
  `ALIAS_` varchar(64)  NULL DEFAULT NULL COMMENT '别名',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATE_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '创建人名称',
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '创建者所属组织ID',
  `CREATE_ORG_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '组织名称',
  `TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT '是否发布(1:是，2否)',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '报表主表';

-- ----------------------------
-- Records of bpm_report_list
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_report_user
-- ----------------------------
DROP TABLE IF EXISTS `bpm_report_user`;
CREATE TABLE `bpm_report_user`  (
  `ID_` varchar(64)  NOT NULL,
  `REPORT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '报表授权主表ID',
  `OWNER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '授权对象ID',
  `OWNER_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '授权对象名称',
  `RIGHT_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '授权对象类型(角色,用户,岗位等)',
  `AUTH_ORG_` varchar(255)  NULL DEFAULT NULL COMMENT '主组织ID',
  `AUTH_ORG_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '主组织名称',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_REPORTUSER_REPORTID`(`REPORT_ID_` ASC) USING BTREE
)COMMENT = '报表授权表';

-- ----------------------------
-- Records of bpm_report_user
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_save_opinion
-- ----------------------------
DROP TABLE IF EXISTS `bpm_save_opinion`;
CREATE TABLE `bpm_save_opinion`  (
  `ID_` varchar(255)  NOT NULL COMMENT '主键ID',
  `PROC_INST_ID_` varchar(255)  NOT NULL COMMENT '流程实例ID',
  `TASK_ID_` varchar(255)  NOT NULL COMMENT '任务ID',
  `OPINION_` varchar(2000)  NOT NULL COMMENT '暂存的审批意见',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '更新人',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_SAVEOPINION_PROCINSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_SAVEOPINION_TASKID`(`TASK_ID_` ASC) USING BTREE
)COMMENT = '审批意见暂存表';

-- ----------------------------
-- Records of bpm_save_opinion
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_script
-- ----------------------------
DROP TABLE IF EXISTS `bpm_script`;
CREATE TABLE `bpm_script`  (
  `ID_` varchar(64)  NOT NULL,
  `NAME_` varchar(150)  NULL DEFAULT NULL,
  `SCRIPT_` text  NULL COMMENT '脚本',
  `CATEGORY_` varchar(128)  NULL DEFAULT NULL COMMENT '脚本分类',
  `MEMO_` varchar(1000)  NULL DEFAULT NULL,
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人所属组织ID',
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '更新人ID',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `DS_NAME_` varchar(50)  NULL DEFAULT NULL COMMENT '数据源名称',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_SCRIPT_NAME`(`NAME_` ASC) USING BTREE
)COMMENT = '常用脚本';

-- ----------------------------
-- Records of bpm_script
-- ----------------------------
INSERT INTO `bpm_script` VALUES ('10', '获取cmd对象', 'return scriptImpl.getActionCmd();', '系统脚本', '', NULL, NULL, NULL, NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('11', '获取当前用户的主组织名称', 'return scriptImpl.getIUserMainOrgName();', '系统脚本', '', NULL, NULL, NULL, NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('12', '获取当前用户的主组织ID', 'return scriptImpl.getIUserMainOrgID();', '系统脚本', '', NULL, NULL, NULL, NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('1269805454708576256', '获取当前年份', 'return scriptImpl.getCurrentYear();', '系统脚本', '获取当前年份，例如\"2020\"', NULL, '1', '', NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('1269805555023745024', '获取当前月份', 'return scriptImpl.getCurrentMonth();', '系统脚本', '获取当前月份，例如\"06\"', NULL, '1', '', NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('13', '获取当前用户的岗位名称', 'return scriptImpl.getIUserPostName();', '系统脚本', '返回：Set(String)', NULL, NULL, NULL, NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('1310142489381965824', '获取当前登录用户的id', 'return scriptImpl.getCurrentUserId();', '系统脚本', '', NULL, '1', '', NULL, NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1310143493599006720', '获取当前登录用户账号', 'return scriptImpl.getCurrentAccount()', '系统脚本', '返回String', NULL, '1', '', NULL, NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1310143776035049472', '获取职务级别', 'return scriptImpl.getMainPostName(\"postLevel\");', '系统脚本', '', NULL, '1', '', NULL, NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1310147332251193344', '根据级别获取当前登录用户组织编码', 'return scriptImpl.getString(orgScript.getParentMainOrg(\"1\").getGroupCode());', '系统脚本', '集团1，公司2，部门3', NULL, '1', '', NULL, NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1310149027446263808', '获取当前用户的角色名称', 'return scriptImpl.getIUserRoleName();', '系统脚本', '返回字符串数组', NULL, '1', '', NULL, NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1310150341488152576', '获取组织参数值', 'return orgScript.getParamKey(\'\',\'\');', '系统脚本', '组织id，组织参数编码', NULL, '1', '', NULL, NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1310153058105298944', '根据id获取工号', 'return scriptImpl.getUser(\"1\").getAccount();', '系统脚本', '', NULL, '1', '', NULL, NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1310155448002940928', '判断组织参数', 'return orgScript.isOrgHasParamKey(\'\',\'\')', '系统脚本', '组织ID，参数别名', NULL, NULL, NULL, '1', NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1338310603730718720', '根据组织ID和参数判断组织是否有该参数', 'return orgScript.isOrgHasParamKey(\'\',\'\');', '系统脚本', '组织ID(String)，组织参数(String)', NULL, '1', '', '1', NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1338321870394626048', '根据级别获取当前用户组织ID', 'return orgScript.getParamMainOrgId(\'\');', '系统脚本', 'param:grade(String)', NULL, '1', '', '1', NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1338326076463648768', '获取当前用户主岗位名称', 'return scriptImpl.getCurrentMainPostName();', '系统脚本', '无参数', NULL, '1', '', '1', NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1338326248547553280', '获取当前用户主岗位ID', 'return scriptImpl.getCurrentMainPostId();', '系统脚本', '无参数', NULL, '1', '', '1', NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1338326415497629696', '获取当前用户主岗位编码', 'return scriptImpl.getCurrentMainPostId();', '系统脚本', '无参数', NULL, '1', '', '1', NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1338334576715632640', '执行sql', 'return scriptImpl.executeSql(\'\');', '系统脚本', '参数：sql(String)，参数中加入<#id#>，在流程中会替换成表单数据主键。返回值只有一行一列(String)', NULL, '1', '', '1', NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('1338364268277534720', '判断当前用户是否拥有该角色', 'return scriptImpl.isCurrentInRole(\'\');', '系统脚本', '参数：角色别名', NULL, '1', '', NULL, NULL, NULL, NULL);
INSERT INTO `bpm_script` VALUES ('14', '获取当前用户的岗位ID', 'return scriptImpl.getIUserPostID();', '系统脚本', '返回：Set(String)', NULL, NULL, NULL, NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('15', '获取当前用户的角色名称', 'return scriptImpl.getIUserRoleName();', '系统脚本', '返回：Set(String)', NULL, NULL, NULL, NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('16', '获取当前用户的角色ID', 'return scriptImpl.getIUserRoleID();', '系统脚本', '返回：Set(String)', NULL, NULL, NULL, NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('7', '获取当前用户名称', 'return scriptImpl.getCurrentUserName();', '系统脚本', '', NULL, NULL, NULL, NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('8', '获取当前日期', 'return scriptImpl.getCurrentDate();', '系统脚本', '获取当前日期，例如\"2002-11-06\"', NULL, NULL, NULL, NULL, NULL, '-1', NULL);
INSERT INTO `bpm_script` VALUES ('9', '获取当前日期（指定格式）', 'return scriptImpl.getCurrentDateByStyle(String style);', '系统脚本', '获取当前日期，按指定格式输出', NULL, NULL, NULL, NULL, NULL, '-1', NULL);

-- ----------------------------
-- Table structure for bpm_secretary_manage
-- ----------------------------
DROP TABLE IF EXISTS `bpm_secretary_manage`;
CREATE TABLE `bpm_secretary_manage`  (
  `ID_` varchar(64)  NOT NULL,
  `LEADER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '领导id',
  `LEADER_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '领导姓名',
  `SECRETARY_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '秘书id',
  `SECRETARY_NAME_` varchar(1024)  NULL DEFAULT NULL COMMENT '秘书姓名',
  `SHARE_TYPE_` varchar(2)  NULL DEFAULT NULL COMMENT '共享类型，1流程分类。2，流程定义',
  `SHARE_KEY_` text  NULL COMMENT '共享的key',
  `SHARE_NAME_` varchar(1024)  NULL DEFAULT NULL COMMENT '共享对象的名称',
  `ENABLED_` varchar(2)  NULL DEFAULT '1' COMMENT '是否有效',
  `SHARE_RIGHT_` varchar(10)  NULL DEFAULT NULL COMMENT '共享权限类型',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_SEC_SECRETARYID`(`SECRETARY_ID_` ASC) USING BTREE
)COMMENT = '秘书管理表';

-- ----------------------------
-- Records of bpm_secretary_manage
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_selector_def
-- ----------------------------
DROP TABLE IF EXISTS `bpm_selector_def`;
CREATE TABLE `bpm_selector_def`  (
  `ID_` varchar(64)  NOT NULL,
  `NAME_` varchar(40)  NULL DEFAULT NULL COMMENT '名称',
  `ALIAS_` varchar(64)  NULL DEFAULT NULL COMMENT '别名',
  `GROUP_FIELD_` varchar(512)  NULL DEFAULT NULL COMMENT '组合字段',
  `BUTTONS_` varchar(512)  NULL DEFAULT NULL COMMENT '按钮定义',
  `IS_CUSTOM_` smallint NULL DEFAULT NULL COMMENT '系统预定义',
  `FLAG_` smallint NULL DEFAULT 0 COMMENT '标记是否系统默认',
  `METHOD_` varchar(64)  NULL DEFAULT NULL COMMENT '选择器对应的js方法名称',
  `CONF_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '已选数据参数的传递key',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_SELECTORDEF_ALIAS`(`ALIAS_` ASC) USING BTREE
)COMMENT = '控件组合定义';

-- ----------------------------
-- Records of bpm_selector_def
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_service_log
-- ----------------------------
DROP TABLE IF EXISTS `bpm_service_log`;
CREATE TABLE `bpm_service_log`  (
  `ID_` varchar(64)  NOT NULL,
  `SUBJECT_` varchar(600)  NULL DEFAULT NULL COMMENT ' 流程标题',
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT ' 流程定义ID',
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '节点ID',
  `STATUS_` int NULL DEFAULT NULL COMMENT '处理结果：1.处理成功  0.处理失败',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `PROC_INST_ID_`(`PROC_INST_ID_` ASC) USING BTREE
)COMMENT = '服务节点执行日志';

-- ----------------------------
-- Records of bpm_service_log
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_show_record
-- ----------------------------
DROP TABLE IF EXISTS `bpm_show_record`;
CREATE TABLE `bpm_show_record`  (
  `id_` varchar(32)  NOT NULL COMMENT '主键id',
  `account_` varchar(32)  NOT NULL COMMENT '查阅人账号',
  `full_name_` varchar(32)  NOT NULL COMMENT '查阅人名称',
  `show_time_` datetime NOT NULL COMMENT '查阅时间',
  `task_id_` varchar(32)  NULL DEFAULT NULL COMMENT '流程实例id或者任务id',
  `action_` varchar(32)  NULL DEFAULT NULL COMMENT '流程定义中的动作：发布新版本/保存',
  `show_type_` varchar(20)  NULL DEFAULT NULL COMMENT '展示类型：实例/任务/流程定义',
  `reasons_` text  NOT NULL COMMENT '查阅原因',
  `create_by_` varchar(32)  NULL DEFAULT NULL COMMENT '创建人',
  `create_time_` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `create_org_id_` varchar(32)  NULL DEFAULT NULL,
  `update_by_` varchar(32)  NULL DEFAULT NULL COMMENT '更新人',
  `update_time_` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `tenant_id_` varchar(32)  NULL DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id_`) USING BTREE,
  INDEX `show_record_task_id__show_type__index`(`task_id_` ASC, `show_type_` ASC) USING BTREE
)COMMENT = '流程实例和流程任务查阅记录';

-- ----------------------------
-- Records of bpm_show_record
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task`;
CREATE TABLE `bpm_task`  (
  `ID_` varchar(64)  NOT NULL,
  `NAME_` varchar(100)  NOT NULL COMMENT '任务名称',
  `SUBJECT_` varchar(256)  NULL DEFAULT NULL,
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '关联 - 流程实例ID',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '关联的任务ID',
  `EXEC_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '关联 - 节点执行ID',
  `NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '关联 - 任务节点ID',
  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT '关联 - 流程定义ID',
  `PROC_DEF_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '关联 - 流程业务主键',
  `PROC_DEF_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '关联 - 流程名称',
  `OWNER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务所属人ID',
  `OWNER_NAME_` varchar(128)  NULL DEFAULT NULL,
  `ASSIGNEE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务执行人ID',
  `ASSIGNEE_NAME_` varchar(128)  NULL DEFAULT NULL,
  `STATUS_` varchar(40)  NOT NULL COMMENT '任务状态',
  `PRIORITY_` int NULL DEFAULT NULL COMMENT '任务优先级',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `DUE_TIME_` datetime NULL DEFAULT NULL,
  `SUSPEND_STATE_` smallint NULL DEFAULT 0 COMMENT '是否挂起(0正常,1挂起)',
  `PARENT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父任务ID',
  `BPMN_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'bpmn实例ID',
  `BPMN_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'BPMN定义ID',
  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '分类ID',
  `SUPPORT_MOBILE_` int NULL DEFAULT 0 COMMENT '支持手机',
  `IS_DELE_` int NOT NULL DEFAULT 0 COMMENT '是否已删，1已删除，0未删除',
  `IS_READ_` int NULL DEFAULT NULL,
  `IS_REVOKE_` int NULL DEFAULT NULL,
  `PROP1_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性1',
  `PROP2_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性2',
  `PROP3_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性3',
  `PROP4_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性4',
  `PROP5_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性5',
  `PROP6_` text  NULL COMMENT '扩展属性6',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `MOBILE_TASK_URL_` varchar(200)  NULL DEFAULT NULL COMMENT '手机端任务地址',
  `PC_TASK_URL_` varchar(200)  NULL DEFAULT NULL COMMENT 'pc端任务地址',
  `TARGET_NODE_` varchar(255)  NULL DEFAULT NULL COMMENT '回到本节点',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_BPM_TASK_TASKID`(`TASK_ID_` ASC) USING BTREE,
  INDEX `IDX_BPM_TASK_PARENTID`(`PARENT_ID_` ASC) USING BTREE,
  INDEX `IDX_BPM_TASK_INSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_BPM_TASK_STATUS`(`STATUS_` ASC) USING BTREE,
  INDEX `IDX_BPM_TASK_OWNERID`(`OWNER_ID_` ASC) USING BTREE,
  INDEX `IDX_BPM_TASK_ASSIGNEEID`(`ASSIGNEE_ID_` ASC) USING BTREE
)COMMENT = '流程任务';

-- ----------------------------
-- Records of bpm_task
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_candidate
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_candidate`;
CREATE TABLE `bpm_task_candidate`  (
  `ID_` varchar(64)  NOT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '候选人类型',
  `EXECUTOR_` varchar(64)  NULL DEFAULT NULL COMMENT '执行人ID',
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TASKCANDIDATE_TASKID`(`TASK_ID_` ASC) USING BTREE,
  INDEX `IDX_TASKCANDIDATE_PROCINSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_TASKCANDIDATE_EXECUTOR`(`EXECUTOR_` ASC) USING BTREE,
  INDEX `IDX_TASKCANDIDATE_TYPE`(`TYPE_` ASC) USING BTREE
)COMMENT = '任务候选人';

-- ----------------------------
-- Records of bpm_task_candidate
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_commu
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_commu`;
CREATE TABLE `bpm_task_commu`  (
  `ID_` varchar(64)  NOT NULL,
  `INSTANCE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `NODE_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '节点名称',
  `NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '节点ID',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `SENDER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '发送沟通人ID',
  `SENDER` varchar(128)  NULL DEFAULT NULL COMMENT '发送沟通人',
  `CREATETIME_` datetime NULL DEFAULT NULL,
  `OPINION_` varchar(1500)  NULL DEFAULT NULL COMMENT '意见',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TASKCOMMU_TASKID`(`TASK_ID_` ASC) USING BTREE,
  INDEX `IDX_TASKCOMMU_INSTANCEID`(`INSTANCE_ID_` ASC) USING BTREE
)COMMENT = '任务通知';

-- ----------------------------
-- Records of bpm_task_commu
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_due_time
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_due_time`;
CREATE TABLE `bpm_task_due_time`  (
  `ID_` varchar(64)  NOT NULL,
  `PARENT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父id',
  `INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例id',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务id',
  `DATE_TYPE_` varchar(32)  NULL DEFAULT NULL COMMENT '时间类型  工作日 worktime  日历日 caltime',
  `DUE_TIME_` int NULL DEFAULT NULL COMMENT '任务时间 (分钟)',
  `ADD_DUE_TIME_` int NULL DEFAULT NULL COMMENT '延迟时间',
  `START_TIME_` datetime NULL DEFAULT NULL,
  `EXPIRATION_DATE_` datetime NULL DEFAULT NULL,
  `REMAINING_TIME_` int NULL DEFAULT NULL COMMENT '任务剩余时间（分钟）',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `STATUS_` int NULL DEFAULT NULL COMMENT '状态 是否延期申请过 1申请过  0没延迟过',
  `USER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '审批人ID',
  `USER_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '审批人姓名',
  `REMARK_` varchar(512)  NULL DEFAULT NULL COMMENT '说明',
  `FILE_ID_` varchar(512)  NULL DEFAULT NULL COMMENT '附件',
  `IS_NEW_` int NULL DEFAULT NULL COMMENT '是否新的延迟 1 是  0 否 ',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_DUETIME_TASKID`(`TASK_ID_` ASC) USING BTREE
)COMMENT = '任务期限记录表';

-- ----------------------------
-- Records of bpm_task_due_time
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_follow
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_follow`;
CREATE TABLE `bpm_task_follow`  (
  `ID` varchar(255)  NOT NULL COMMENT '主键',
  `TASK_ID` varchar(255)  NULL DEFAULT NULL COMMENT '任务id',
  `CREATOR_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '创建者ID',
  `PRO_INST_` varchar(255)  NULL DEFAULT NULL COMMENT '流程实例id',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID`) USING BTREE
)COMMENT = '任务跟踪表';

-- ----------------------------
-- Records of bpm_task_follow
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_notice
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_notice`;
CREATE TABLE `bpm_task_notice`  (
  `ID_` varchar(64)  NOT NULL,
  `NAME_` varchar(64)  NOT NULL COMMENT '任务名称',
  `SUBJECT_` varchar(128)  NOT NULL COMMENT '待办事项标题',
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '关联 - 流程实例ID',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '关联的任务ID',
  `EXEC_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '关联 - 节点执行ID',
  `NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '关联 - 任务节点ID',
  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT '关联 - 流程定义ID',
  `PROC_DEF_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '关联 - 流程业务主键',
  `PROC_DEF_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '关联 - 流程名称',
  `OWNER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务所属人ID',
  `OWNER_NAME_` varchar(128)  NULL DEFAULT NULL,
  `ASSIGNEE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务执行人ID',
  `ASSIGNEE_NAME_` varchar(128)  NULL DEFAULT NULL,
  `STATUS_` varchar(40)  NOT NULL COMMENT '任务状态',
  `PRIORITY_` int NULL DEFAULT NULL COMMENT '任务优先级',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `DUE_TIME_` datetime NULL DEFAULT NULL,
  `SUSPEND_STATE_` smallint NULL DEFAULT 0 COMMENT '是否挂起(0正常,1挂起)',
  `PARENT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父任务ID',
  `BPMN_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'bpmn实例ID',
  `BPMN_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'BPMN定义ID',
  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '分类ID',
  `SUPPORT_MOBILE_` int NULL DEFAULT 0 COMMENT '支持手机',
  `IS_DELE_` int NOT NULL DEFAULT 0 COMMENT '是否已删，1已删除，0未删除',
  `IS_READ_` int NOT NULL DEFAULT 0 COMMENT '传阅的任务是否已阅 0:待阅，1：已阅',
  `IS_REVOKE_` int NOT NULL DEFAULT 0 COMMENT '传阅的任务是否撤回 0:否，1：是',
  `PROP1_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性1',
  `PROP2_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性2',
  `PROP3_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性3',
  `PROP4_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性4',
  `PROP5_` varchar(200)  NULL DEFAULT NULL COMMENT '扩展属性5',
  `PROP6_` text  NULL COMMENT '扩展属性6',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `MOBILE_TASK_URL_` varchar(200)  NULL DEFAULT NULL COMMENT '手机端任务地址',
  `PC_TASK_URL_` varchar(200)  NULL DEFAULT NULL COMMENT 'pc端任务地址',
  `OPINION_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '传阅时审批意见id,不为空时根据此id查找审批意见里的数据',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_BPMTASK_INSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_BPMTASK_PARENTID`(`PARENT_ID_` ASC) USING BTREE,
  INDEX `IDX_BPMTASK_TASKID`(`TASK_ID_` ASC) USING BTREE,
  INDEX `IDX_BPMTASK_USERID`(`ASSIGNEE_ID_` ASC) USING BTREE,
  INDEX `IDX_TASK_NOTICE_OWNER_ID`(`OWNER_ID_` ASC) USING BTREE
)COMMENT = '知会任务表';

-- ----------------------------
-- Records of bpm_task_notice
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_notice_done
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_notice_done`;
CREATE TABLE `bpm_task_notice_done`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_DEF_ID_` varchar(64)  NOT NULL COMMENT '流程定义ID',
  `SUP_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '父流程实例ID',
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '流程实例ID',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `TASK_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '任务定义Key',
  `TASK_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '任务名称',
  `TOKEN_` varchar(64)  NULL DEFAULT NULL COMMENT '任务令牌',
  `QUALFIEDS_` text  NULL COMMENT '有审批资格用户ID串',
  `QUALFIED_NAMES_` text  NULL COMMENT '有审批资格用户名称串',
  `AUDITOR_` varchar(64)  NULL DEFAULT NULL COMMENT '执行人ID',
  `AUDITOR_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '执行人名',
  `ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '组织ID',
  `ORG_PATH_` varchar(600)  NULL DEFAULT NULL COMMENT '组织全路径',
  `OPINION_` varchar(4000)  NULL DEFAULT NULL COMMENT '审批意见',
  `STATUS_` varchar(40)  NOT NULL COMMENT '知会任务已办状态',
  `FORM_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '表单定义ID',
  `FORM_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '表单名',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `ASSIGN_TIME_` datetime NULL DEFAULT NULL,
  `COMPLETE_TIME_` datetime NULL DEFAULT NULL,
  `DUR_MS_` int NULL DEFAULT NULL COMMENT '持续时间(ms)',
  `FILES_` varchar(4000)  NULL DEFAULT NULL COMMENT '附件',
  `INTERPOSE_` smallint NULL DEFAULT NULL COMMENT '是否干预',
  `SUBJECT_` varchar(255)  NULL DEFAULT NULL COMMENT '流程标题',
  `PROC_DEF_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '任务名称',
  `BPM_TASK_NOTICE_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '知会待办主键ID',
  `SUPPORT_MOBILE_` int NULL DEFAULT 0 COMMENT '是否支持手机0：不支持，1：支持',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TND_INSTID`(`PROC_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_OPINION_SUPINSTID`(`SUP_INST_ID_` ASC) USING BTREE,
  INDEX `IDX_NOTICE_TASK`(`TASK_ID_` ASC) USING BTREE,
  INDEX `IDX_TASK_NDP_DEF_ID`(`PROC_DEF_ID_` ASC) USING BTREE
)COMMENT = '知会任务已办';

-- ----------------------------
-- Records of bpm_task_notice_done
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_read
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_read`;
CREATE TABLE `bpm_task_read`  (
  `READ_ID_` varchar(64)  NOT NULL COMMENT '主键',
  `PROC_DEF_ID` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义ID',
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `NODE_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '节点ID',
  `READ_TIME_` datetime NULL DEFAULT NULL,
  `USER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '用户ID',
  `USER_NAME_` varchar(32)  NULL DEFAULT NULL COMMENT '用户名',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`READ_ID_`) USING BTREE
)COMMENT = '流程任务查看';

-- ----------------------------
-- Records of bpm_task_read
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_reminder
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_reminder`;
CREATE TABLE `bpm_task_reminder`  (
  `ID_` varchar(64)  NOT NULL,
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '催办任务ID',
  `NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '催办名称',
  `REL_DATE_` datetime NULL DEFAULT NULL,
  `DUE_ACTION_` varchar(64)  NULL DEFAULT NULL COMMENT '到期执行动作',
  `DUE_SCRIPT_` varchar(255)  NULL DEFAULT NULL COMMENT '调用指定方法',
  `DUE_DATE_` datetime NULL DEFAULT NULL,
  `IS_SEND_MSG_` int NULL DEFAULT NULL COMMENT '期间是否发送催办',
  `MSG_SEND_DATE_` datetime NULL DEFAULT NULL,
  `MSG_INTERVAL_` int NULL DEFAULT NULL COMMENT '发送消息间隔',
  `MSG_COUNT_` int NULL DEFAULT NULL COMMENT '发送次数',
  `MSG_TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT '消息类型  inner,msg,email 等',
  `HTML_MSG_` varchar(255)  NULL DEFAULT NULL COMMENT '富文本',
  `PLAIN_MSG_` varchar(255)  NULL DEFAULT NULL COMMENT '纯文本消息',
  `WARNINGSET_` varchar(255)  NULL DEFAULT NULL COMMENT '预警配置（预警名称，triggerDate，change2level）',
  `TRIGGER_DATE_` datetime NULL DEFAULT NULL,
  `SEND_PERSON_` varchar(64)  NULL DEFAULT NULL,
  `SEND_USER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '发送个人ID',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `DURATION_SCRIPT_` text  NULL COMMENT '时长脚本',
  `DURATION_` int NULL DEFAULT NULL COMMENT '时长',
  `SEND_DURATION_` int NULL DEFAULT NULL COMMENT '消息时长',
  `DATE_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '类型 caltime日历日 worktime工作日',
  `TYPE_SCRIPT_` text  NULL COMMENT '类型脚本',
  `REL_TIME_SCRIPT_` text  NULL COMMENT '相对时间脚本',
  `TRANSFER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '转办人id',
  `TRANSFER_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '转办人名称',
  `DIRECT_LEADER_` int NULL DEFAULT NULL COMMENT '催办直接上级',
  `MAIN_ORG_LEADER_` int NULL DEFAULT NULL COMMENT '催办主组织负责人',
  `DIRECT_USER_IDS_` varchar(1000)  NULL DEFAULT NULL COMMENT '指定用户id',
  `DIRECT_USER_NAMES_` varchar(1000)  NULL DEFAULT NULL COMMENT '指定用户名称',
  `DIRECT_USER_` int NULL DEFAULT NULL COMMENT '催办指定用户',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TASK_REMINDER_TASK_ID`(`TASK_ID_` ASC) USING BTREE
)COMMENT = '任务催办';

-- ----------------------------
-- Records of bpm_task_reminder
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_sign_line
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_sign_line`;
CREATE TABLE `bpm_task_sign_line`  (
  `ID_` varchar(64)  NOT NULL,
  `INSTANCE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `PARENT_TASK_ID_` varchar(64)  NULL DEFAULT NULL,
  `PATH_` varchar(512)  NULL DEFAULT NULL COMMENT '路径',
  `STATUS_` varchar(64)  NULL DEFAULT NULL,
  `EXECUTOR_` varchar(2048)  NULL DEFAULT NULL COMMENT '执行人',
  `ACTION_` varchar(64)  NULL DEFAULT NULL COMMENT '并行签署后的动作 submit提交 back返回 ',
  `NODE_ID_` varchar(128)  NULL DEFAULT NULL COMMENT '节点id',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TASK_SIGN_LINE_TASK_ID`(`TASK_ID_` ASC) USING BTREE,
  INDEX `IDX_TASK_SIGN_LINE_INSTANCE_ID`(`INSTANCE_ID_` ASC) USING BTREE
)COMMENT = '并行签署';

-- ----------------------------
-- Records of bpm_task_sign_line
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_sign_sequence
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_sign_sequence`;
CREATE TABLE `bpm_task_sign_sequence`  (
  `ID_` varchar(64)  NOT NULL,
  `INSTANCE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例',
  `NODE_ID_` varchar(128)  NULL DEFAULT NULL COMMENT '节点key',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID',
  `NEXT_TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '下一任务ID',
  `PARENT_ID_` varchar(64)  NULL DEFAULT NULL,
  `STATUS_` varchar(64)  NULL DEFAULT NULL,
  `PATH_` varchar(512)  NULL DEFAULT NULL COMMENT '路径',
  `SEQ_` smallint NULL DEFAULT NULL COMMENT '顺序',
  `EXECUTOR_` varchar(2048)  NULL DEFAULT NULL COMMENT '执行人',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TASK_SIGN_SEQ_INST_ID`(`INSTANCE_ID_` ASC) USING BTREE,
  INDEX `IDX_TASK_SIGN_SEQUENCE_TASK_ID`(`TASK_ID_` ASC) USING BTREE
)COMMENT = '顺序签署人员';

-- ----------------------------
-- Records of bpm_task_sign_sequence
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_signdata
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_signdata`;
CREATE TABLE `bpm_task_signdata`  (
  `ID_` varchar(64)  NOT NULL,
  `DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义ID',
  `INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `EXECUTE_ID_` varchar(40)  NULL DEFAULT NULL COMMENT 'act运行实例Id',
  `ACT_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT 'ACT流程实例ID',
  `NODE_ID_` varchar(128)  NULL DEFAULT NULL COMMENT '节点ID',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程任务ID',
  `QUALIFIED_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '有资格审批的成员ID',
  `QUALIFIED_NAME_` varchar(512)  NULL DEFAULT NULL COMMENT '有资格审批的成员名称',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `VOTE_RESULT_` varchar(20)  NULL DEFAULT NULL COMMENT '投票结果(no 未投票 通过 agree,abandon 弃权,oppose 反对)',
  `VOTE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '投票人',
  `VOTER_` varchar(40)  NULL DEFAULT NULL COMMENT '投票人',
  `VOTE_TIME_` datetime NULL DEFAULT NULL,
  `INDEX_` int NULL DEFAULT NULL COMMENT '投票次序',
  `IS_ACTIVE_` int NULL DEFAULT NULL COMMENT '是否活动',
  `TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT '数据类型（NORMAL正常会签数据，ADDSIGN加签会签数据）',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  `IDENTITY_TYPE_` varchar(64)  NULL DEFAULT NULL COMMENT '用户组类型',
  `FROM_` varchar(64)  NULL DEFAULT NULL COMMENT '来源。assign由指定历史会签处理人产生的',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TASK_SIGNDATA_EXECUTE_ID`(`EXECUTE_ID_` ASC) USING BTREE,
  INDEX `IDX_TASK_SIGNDATA_NODE_ID`(`NODE_ID_` ASC) USING BTREE,
  INDEX `IDX_TASK_SIGNDATA_INST_ID_`(`INST_ID_` ASC) USING BTREE
)COMMENT = '会签数据';

-- ----------------------------
-- Records of bpm_task_signdata
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_trans
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_trans`;
CREATE TABLE `bpm_task_trans`  (
  `ID_` varchar(64)  NOT NULL,
  `INSTANCE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID\r\n流转任务ID',
  `ACTION_` varchar(20)  NULL DEFAULT NULL COMMENT '完成后的操作',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL,
  `CREATOR_` varchar(128)  NULL DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL,
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL,
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `DECIDE_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '决策类型\r\nagree\r\noppose',
  `VOTE_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '投票类型\r\namount\r\npercent',
  `VOTE_AMOUNT_` smallint NULL DEFAULT NULL COMMENT '票数',
  `SIGN_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '会签类型\r\nparallel,seq',
  `INQU_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '征询类型 direct step',
  `TOTAL_AMOUNT_` smallint NULL DEFAULT NULL COMMENT '总票数',
  `AGREE_AMOUNT_` smallint NULL DEFAULT NULL COMMENT '通过票数',
  `OPPOSE_AMOUNT_` smallint NULL DEFAULT NULL COMMENT '反对票数',
  `SEQ_` smallint NULL DEFAULT NULL COMMENT '投票次序',
  `USER_JSON_` varchar(4000)  NULL DEFAULT NULL COMMENT '用户数据',
  `ALLOW_FORM_EDIT_` smallint NULL DEFAULT NULL COMMENT '表单允许编辑',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TASK_TRANS_TASK_ID`(`TASK_ID_` ASC) USING BTREE,
  INDEX `IDX_TASK_TRANS_INSTANCE_ID`(`INSTANCE_ID_` ASC) USING BTREE
)COMMENT = '流程流转';

-- ----------------------------
-- Records of bpm_task_trans
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_trans_record
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_trans_record`;
CREATE TABLE `bpm_task_trans_record`  (
  `ID_` varchar(64)  NOT NULL,
  `PROC_INST_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程实例',
  `TASK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务ID\r\n流转任务ID',
  `ACTION_` varchar(20)  NULL DEFAULT NULL COMMENT '完成后的操作',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL,
  `CREATOR_` varchar(128)  NULL DEFAULT NULL COMMENT '创建人',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL,
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL,
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `DECIDE_TYPE` varchar(20)  NULL DEFAULT NULL COMMENT '决策类型\r\n同意 agree\r\n反对  oppose',
  `VOTE_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '投票类型',
  `VOTE_AMOUNT_` smallint NULL DEFAULT NULL COMMENT '票数',
  `SIGN_TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '会签类型',
  `TOTAL_AMOUNT_` smallint NULL DEFAULT NULL COMMENT '总票数',
  `AGREE_AMOUNT_` smallint NULL DEFAULT NULL COMMENT '通过票数',
  `OPPOSE_AMOUNT_` smallint NULL DEFAULT NULL COMMENT '反对票数',
  `TRANS_USERS_` varchar(300)  NULL DEFAULT NULL COMMENT '流转人员',
  `TASK_NAME_` varchar(200)  NULL DEFAULT NULL COMMENT '任务名称',
  `TASK_SUBJECT_` varchar(300)  NULL DEFAULT NULL COMMENT '流转任务标题',
  `STATUS_` smallint NULL DEFAULT NULL COMMENT '状态：0流转中 1流转结束 2已撤销',
  `TRANS_USER_IDS_` varchar(300)  NULL DEFAULT NULL COMMENT '流转人员ids',
  `TRANS_OPINION_` varchar(200)  NULL DEFAULT NULL COMMENT '流转意见(原因)',
  `TRANS_TIME_` datetime NULL DEFAULT NULL,
  `DEF_NAME_` varchar(200)  NULL DEFAULT NULL COMMENT '流程名称',
  `TRANS_OWNER_` varchar(64)  NULL DEFAULT NULL COMMENT '流转任务所属人ID',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TASK_TRANS_RECT_ID`(`TASK_ID_` ASC) USING BTREE
)COMMENT = '流程流转记录';

-- ----------------------------
-- Records of bpm_task_trans_record
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_turn
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_turn`;
CREATE TABLE `bpm_task_turn`  (
  `ID_` varchar(64)  NOT NULL,
  `TASK_ID_` varchar(64)  NOT NULL COMMENT '任务ID',
  `TASK_NAME_` varchar(64)  NOT NULL COMMENT '任务名称',
  `TASK_SUBJECT_` varchar(128)  NOT NULL COMMENT '待办事项标题',
  `NODE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '关联 - 任务节点ID',
  `PROC_INST_ID_` varchar(64)  NOT NULL COMMENT '关联 - 流程实例ID',
  `OWNER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务所属人ID',
  `OWNER_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '任务所属人姓名',
  `ASSIGNEE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务执行人ID',
  `ASSIGNEE_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '任务执行人姓名',
  `STATUS_` varchar(40)  NULL DEFAULT NULL COMMENT '状态。running=正在运行；finish=完成；cancel=取消',
  `TURN_TYPE_` varchar(40)  NULL DEFAULT NULL COMMENT '更改类型。agent=代理；shift=转办；copy_to=抄送',
  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '所属分类ID',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `FINISH_TIME_` datetime NULL DEFAULT NULL,
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TASKTURN_TASKID`(`TASK_ID_` ASC) USING BTREE
)COMMENT = '任务的执行更改，更改类型。agent=代理；shift=转办；copy_to=抄送';

-- ----------------------------
-- Records of bpm_task_turn
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_turnassign
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_turnassign`;
CREATE TABLE `bpm_task_turnassign`  (
  `ID_` varchar(64)  NOT NULL,
  `TASK_TURN_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '转交ID和task_turn表主键关联',
  `FROM_USER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '任务转交人ID',
  `FROM_USER_` varchar(64)  NULL DEFAULT NULL COMMENT '任务转交人',
  `RECEIVER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '接收人ID',
  `RECEIVER` varchar(64)  NULL DEFAULT NULL COMMENT '接收人',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `COMMENT_` varchar(1024)  NULL DEFAULT NULL COMMENT '备注',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TASK_TURN_TASK_TURN_ID`(`TASK_TURN_ID_` ASC) USING BTREE
)COMMENT = '任务指派人员';

-- ----------------------------
-- Records of bpm_task_turnassign
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_task_urgent
-- ----------------------------
DROP TABLE IF EXISTS `bpm_task_urgent`;
CREATE TABLE `bpm_task_urgent`  (
  `ID_` varchar(255)  NOT NULL,
  `TASK_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '任务ID',
  `NODE_NAME_` varchar(255)  NULL DEFAULT NULL COMMENT '节点名称',
  `INST_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `SUBJECT_` varchar(255)  NULL DEFAULT NULL COMMENT '流程标题',
  `CONTENT_` text  NULL COMMENT '催办内容',
  `URGRNT_DATE_` datetime NULL DEFAULT NULL,
  `PROMOTER_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '催办人ID',
  `PROMOTER_` varchar(255)  NULL DEFAULT NULL COMMENT '催办人',
  `APPOINTEE_ID_` text  NULL COMMENT '被催办人ID',
  `APPOINTEE_` text  NULL COMMENT '被催办人',
  `TYPE_` varchar(255)  NULL DEFAULT NULL COMMENT '催办类型',
  `APPOINTEE_SECRETARY_CONF_` varchar(1024)  NULL DEFAULT NULL COMMENT '催办的领导和秘书的id关系map，方便秘书回复时确定代哪个领导审批的',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '人工催办表';

-- ----------------------------
-- Records of bpm_task_urgent
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_test_case
-- ----------------------------
DROP TABLE IF EXISTS `bpm_test_case`;
CREATE TABLE `bpm_test_case`  (
  `ID_` varchar(64)  NOT NULL,
  `NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '测试用例名称',
  `BO_FORM_DATA_` text  NULL COMMENT '表单数据',
  `FLOW_VARS_` text  NULL COMMENT '流程变量',
  `ACTION_TYPE_` text  NULL COMMENT '审批动作， 默认动作时 agree',
  `STARTOR_` text  NULL COMMENT '发起人json',
  `BPM_DEBUGGER_` text  NULL COMMENT '断点测试设置',
  `DEF_KEY_` varchar(64)  NULL DEFAULT NULL COMMENT '流程定义key',
  `STARTOR_ACCOUNT_` varchar(64)  NULL DEFAULT NULL COMMENT '发起人账号',
  `STARTOR_FULL_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '发起人姓名',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '流程仿真测试用例表';

-- ----------------------------
-- Records of bpm_test_case
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_test_case_logs
-- ----------------------------
DROP TABLE IF EXISTS `bpm_test_case_logs`;
CREATE TABLE `bpm_test_case_logs`  (
  `ID_` varchar(64)  NOT NULL COMMENT '主键ID',
  `OPE_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '操作名称',
  `EXECUTION_TIME_` datetime NULL DEFAULT NULL,
  `OPE_CONTENT_` longtext  NULL COMMENT '操作内容',
  `TENANT_ID_` varchar(255)  NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '流程仿真异常日志';

-- ----------------------------
-- Records of bpm_test_case_logs
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_trans_receiver
-- ----------------------------
DROP TABLE IF EXISTS `bpm_trans_receiver`;
CREATE TABLE `bpm_trans_receiver`  (
  `ID_` varchar(64)  NOT NULL,
  `TRANS_RECORDID_` varchar(64)  NULL DEFAULT NULL COMMENT '流转任务记录ID',
  `RECEIVER_` varchar(100)  NULL DEFAULT NULL COMMENT '流转接受人员',
  `RECEIVER_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流转接收人id',
  `STATUS_` smallint NULL DEFAULT NULL COMMENT '状态:0尚未处理1已处理',
  `OPINION_` varchar(500)  NULL DEFAULT NULL COMMENT '审核意见',
  `RECEIVER_TIME_` datetime NULL DEFAULT NULL,
  `CHECK_TIME_` datetime NULL DEFAULT NULL,
  `CHECK_TYPE_` smallint NULL DEFAULT NULL COMMENT '审核状态',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_TRANS_REC_TRANS_RDID`(`TRANS_RECORDID_` ASC) USING BTREE
)COMMENT = '流转任务接收人';

-- ----------------------------
-- Records of bpm_trans_receiver
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_trans_record
-- ----------------------------
DROP TABLE IF EXISTS `bpm_trans_record`;
CREATE TABLE `bpm_trans_record`  (
  `ID_` varchar(64)  NOT NULL,
  `TYPE_` varchar(20)  NULL DEFAULT NULL COMMENT '移交类型',
  `TRANSFER_` varchar(64)  NULL DEFAULT NULL COMMENT '移交人ID',
  `TRANSFER_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '移交人姓名',
  `TRANSFERED_` varchar(64)  NULL DEFAULT NULL,
  `TRANSFERED_NAME_` varchar(64)  NULL DEFAULT NULL COMMENT '被移交人姓名',
  `REASON_` varchar(2000)  NULL DEFAULT NULL COMMENT '移交原因',
  `CREATE_TIME_` datetime NULL DEFAULT NULL,
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人ID',
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL,
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL,
  `UPDATE_TIME_` datetime NULL DEFAULT NULL,
  `RESULT_` varchar(2000)  NULL DEFAULT NULL COMMENT '移交结果',
  `VAR_` int NULL DEFAULT NULL COMMENT '移交方式',
  `PROC_INST_IDS_` varchar(2000)  NULL DEFAULT NULL COMMENT '流程实例ID',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '移交记录';

-- ----------------------------
-- Records of bpm_trans_record
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_watermark
-- ----------------------------
DROP TABLE IF EXISTS `bpm_watermark`;
CREATE TABLE `bpm_watermark`  (
  `ID_` varchar(64)  NOT NULL COMMENT '主键',
  `NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '名称',
  `CONTENT_` longtext  NULL,
  `TYPE_` smallint NULL DEFAULT NULL COMMENT '类型 1文字 2图片',
  `COLOR_` varchar(32)  NULL DEFAULT NULL COMMENT '颜色 透明度',
  `AMOUNT_` int NULL DEFAULT NULL COMMENT '页面展示数量',
  `CREATE_TIME_` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `CREATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人',
  `UPDATE_TIME_` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `UPDATE_BY_` varchar(64)  NULL DEFAULT NULL COMMENT '更新人',
  `CREATE_ORG_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '创建人组织ID',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '流程水印';

-- ----------------------------
-- Records of bpm_watermark
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_watermark_process
-- ----------------------------
DROP TABLE IF EXISTS `bpm_watermark_process`;
CREATE TABLE `bpm_watermark_process`  (
  `ID_` varchar(64)  NOT NULL COMMENT 'ID',
  `PROC_DEF_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '流程ID',
  `PROC_DEF_KEY_` varchar(128)  NULL DEFAULT NULL COMMENT '流程KEY',
  `PROC_DEF_NAME_` varchar(128)  NULL DEFAULT NULL COMMENT '流程名称',
  `WATERMARK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '水印ID',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`) USING BTREE
)COMMENT = '水印分配流程';

-- ----------------------------
-- Records of bpm_watermark_process
-- ----------------------------

-- ----------------------------
-- Table structure for bpm_watermark_type
-- ----------------------------
DROP TABLE IF EXISTS `bpm_watermark_type`;
CREATE TABLE `bpm_watermark_type`  (
  `ID_` varchar(64)  NOT NULL COMMENT '主键',
  `TYPE_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '分类ID',
  `WATERMARK_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '水印ID',
  `TYPE_NAME_` varchar(256)  NULL DEFAULT NULL COMMENT '分类名称',
  `TENANT_ID_` varchar(64)  NULL DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`ID_`) USING BTREE,
  INDEX `IDX_WATE_TYPE_WMA_ID`(`WATERMARK_ID_` ASC) USING BTREE
)COMMENT = '水印分配分类';

-- ----------------------------
-- Records of bpm_watermark_type
-- ----------------------------
SET FOREIGN_KEY_CHECKS = 1;
