/*
SQLyog Community v13.1.6 (64 bit)
MySQL - 5.7.44 : Database - zrch-stm-db
*********************************************************************
*/

/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*Table structure for table `act_evt_log` */

DROP TABLE IF EXISTS `act_evt_log`;

CREATE TABLE `act_evt_log` (
  `LOG_NR_` bigint(20) NOT NULL AUTO_INCREMENT,
  `TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TIME_STAMP_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DATA_` longblob,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  `IS_PROCESSED_` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`LOG_NR_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ge_bytearray` */

DROP TABLE IF EXISTS `act_ge_bytearray`;

CREATE TABLE `act_ge_bytearray` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `BYTES_` longblob,
  `GENERATED_` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_FK_BYTEARR_DEPL` (`DEPLOYMENT_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_BYTEARR_DEPL` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_re_deployment` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ge_property` */

DROP TABLE IF EXISTS `act_ge_property`;

CREATE TABLE `act_ge_property` (
  `NAME_` varchar(64) COLLATE utf8_bin NOT NULL,
  `VALUE_` varchar(300) COLLATE utf8_bin DEFAULT NULL,
  `REV_` int(11) DEFAULT NULL,
  PRIMARY KEY (`NAME_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_hi_actinst` */

DROP TABLE IF EXISTS `act_hi_actinst`;

CREATE TABLE `act_hi_actinst` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT '1',
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `ACT_ID_` varchar(255) COLLATE utf8_bin NOT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CALL_PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ACT_TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint(20) DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_HI_ACT_INST_START` (`START_TIME_`) USING BTREE,
  KEY `ACT_IDX_HI_ACT_INST_END` (`END_TIME_`) USING BTREE,
  KEY `ACT_IDX_HI_ACT_INST_PROCINST` (`PROC_INST_ID_`,`ACT_ID_`) USING BTREE,
  KEY `ACT_IDX_HI_ACT_INST_EXEC` (`EXECUTION_ID_`,`ACT_ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_hi_attachment` */

DROP TABLE IF EXISTS `act_hi_attachment`;

CREATE TABLE `act_hi_attachment` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `URL_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CONTENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_hi_comment` */

DROP TABLE IF EXISTS `act_hi_comment`;

CREATE TABLE `act_hi_comment` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TIME_` datetime(3) NOT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACTION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `MESSAGE_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `FULL_MSG_` longblob,
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_hi_detail` */

DROP TABLE IF EXISTS `act_hi_detail`;

CREATE TABLE `act_hi_detail` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACT_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  `VAR_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REV_` int(11) DEFAULT NULL,
  `TIME_` datetime(3) NOT NULL,
  `BYTEARRAY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint(20) DEFAULT NULL,
  `TEXT_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_HI_DETAIL_PROC_INST` (`PROC_INST_ID_`) USING BTREE,
  KEY `ACT_IDX_HI_DETAIL_ACT_INST` (`ACT_INST_ID_`) USING BTREE,
  KEY `ACT_IDX_HI_DETAIL_TIME` (`TIME_`) USING BTREE,
  KEY `ACT_IDX_HI_DETAIL_NAME` (`NAME_`) USING BTREE,
  KEY `ACT_IDX_HI_DETAIL_TASK_ID` (`TASK_ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_hi_entitylink` */

DROP TABLE IF EXISTS `act_hi_entitylink`;

CREATE TABLE `act_hi_entitylink` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `LINK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HIERARCHY_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_HI_ENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`) USING BTREE,
  KEY `ACT_IDX_HI_ENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_hi_identitylink` */

DROP TABLE IF EXISTS `act_hi_identitylink`;

CREATE TABLE `act_hi_identitylink` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `GROUP_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_HI_IDENT_LNK_USER` (`USER_ID_`) USING BTREE,
  KEY `ACT_IDX_HI_IDENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_HI_IDENT_LNK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_HI_IDENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_HI_IDENT_LNK_TASK` (`TASK_ID_`) USING BTREE,
  KEY `ACT_IDX_HI_IDENT_LNK_PROCINST` (`PROC_INST_ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_hi_procinst` */

DROP TABLE IF EXISTS `act_hi_procinst`;

CREATE TABLE `act_hi_procinst` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT '1',
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `BUSINESS_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint(20) DEFAULT NULL,
  `START_USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `END_ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUPER_PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CALLBACK_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CALLBACK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REFERENCE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REFERENCE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  UNIQUE KEY `PROC_INST_ID_` (`PROC_INST_ID_`) USING BTREE,
  KEY `ACT_IDX_HI_PRO_INST_END` (`END_TIME_`) USING BTREE,
  KEY `ACT_IDX_HI_PRO_I_BUSKEY` (`BUSINESS_KEY_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_hi_taskinst` */

DROP TABLE IF EXISTS `act_hi_taskinst`;

CREATE TABLE `act_hi_taskinst` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT '1',
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_DEF_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROPAGATED_STAGE_INST_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PARENT_TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `CLAIM_TIME_` datetime(3) DEFAULT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint(20) DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `PRIORITY_` int(11) DEFAULT NULL,
  `DUE_DATE_` datetime(3) DEFAULT NULL,
  `FORM_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `LAST_UPDATED_TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_HI_TASK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_HI_TASK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_HI_TASK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_HI_TASK_INST_PROCINST` (`PROC_INST_ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_hi_tsk_log` */

DROP TABLE IF EXISTS `act_hi_tsk_log`;

CREATE TABLE `act_hi_tsk_log` (
  `ID_` bigint(20) NOT NULL AUTO_INCREMENT,
  `TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `TIME_STAMP_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DATA_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_hi_varinst` */

DROP TABLE IF EXISTS `act_hi_varinst`;

CREATE TABLE `act_hi_varinst` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT '1',
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  `VAR_TYPE_` varchar(100) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `BYTEARRAY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint(20) DEFAULT NULL,
  `TEXT_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `LAST_UPDATED_TIME_` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_HI_PROCVAR_NAME_TYPE` (`NAME_`,`VAR_TYPE_`) USING BTREE,
  KEY `ACT_IDX_HI_VAR_SCOPE_ID_TYPE` (`SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_HI_VAR_SUB_ID_TYPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_HI_PROCVAR_PROC_INST` (`PROC_INST_ID_`) USING BTREE,
  KEY `ACT_IDX_HI_PROCVAR_TASK_ID` (`TASK_ID_`) USING BTREE,
  KEY `ACT_IDX_HI_PROCVAR_EXE` (`EXECUTION_ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_id_bytearray` */

DROP TABLE IF EXISTS `act_id_bytearray`;

CREATE TABLE `act_id_bytearray` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `BYTES_` longblob,
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_id_group` */

DROP TABLE IF EXISTS `act_id_group`;

CREATE TABLE `act_id_group` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_id_info` */

DROP TABLE IF EXISTS `act_id_info`;

CREATE TABLE `act_id_info` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `USER_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `VALUE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PASSWORD_` longblob,
  `PARENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_id_membership` */

DROP TABLE IF EXISTS `act_id_membership`;

CREATE TABLE `act_id_membership` (
  `USER_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `GROUP_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`USER_ID_`,`GROUP_ID_`) USING BTREE,
  KEY `ACT_FK_MEMB_GROUP` (`GROUP_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_MEMB_GROUP` FOREIGN KEY (`GROUP_ID_`) REFERENCES `act_id_group` (`ID_`),
  CONSTRAINT `ACT_FK_MEMB_USER` FOREIGN KEY (`USER_ID_`) REFERENCES `act_id_user` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_id_priv` */

DROP TABLE IF EXISTS `act_id_priv`;

CREATE TABLE `act_id_priv` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  UNIQUE KEY `ACT_UNIQ_PRIV_NAME` (`NAME_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_id_priv_mapping` */

DROP TABLE IF EXISTS `act_id_priv_mapping`;

CREATE TABLE `act_id_priv_mapping` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `PRIV_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `GROUP_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_FK_PRIV_MAPPING` (`PRIV_ID_`) USING BTREE,
  KEY `ACT_IDX_PRIV_USER` (`USER_ID_`) USING BTREE,
  KEY `ACT_IDX_PRIV_GROUP` (`GROUP_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_PRIV_MAPPING` FOREIGN KEY (`PRIV_ID_`) REFERENCES `act_id_priv` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_id_property` */

DROP TABLE IF EXISTS `act_id_property`;

CREATE TABLE `act_id_property` (
  `NAME_` varchar(64) COLLATE utf8_bin NOT NULL,
  `VALUE_` varchar(300) COLLATE utf8_bin DEFAULT NULL,
  `REV_` int(11) DEFAULT NULL,
  PRIMARY KEY (`NAME_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_id_token` */

DROP TABLE IF EXISTS `act_id_token`;

CREATE TABLE `act_id_token` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `TOKEN_VALUE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TOKEN_DATE_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
  `IP_ADDRESS_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `USER_AGENT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TOKEN_DATA_` varchar(2000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_id_user` */

DROP TABLE IF EXISTS `act_id_user`;

CREATE TABLE `act_id_user` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `FIRST_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `LAST_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DISPLAY_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EMAIL_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PWD_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PICTURE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_procdef_info` */

DROP TABLE IF EXISTS `act_procdef_info`;

CREATE TABLE `act_procdef_info` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `INFO_JSON_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  UNIQUE KEY `ACT_UNIQ_INFO_PROCDEF` (`PROC_DEF_ID_`) USING BTREE,
  KEY `ACT_IDX_INFO_PROCDEF` (`PROC_DEF_ID_`) USING BTREE,
  KEY `ACT_FK_INFO_JSON_BA` (`INFO_JSON_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_INFO_JSON_BA` FOREIGN KEY (`INFO_JSON_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_INFO_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_re_deployment` */

DROP TABLE IF EXISTS `act_re_deployment`;

CREATE TABLE `act_re_deployment` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `DEPLOY_TIME_` timestamp(3) NULL DEFAULT NULL,
  `DERIVED_FROM_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DERIVED_FROM_ROOT_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PARENT_DEPLOYMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ENGINE_VERSION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_re_model` */

DROP TABLE IF EXISTS `act_re_model`;

CREATE TABLE `act_re_model` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LAST_UPDATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `VERSION_` int(11) DEFAULT NULL,
  `META_INFO_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EDITOR_SOURCE_VALUE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EDITOR_SOURCE_EXTRA_VALUE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_FK_MODEL_SOURCE` (`EDITOR_SOURCE_VALUE_ID_`) USING BTREE,
  KEY `ACT_FK_MODEL_SOURCE_EXTRA` (`EDITOR_SOURCE_EXTRA_VALUE_ID_`) USING BTREE,
  KEY `ACT_FK_MODEL_DEPLOYMENT` (`DEPLOYMENT_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_MODEL_DEPLOYMENT` FOREIGN KEY (`DEPLOYMENT_ID_`) REFERENCES `act_re_deployment` (`ID_`),
  CONSTRAINT `ACT_FK_MODEL_SOURCE` FOREIGN KEY (`EDITOR_SOURCE_VALUE_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_MODEL_SOURCE_EXTRA` FOREIGN KEY (`EDITOR_SOURCE_EXTRA_VALUE_ID_`) REFERENCES `act_ge_bytearray` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_re_procdef` */

DROP TABLE IF EXISTS `act_re_procdef`;

CREATE TABLE `act_re_procdef` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `KEY_` varchar(255) COLLATE utf8_bin NOT NULL,
  `VERSION_` int(11) NOT NULL,
  `DEPLOYMENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `RESOURCE_NAME_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DGRM_RESOURCE_NAME_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `HAS_START_FORM_KEY_` tinyint(4) DEFAULT NULL,
  `HAS_GRAPHICAL_NOTATION_` tinyint(4) DEFAULT NULL,
  `SUSPENSION_STATE_` int(11) DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `ENGINE_VERSION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DERIVED_FROM_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DERIVED_FROM_ROOT_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DERIVED_VERSION_` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID_`) USING BTREE,
  UNIQUE KEY `ACT_UNIQ_PROCDEF` (`KEY_`,`VERSION_`,`DERIVED_VERSION_`,`TENANT_ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_actinst` */

DROP TABLE IF EXISTS `act_ru_actinst`;

CREATE TABLE `act_ru_actinst` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT '1',
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `ACT_ID_` varchar(255) COLLATE utf8_bin NOT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CALL_PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ACT_TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_TIME_` datetime(3) NOT NULL,
  `END_TIME_` datetime(3) DEFAULT NULL,
  `DURATION_` bigint(20) DEFAULT NULL,
  `DELETE_REASON_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_RU_ACTI_START` (`START_TIME_`) USING BTREE,
  KEY `ACT_IDX_RU_ACTI_END` (`END_TIME_`) USING BTREE,
  KEY `ACT_IDX_RU_ACTI_PROC` (`PROC_INST_ID_`) USING BTREE,
  KEY `ACT_IDX_RU_ACTI_PROC_ACT` (`PROC_INST_ID_`,`ACT_ID_`) USING BTREE,
  KEY `ACT_IDX_RU_ACTI_EXEC` (`EXECUTION_ID_`) USING BTREE,
  KEY `ACT_IDX_RU_ACTI_EXEC_ACT` (`EXECUTION_ID_`,`ACT_ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_deadletter_job` */

DROP TABLE IF EXISTS `act_ru_deadletter_job`;

CREATE TABLE `act_ru_deadletter_job` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_DEADLETTER_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`) USING BTREE,
  KEY `ACT_IDX_DEADLETTER_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`) USING BTREE,
  KEY `ACT_IDX_DJOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_DJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_DJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_FK_DEADLETTER_JOB_EXECUTION` (`EXECUTION_ID_`) USING BTREE,
  KEY `ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`) USING BTREE,
  KEY `ACT_FK_DEADLETTER_JOB_PROC_DEF` (`PROC_DEF_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_DEADLETTER_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_entitylink` */

DROP TABLE IF EXISTS `act_ru_entitylink`;

CREATE TABLE `act_ru_entitylink` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `LINK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REF_SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HIERARCHY_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_ENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`) USING BTREE,
  KEY `ACT_IDX_ENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`,`LINK_TYPE_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_event_subscr` */

DROP TABLE IF EXISTS `act_ru_event_subscr`;

CREATE TABLE `act_ru_event_subscr` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `EVENT_TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `EVENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACTIVITY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CONFIGURATION_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CREATED_` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_EVENT_SUBSCR_CONFIG_` (`CONFIGURATION_`) USING BTREE,
  KEY `ACT_FK_EVENT_EXEC` (`EXECUTION_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_EVENT_EXEC` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_execution` */

DROP TABLE IF EXISTS `act_ru_execution`;

CREATE TABLE `act_ru_execution` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `BUSINESS_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PARENT_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SUPER_EXEC_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ROOT_PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `IS_ACTIVE_` tinyint(4) DEFAULT NULL,
  `IS_CONCURRENT_` tinyint(4) DEFAULT NULL,
  `IS_SCOPE_` tinyint(4) DEFAULT NULL,
  `IS_EVENT_SCOPE_` tinyint(4) DEFAULT NULL,
  `IS_MI_ROOT_` tinyint(4) DEFAULT NULL,
  `SUSPENSION_STATE_` int(11) DEFAULT NULL,
  `CACHED_ENT_STATE_` int(11) DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_ACT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `START_TIME_` datetime(3) DEFAULT NULL,
  `START_USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `LOCK_TIME_` timestamp(3) NULL DEFAULT NULL,
  `IS_COUNT_ENABLED_` tinyint(4) DEFAULT NULL,
  `EVT_SUBSCR_COUNT_` int(11) DEFAULT NULL,
  `TASK_COUNT_` int(11) DEFAULT NULL,
  `JOB_COUNT_` int(11) DEFAULT NULL,
  `TIMER_JOB_COUNT_` int(11) DEFAULT NULL,
  `SUSP_JOB_COUNT_` int(11) DEFAULT NULL,
  `DEADLETTER_JOB_COUNT_` int(11) DEFAULT NULL,
  `VAR_COUNT_` int(11) DEFAULT NULL,
  `ID_LINK_COUNT_` int(11) DEFAULT NULL,
  `CALLBACK_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CALLBACK_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REFERENCE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `REFERENCE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROPAGATED_STAGE_INST_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_EXEC_BUSKEY` (`BUSINESS_KEY_`) USING BTREE,
  KEY `ACT_IDC_EXEC_ROOT` (`ROOT_PROC_INST_ID_`) USING BTREE,
  KEY `ACT_FK_EXE_PROCINST` (`PROC_INST_ID_`) USING BTREE,
  KEY `ACT_FK_EXE_PARENT` (`PARENT_ID_`) USING BTREE,
  KEY `ACT_FK_EXE_SUPER` (`SUPER_EXEC_`) USING BTREE,
  KEY `ACT_FK_EXE_PROCDEF` (`PROC_DEF_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_EXE_PARENT` FOREIGN KEY (`PARENT_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE,
  CONSTRAINT `ACT_FK_EXE_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_EXE_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `ACT_FK_EXE_SUPER` FOREIGN KEY (`SUPER_EXEC_`) REFERENCES `act_ru_execution` (`ID_`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_history_job` */

DROP TABLE IF EXISTS `act_ru_history_job`;

CREATE TABLE `act_ru_history_job` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `RETRIES_` int(11) DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ADV_HANDLER_CFG_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_identitylink` */

DROP TABLE IF EXISTS `act_ru_identitylink`;

CREATE TABLE `act_ru_identitylink` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `GROUP_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `USER_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_IDENT_LNK_USER` (`USER_ID_`) USING BTREE,
  KEY `ACT_IDX_IDENT_LNK_GROUP` (`GROUP_ID_`) USING BTREE,
  KEY `ACT_IDX_IDENT_LNK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_IDENT_LNK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_IDENT_LNK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_ATHRZ_PROCEDEF` (`PROC_DEF_ID_`) USING BTREE,
  KEY `ACT_FK_TSKASS_TASK` (`TASK_ID_`) USING BTREE,
  KEY `ACT_FK_IDL_PROCINST` (`PROC_INST_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_ATHRZ_PROCEDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_IDL_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_TSKASS_TASK` FOREIGN KEY (`TASK_ID_`) REFERENCES `act_ru_task` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_job` */

DROP TABLE IF EXISTS `act_ru_job`;

CREATE TABLE `act_ru_job` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `RETRIES_` int(11) DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`) USING BTREE,
  KEY `ACT_IDX_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`) USING BTREE,
  KEY `ACT_IDX_JOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_JOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_JOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_FK_JOB_EXECUTION` (`EXECUTION_ID_`) USING BTREE,
  KEY `ACT_FK_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`) USING BTREE,
  KEY `ACT_FK_JOB_PROC_DEF` (`PROC_DEF_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_suspended_job` */

DROP TABLE IF EXISTS `act_ru_suspended_job`;

CREATE TABLE `act_ru_suspended_job` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `RETRIES_` int(11) DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_SUSPENDED_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`) USING BTREE,
  KEY `ACT_IDX_SUSPENDED_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`) USING BTREE,
  KEY `ACT_IDX_SJOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_SJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_SJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_FK_SUSPENDED_JOB_EXECUTION` (`EXECUTION_ID_`) USING BTREE,
  KEY `ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`) USING BTREE,
  KEY `ACT_FK_SUSPENDED_JOB_PROC_DEF` (`PROC_DEF_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_SUSPENDED_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_task` */

DROP TABLE IF EXISTS `act_ru_task`;

CREATE TABLE `act_ru_task` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PROPAGATED_STAGE_INST_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `PARENT_TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DESCRIPTION_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TASK_DEF_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ASSIGNEE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `DELEGATION_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PRIORITY_` int(11) DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `DUE_DATE_` datetime(3) DEFAULT NULL,
  `CATEGORY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUSPENSION_STATE_` int(11) DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  `FORM_KEY_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `CLAIM_TIME_` datetime(3) DEFAULT NULL,
  `IS_COUNT_ENABLED_` tinyint(4) DEFAULT NULL,
  `VAR_COUNT_` int(11) DEFAULT NULL,
  `ID_LINK_COUNT_` int(11) DEFAULT NULL,
  `SUB_TASK_COUNT_` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_TASK_CREATE` (`CREATE_TIME_`) USING BTREE,
  KEY `ACT_IDX_TASK_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_TASK_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_TASK_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_FK_TASK_EXE` (`EXECUTION_ID_`) USING BTREE,
  KEY `ACT_FK_TASK_PROCINST` (`PROC_INST_ID_`) USING BTREE,
  KEY `ACT_FK_TASK_PROCDEF` (`PROC_DEF_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_TASK_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_TASK_PROCDEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`),
  CONSTRAINT `ACT_FK_TASK_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_timer_job` */

DROP TABLE IF EXISTS `act_ru_timer_job`;

CREATE TABLE `act_ru_timer_job` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `LOCK_EXP_TIME_` timestamp(3) NULL DEFAULT NULL,
  `LOCK_OWNER_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `EXCLUSIVE_` tinyint(1) DEFAULT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROCESS_INSTANCE_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_DEF_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `ELEMENT_NAME_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_DEFINITION_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `RETRIES_` int(11) DEFAULT NULL,
  `EXCEPTION_STACK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `EXCEPTION_MSG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `DUEDATE_` timestamp(3) NULL DEFAULT NULL,
  `REPEAT_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `HANDLER_CFG_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `CUSTOM_VALUES_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `CREATE_TIME_` timestamp(3) NULL DEFAULT NULL,
  `TENANT_ID_` varchar(255) COLLATE utf8_bin DEFAULT '',
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_TIMER_JOB_EXCEPTION_STACK_ID` (`EXCEPTION_STACK_ID_`) USING BTREE,
  KEY `ACT_IDX_TIMER_JOB_CUSTOM_VALUES_ID` (`CUSTOM_VALUES_ID_`) USING BTREE,
  KEY `ACT_IDX_TJOB_SCOPE` (`SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_TJOB_SUB_SCOPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_TJOB_SCOPE_DEF` (`SCOPE_DEFINITION_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_FK_TIMER_JOB_EXECUTION` (`EXECUTION_ID_`) USING BTREE,
  KEY `ACT_FK_TIMER_JOB_PROCESS_INSTANCE` (`PROCESS_INSTANCE_ID_`) USING BTREE,
  KEY `ACT_FK_TIMER_JOB_PROC_DEF` (`PROC_DEF_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_TIMER_JOB_CUSTOM_VALUES` FOREIGN KEY (`CUSTOM_VALUES_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_EXCEPTION` FOREIGN KEY (`EXCEPTION_STACK_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_EXECUTION` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_PROCESS_INSTANCE` FOREIGN KEY (`PROCESS_INSTANCE_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_TIMER_JOB_PROC_DEF` FOREIGN KEY (`PROC_DEF_ID_`) REFERENCES `act_re_procdef` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `act_ru_variable` */

DROP TABLE IF EXISTS `act_ru_variable`;

CREATE TABLE `act_ru_variable` (
  `ID_` varchar(64) COLLATE utf8_bin NOT NULL,
  `REV_` int(11) DEFAULT NULL,
  `TYPE_` varchar(255) COLLATE utf8_bin NOT NULL,
  `NAME_` varchar(255) COLLATE utf8_bin NOT NULL,
  `EXECUTION_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `PROC_INST_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `TASK_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SUB_SCOPE_ID_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `SCOPE_TYPE_` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `BYTEARRAY_ID_` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `DOUBLE_` double DEFAULT NULL,
  `LONG_` bigint(20) DEFAULT NULL,
  `TEXT_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  `TEXT2_` varchar(4000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`ID_`) USING BTREE,
  KEY `ACT_IDX_RU_VAR_SCOPE_ID_TYPE` (`SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_IDX_RU_VAR_SUB_ID_TYPE` (`SUB_SCOPE_ID_`,`SCOPE_TYPE_`) USING BTREE,
  KEY `ACT_FK_VAR_BYTEARRAY` (`BYTEARRAY_ID_`) USING BTREE,
  KEY `ACT_IDX_VARIABLE_TASK_ID` (`TASK_ID_`) USING BTREE,
  KEY `ACT_FK_VAR_EXE` (`EXECUTION_ID_`) USING BTREE,
  KEY `ACT_FK_VAR_PROCINST` (`PROC_INST_ID_`) USING BTREE,
  CONSTRAINT `ACT_FK_VAR_BYTEARRAY` FOREIGN KEY (`BYTEARRAY_ID_`) REFERENCES `act_ge_bytearray` (`ID_`),
  CONSTRAINT `ACT_FK_VAR_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `act_ru_execution` (`ID_`),
  CONSTRAINT `ACT_FK_VAR_PROCINST` FOREIGN KEY (`PROC_INST_ID_`) REFERENCES `act_ru_execution` (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=DYNAMIC;

/*Table structure for table `audit_act` */

DROP TABLE IF EXISTS `audit_act`;

CREATE TABLE `audit_act` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `ca_name` varchar(64) DEFAULT NULL COMMENT '控制项名称',
  `domain_code` varchar(16) DEFAULT NULL COMMENT '所属领域代码',
  `ca_desc` varchar(1024) DEFAULT NULL COMMENT '控制项说明',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `IDX_STCA_NO` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1691014846 DEFAULT CHARSET=utf8mb4 COMMENT='控制项表';

/*Table structure for table `audit_act_rel_others` */

DROP TABLE IF EXISTS `audit_act_rel_others`;

CREATE TABLE `audit_act_rel_others` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `act_id` int(11) DEFAULT NULL COMMENT '控制活动id',
  `tp` int(5) DEFAULT NULL COMMENT 'tp',
  `tid` int(11) DEFAULT NULL COMMENT '其它id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=38565 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_best_practice` */

DROP TABLE IF EXISTS `audit_best_practice`;

CREATE TABLE `audit_best_practice` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `content` varchar(64) DEFAULT NULL COMMENT '最佳实践',
  `exe_rule` varchar(1024) DEFAULT NULL COMMENT '执行规则',
  `file_id` int(11) DEFAULT NULL COMMENT '文件ID',
  `des` varchar(1024) DEFAULT NULL COMMENT '备注',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1880334342 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_check_method` */

DROP TABLE IF EXISTS `audit_check_method`;

CREATE TABLE `audit_check_method` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(16) DEFAULT NULL COMMENT '编码',
  `content` varchar(1024) DEFAULT NULL COMMENT '检查内容',
  `view_system` varchar(128) DEFAULT NULL COMMENT '查看系统',
  `view_rule` varchar(128) DEFAULT NULL COMMENT '查看制度',
  `view_record` varchar(128) DEFAULT NULL COMMENT '查看记录',
  `inter_user` varchar(128) DEFAULT NULL COMMENT '访谈用户',
  `des` varchar(1024) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `file_id` int(11) DEFAULT NULL COMMENT '文件ID',
  `is_public` tinyint(1) DEFAULT '1' COMMENT '是否共有',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2094248330 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_check_method_item` */

DROP TABLE IF EXISTS `audit_check_method_item`;

CREATE TABLE `audit_check_method_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pk',
  `tp` int(5) DEFAULT NULL COMMENT 'tp',
  `checkid` int(11) DEFAULT NULL COMMENT 'checkid',
  `name` varchar(128) DEFAULT NULL COMMENT 'name',
  `des` varchar(256) DEFAULT NULL COMMENT 'des',
  `method` varchar(128) DEFAULT NULL,
  `method_des` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10380 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_compliane_item` */

DROP TABLE IF EXISTS `audit_compliane_item`;

CREATE TABLE `audit_compliane_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` int(11) DEFAULT NULL COMMENT '编码',
  `item` varchar(128) DEFAULT NULL COMMENT '条目',
  `content` varchar(2048) DEFAULT NULL COMMENT '内容',
  `file_id` int(11) DEFAULT NULL COMMENT '来源文件',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建人',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建时间',
  `cgrp` varchar(16) DEFAULT NULL COMMENT '分组',
  `cgrp_path` varchar(128) DEFAULT NULL,
  `ind` int(11) DEFAULT NULL COMMENT '序号',
  `is_public` tinyint(1) DEFAULT NULL COMMENT '是否共有',
  `tp` int(2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2031 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_file_content_categories` */

DROP TABLE IF EXISTS `audit_file_content_categories`;

CREATE TABLE `audit_file_content_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_id` int(11) DEFAULT NULL COMMENT '文件ID',
  `parent_id` int(11) DEFAULT NULL COMMENT '父亲ID',
  `name` varchar(32) DEFAULT NULL COMMENT '分类名',
  `has_child` tinyint(1) DEFAULT NULL COMMENT '是否有子',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=521 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_file_rel_lib` */

DROP TABLE IF EXISTS `audit_file_rel_lib`;

CREATE TABLE `audit_file_rel_lib` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_id` varchar(32) DEFAULT NULL COMMENT '文档ID',
  `tp` int(5) DEFAULT NULL COMMENT 'tp',
  `tid` int(11) DEFAULT NULL COMMENT '其它id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `audit_inner_ctrl` */

DROP TABLE IF EXISTS `audit_inner_ctrl`;

CREATE TABLE `audit_inner_ctrl` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(128) DEFAULT NULL COMMENT '名称',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `des` varchar(256) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_inner_ctrl_item` */

DROP TABLE IF EXISTS `audit_inner_ctrl_item`;

CREATE TABLE `audit_inner_ctrl_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pk',
  `tp` int(5) DEFAULT NULL COMMENT 'tp',
  `checkid` int(11) DEFAULT NULL COMMENT '检查点',
  `name` varchar(256) DEFAULT NULL COMMENT 'name',
  `come_from` int(11) DEFAULT NULL COMMENT '来源',
  `des` varchar(256) DEFAULT NULL COMMENT 'des',
  `exe_rule` smallint(2) DEFAULT NULL COMMENT '执行规则',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10384 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_inner_order` */

DROP TABLE IF EXISTS `audit_inner_order`;

CREATE TABLE `audit_inner_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` int(11) DEFAULT NULL COMMENT '编码',
  `item` varchar(128) DEFAULT NULL COMMENT '条目',
  `content` varchar(2048) DEFAULT NULL COMMENT '内容',
  `file_id` int(11) DEFAULT NULL COMMENT '来源文件',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建人',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建时间',
  `cgrp` varchar(16) DEFAULT NULL COMMENT '分组',
  `cgrp_path` varchar(128) DEFAULT NULL,
  `ind` int(11) DEFAULT NULL COMMENT '序号',
  `is_public` tinyint(1) DEFAULT NULL COMMENT '是否共有',
  `tp` int(2) DEFAULT NULL COMMENT '分类1合规2内控制度',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_inner_order_checkmethod` */

DROP TABLE IF EXISTS `audit_inner_order_checkmethod`;

CREATE TABLE `audit_inner_order_checkmethod` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(16) DEFAULT NULL COMMENT '编码',
  `content` varchar(1024) DEFAULT NULL COMMENT '检查内容',
  `view_system` varchar(128) DEFAULT NULL COMMENT '查看系统',
  `view_rule` varchar(128) DEFAULT NULL COMMENT '查看制度',
  `view_record` varchar(128) DEFAULT NULL COMMENT '查看记录',
  `inter_user` varchar(128) DEFAULT NULL COMMENT '访谈用户',
  `des` varchar(1024) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `file_id` int(11) DEFAULT NULL COMMENT '文件ID',
  `is_public` tinyint(1) DEFAULT '1' COMMENT '是否共有',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_inner_order_checkmethod_item` */

DROP TABLE IF EXISTS `audit_inner_order_checkmethod_item`;

CREATE TABLE `audit_inner_order_checkmethod_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pk',
  `tp` int(5) DEFAULT NULL COMMENT 'tp',
  `checkid` int(11) DEFAULT NULL COMMENT 'checkid',
  `name` varchar(128) DEFAULT NULL COMMENT 'name',
  `des` varchar(256) DEFAULT NULL COMMENT 'des',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_inner_order_rel_check` */

DROP TABLE IF EXISTS `audit_inner_order_rel_check`;

CREATE TABLE `audit_inner_order_rel_check` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `citemid` int(11) DEFAULT NULL COMMENT '合规条目id',
  `checkid` int(11) DEFAULT NULL COMMENT '检查方法ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=290185282 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_item_link` */

DROP TABLE IF EXISTS `audit_item_link`;

CREATE TABLE `audit_item_link` (
  `sid` int(11) NOT NULL,
  `tid` int(11) NOT NULL,
  PRIMARY KEY (`sid`,`tid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*Table structure for table `audit_item_rel_check` */

DROP TABLE IF EXISTS `audit_item_rel_check`;

CREATE TABLE `audit_item_rel_check` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `citemid` int(11) DEFAULT NULL COMMENT '合规条目id',
  `checkid` int(11) DEFAULT NULL COMMENT '检查方法ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16434 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_label_rel_lib` */

DROP TABLE IF EXISTS `audit_label_rel_lib`;

CREATE TABLE `audit_label_rel_lib` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `tp` int(11) DEFAULT NULL COMMENT '类型',
  `label_code` varchar(4) DEFAULT NULL COMMENT '标签编号',
  `label_name` varchar(32) DEFAULT NULL COMMENT '标签名称',
  `tid` int(11) DEFAULT NULL COMMENT '目标ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1800139655 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_problem` */

DROP TABLE IF EXISTS `audit_problem`;

CREATE TABLE `audit_problem` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pb_item` varchar(512) DEFAULT NULL COMMENT '问题项目',
  `pb_example` text COMMENT '问题示例',
  `pb_level` varchar(4) DEFAULT NULL COMMENT '问题等级',
  `pb_advise` varchar(1024) DEFAULT NULL COMMENT '改进建议',
  `pb_analysis` varchar(1024) DEFAULT NULL COMMENT '影响分析',
  `pb_nature` varchar(32) DEFAULT NULL COMMENT '问题性质',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `file_id` int(11) DEFAULT NULL COMMENT '文件ID',
  `pb_source` varchar(64) DEFAULT NULL COMMENT '问题来源',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2056516895 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_project` */

DROP TABLE IF EXISTS `audit_project`;

CREATE TABLE `audit_project` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL COMMENT '项目名称',
  `des` varchar(2048) DEFAULT NULL COMMENT '项目描述',
  `resp_user` varchar(32) DEFAULT NULL COMMENT '负责人',
  `create_time` date DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `tp` varchar(32) DEFAULT NULL,
  `tp_name` varchar(32) DEFAULT NULL,
  `score_tp` smallint(2) DEFAULT NULL COMMENT '1:成熟度2:风险等级',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_project_item` */

DROP TABLE IF EXISTS `audit_project_item`;

CREATE TABLE `audit_project_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `checkid` int(11) DEFAULT NULL COMMENT '检查点ID',
  `pid` int(11) DEFAULT NULL COMMENT '项目ID',
  `tp` int(5) DEFAULT NULL COMMENT '类别',
  `name` varchar(128) DEFAULT NULL COMMENT '名称',
  `des` varchar(256) DEFAULT NULL COMMENT '说明',
  `come_from` int(2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8176 DEFAULT CHARSET=utf8mb4;

/*Table structure for table `audit_project_problem` */

DROP TABLE IF EXISTS `audit_project_problem`;

CREATE TABLE `audit_project_problem` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `viewpoint` varchar(255) NOT NULL COMMENT '观点',
  `risk_warning` varchar(256) DEFAULT NULL COMMENT '风险提示',
  `improvement_suggestion` varchar(256) DEFAULT NULL COMMENT '改进建议',
  `risk_level` int(2) DEFAULT NULL COMMENT '风险等级',
  `file_path` varchar(128) DEFAULT NULL COMMENT '报告保存路径',
  `project_id` int(11) DEFAULT NULL COMMENT '项目ID',
  `version_no` int(11) DEFAULT NULL COMMENT '版本号',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` varchar(36) DEFAULT NULL COMMENT '创建人',
  `iscur` tinyint(1) DEFAULT NULL COMMENT '是最新的',
  `title_id` int(11) DEFAULT NULL COMMENT '标题ID',
  `tp` int(2) DEFAULT NULL COMMENT '分类1:现状2:观点',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4;

/*Table structure for table `audit_project_problem_rel_item` */

DROP TABLE IF EXISTS `audit_project_problem_rel_item`;

CREATE TABLE `audit_project_problem_rel_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `problemid` int(11) NOT NULL COMMENT 'poblemid',
  `itemid` int(11) NOT NULL COMMENT 'itemid',
  `projectid` int(11) DEFAULT NULL COMMENT 'projectid',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=497 DEFAULT CHARSET=utf8mb4;

/*Table structure for table `audit_project_report_config` */

DROP TABLE IF EXISTS `audit_project_report_config`;

CREATE TABLE `audit_project_report_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pk',
  `report_name` varchar(32) DEFAULT NULL COMMENT '报告名称',
  `company_name` varchar(32) DEFAULT NULL COMMENT '公司名称',
  `start_date` varchar(32) DEFAULT NULL COMMENT '审计开始日期',
  `end_date` varchar(32) DEFAULT NULL COMMENT '审计结束日期',
  `report_date` varchar(32) DEFAULT NULL COMMENT '报告日期',
  `project_id` int(11) DEFAULT NULL COMMENT '项目ID',
  `report_url` varchar(512) DEFAULT NULL COMMENT '报告保存路径',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_project_report_title` */

DROP TABLE IF EXISTS `audit_project_report_title`;

CREATE TABLE `audit_project_report_title` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL COMMENT '父ID',
  `title` varchar(256) DEFAULT NULL COMMENT '分类名',
  `has_child` int(4) DEFAULT NULL COMMENT '是否有子',
  `project_id` int(11) DEFAULT NULL COMMENT '项目ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_risk_event` */

DROP TABLE IF EXISTS `audit_risk_event`;

CREATE TABLE `audit_risk_event` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'PK',
  `scid` int(11) DEFAULT NULL COMMENT '风险场景ID',
  `risk_event_name` varchar(128) DEFAULT NULL COMMENT '风险事件名称',
  `risk_tp` int(4) DEFAULT NULL COMMENT '风险事件分类',
  `risk_event_desc` text COMMENT '风险事件描述',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `file_id` int(11) DEFAULT NULL COMMENT '文件ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1900782372 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_risk_scenario` */

DROP TABLE IF EXISTS `audit_risk_scenario`;

CREATE TABLE `audit_risk_scenario` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `scenario_name` varchar(64) DEFAULT NULL COMMENT '场景名称',
  `scenario_desc` varchar(1024) DEFAULT NULL COMMENT '场景说明',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建用户',
  `file_id` int(11) DEFAULT NULL COMMENT '文件ID',
  `pid` int(11) DEFAULT NULL COMMENT '父ID',
  `has_child` tinyint(1) DEFAULT NULL COMMENT '是否有子',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1741398037 DEFAULT CHARSET=utf8;

/*Table structure for table `audit_task` */

DROP TABLE IF EXISTS `audit_task`;

CREATE TABLE `audit_task` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `projectid` int(11) NOT NULL COMMENT '项目id',
  `checkid` int(11) NOT NULL COMMENT '检查项',
  `userid` varchar(32) DEFAULT NULL COMMENT '填报人',
  `come_from` int(2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3472 DEFAULT CHARSET=utf8mb4;

/*Table structure for table `audit_task_report` */

DROP TABLE IF EXISTS `audit_task_report`;

CREATE TABLE `audit_task_report` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `projectid` int(11) DEFAULT NULL COMMENT '项目ID',
  `checkid` int(11) DEFAULT NULL COMMENT '检查项',
  `check_item_tp` int(5) DEFAULT NULL COMMENT '条目类别',
  `check_item_id` int(11) DEFAULT NULL COMMENT '检查条目',
  `situation` varchar(1024) DEFAULT NULL COMMENT '现状',
  `issues` varchar(1024) DEFAULT NULL COMMENT '问题',
  `score` float(3,1) DEFAULT NULL COMMENT '得分',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=145 DEFAULT CHARSET=utf8mb4;

/*Table structure for table `baosong_data_valid` */

DROP TABLE IF EXISTS `baosong_data_valid`;

CREATE TABLE `baosong_data_valid` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `code` varchar(10) DEFAULT NULL COMMENT '公式编号',
  `name` varchar(64) DEFAULT NULL COMMENT '名称',
  `tplid` int(11) DEFAULT NULL COMMENT '模板ID',
  `tpl_itemid` int(11) DEFAULT NULL COMMENT '模板项目id',
  `formula` varchar(256) DEFAULT NULL COMMENT '验证公式',
  `ctp` int(4) DEFAULT NULL COMMENT '类型',
  `tp` smallint(4) DEFAULT NULL COMMENT '分类',
  `expected_value` varchar(10) DEFAULT NULL COMMENT '预期值',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL,
  `params` varchar(256) DEFAULT NULL COMMENT '参数',
  `des` varchar(256) DEFAULT NULL COMMENT '说明',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=149 DEFAULT CHARSET=utf8;

/*Table structure for table `baosong_task` */

DROP TABLE IF EXISTS `baosong_task`;

CREATE TABLE `baosong_task` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL COMMENT '报表名称',
  `sta` int(5) DEFAULT NULL COMMENT '报告状态',
  `tp` int(11) DEFAULT NULL COMMENT '报表类型',
  `enter_role` varchar(32) DEFAULT NULL COMMENT '填报角色',
  `enter_tel` varchar(11) DEFAULT NULL COMMENT '联系电话',
  `enter_date` date DEFAULT NULL COMMENT '填报日期',
  `resp_user` varchar(32) DEFAULT NULL COMMENT '责任人',
  `start_date` date DEFAULT NULL COMMENT '开始日期',
  `end_date` date DEFAULT NULL COMMENT '结束日期',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `resp_depart` varchar(32) DEFAULT NULL COMMENT '责任部门',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;

/*Table structure for table `baosong_task_alloc` */

DROP TABLE IF EXISTS `baosong_task_alloc`;

CREATE TABLE `baosong_task_alloc` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `taskid` int(11) NOT NULL COMMENT '任务ID',
  `tplid` int(11) NOT NULL COMMENT '模板ID',
  `itemid` int(11) DEFAULT NULL COMMENT '模板项ID',
  `fill_user` varchar(32) DEFAULT NULL COMMENT '填报人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `fill_sta` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7406 DEFAULT CHARSET=utf8;

/*Table structure for table `baosong_task_record` */

DROP TABLE IF EXISTS `baosong_task_record`;

CREATE TABLE `baosong_task_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `taskid` int(11) DEFAULT NULL COMMENT '任务ID',
  `tplid` int(11) DEFAULT NULL COMMENT '模板ID',
  `itempid` int(11) DEFAULT NULL,
  `itemid` int(11) DEFAULT NULL COMMENT '模板项ID',
  `content` varchar(512) DEFAULT NULL COMMENT '填报内容',
  `create_by` varchar(32) DEFAULT NULL COMMENT '填报人',
  `create_time` datetime DEFAULT NULL COMMENT '填报时间',
  `rind` int(11) DEFAULT NULL,
  `tplcode` varchar(16) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=49959 DEFAULT CHARSET=utf8;

/*Table structure for table `baosong_task_record_multi` */

DROP TABLE IF EXISTS `baosong_task_record_multi`;

CREATE TABLE `baosong_task_record_multi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `itemid` int(11) DEFAULT NULL COMMENT '模板项ID',
  `code` varchar(16) DEFAULT NULL COMMENT '编码',
  `content` varchar(128) DEFAULT NULL COMMENT '内容',
  `rind` int(11) DEFAULT NULL COMMENT '行号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*Table structure for table `baosong_task_review` */

DROP TABLE IF EXISTS `baosong_task_review`;

CREATE TABLE `baosong_task_review` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `taskid` int(11) DEFAULT NULL COMMENT '任务ID',
  `taskname` varchar(64) DEFAULT NULL COMMENT '任务名称',
  `tplname` varchar(64) DEFAULT NULL COMMENT '模板名称',
  `tplid` int(11) DEFAULT NULL COMMENT '模板ID',
  `app_sta` int(11) DEFAULT NULL COMMENT '审批状态',
  `app_user` varchar(32) DEFAULT NULL COMMENT '审批人',
  `app_des` varchar(512) DEFAULT NULL COMMENT '审批说明',
  `app_time` datetime DEFAULT NULL COMMENT '审批时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8;

/*Table structure for table `baosong_tpl` */

DROP TABLE IF EXISTS `baosong_tpl`;

CREATE TABLE `baosong_tpl` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(10) DEFAULT NULL COMMENT '编号',
  `nm` varchar(16) DEFAULT NULL COMMENT '名称',
  `tp` int(11) DEFAULT NULL COMMENT '类型',
  `des` varchar(256) DEFAULT NULL COMMENT '备注项目',
  `created_time` datetime DEFAULT NULL COMMENT '创建时间',
  `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
  `created_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `updated_user` varchar(32) DEFAULT NULL COMMENT '更新人',
  `btp` smallint(4) DEFAULT NULL COMMENT '报送方式',
  `vyear` date DEFAULT NULL COMMENT '生效年度',
  `xmlfile_path` varchar(128) DEFAULT NULL,
  `version` varchar(32) DEFAULT NULL COMMENT '版本',
  `child_num` int(11) DEFAULT '0' COMMENT '孩子数',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;

/*Table structure for table `baosong_tpl_item` */

DROP TABLE IF EXISTS `baosong_tpl_item`;

CREATE TABLE `baosong_tpl_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tplid` int(11) DEFAULT NULL COMMENT '模板ID',
  `tpl_name` varchar(32) DEFAULT NULL COMMENT '模板名称',
  `title` varchar(64) DEFAULT NULL COMMENT '标题',
  `tp` varchar(16) DEFAULT NULL COMMENT '数值类型',
  `des` varchar(1024) DEFAULT NULL COMMENT '备注',
  `pcode` varchar(16) DEFAULT NULL COMMENT '父编号',
  `code` varchar(16) DEFAULT NULL COMMENT '编号',
  `pid` int(11) DEFAULT NULL COMMENT '父ID',
  `treepath` varchar(256) DEFAULT NULL COMMENT '节点路径',
  `treepath_name` varchar(256) DEFAULT NULL COMMENT '节点路径名称',
  `xmlcode` varchar(16) DEFAULT NULL COMMENT 'xm编码',
  `child_num` smallint(4) DEFAULT NULL COMMENT '孩子数',
  `form_tp` varchar(16) DEFAULT NULL COMMENT '表单类型',
  `max_val` varchar(16) DEFAULT NULL COMMENT '最大值',
  `min_val` varchar(16) DEFAULT NULL COMMENT '最小值',
  `unit` varchar(16) DEFAULT NULL COMMENT '单位',
  `options` varchar(512) DEFAULT NULL COMMENT '选项',
  PRIMARY KEY (`id`),
  KEY `tpl_tplitem` (`tplid`)
) ENGINE=InnoDB AUTO_INCREMENT=2158 DEFAULT CHARSET=utf8;

/*Table structure for table `baosong_tpl_item_config` */

DROP TABLE IF EXISTS `baosong_tpl_item_config`;

CREATE TABLE `baosong_tpl_item_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tplid` int(11) DEFAULT NULL COMMENT '模板ID',
  `pcode` varchar(16) DEFAULT NULL COMMENT '父编码',
  `code` varchar(16) DEFAULT NULL COMMENT '编码',
  `vtp` varchar(8) DEFAULT NULL COMMENT '值类型',
  `mtp` varchar(12) DEFAULT NULL COMMENT '表单类型',
  `items` varchar(512) DEFAULT NULL COMMENT '选项',
  `unit` varchar(512) DEFAULT NULL COMMENT '计量单位',
  `min` int(11) DEFAULT NULL COMMENT '最小值',
  `max` int(11) DEFAULT NULL COMMENT '最大值',
  `des` varchar(2048) DEFAULT NULL COMMENT '填报说明',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2036 DEFAULT CHARSET=utf8mb4;

/*Table structure for table `ces_order_customer` */

DROP TABLE IF EXISTS `ces_order_customer`;

CREATE TABLE `ces_order_customer` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `name` varchar(32) DEFAULT NULL COMMENT '客户名字',
  `sex` varchar(1) DEFAULT NULL COMMENT '客户性别',
  `birthday` datetime DEFAULT NULL COMMENT '客户生日',
  `age` int(11) DEFAULT NULL COMMENT '年龄',
  `address` varchar(300) DEFAULT NULL COMMENT '常用地址',
  `order_main_id` varchar(32) DEFAULT NULL COMMENT '订单ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `ces_order_goods` */

DROP TABLE IF EXISTS `ces_order_goods`;

CREATE TABLE `ces_order_goods` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `good_name` varchar(32) DEFAULT NULL COMMENT '商品名字',
  `price` double DEFAULT NULL COMMENT '价格',
  `num` int(11) DEFAULT NULL COMMENT '数量',
  `zong_price` double DEFAULT NULL COMMENT '单品总价',
  `order_main_id` varchar(32) DEFAULT NULL COMMENT '订单ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `ces_order_main` */

DROP TABLE IF EXISTS `ces_order_main`;

CREATE TABLE `ces_order_main` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `order_code` varchar(32) DEFAULT NULL COMMENT '订单编码',
  `xd_date` datetime DEFAULT NULL COMMENT '下单时间',
  `money` double DEFAULT NULL COMMENT '订单总额',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `ces_shop_goods` */

DROP TABLE IF EXISTS `ces_shop_goods`;

CREATE TABLE `ces_shop_goods` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `name` varchar(32) DEFAULT NULL COMMENT '商品名字',
  `price` decimal(10,5) DEFAULT NULL COMMENT '价格',
  `chuc_date` datetime DEFAULT NULL COMMENT '出厂时间',
  `contents` text COMMENT '商品简介',
  `good_type_id` varchar(32) DEFAULT NULL COMMENT '商品分类',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `ces_shop_type` */

DROP TABLE IF EXISTS `ces_shop_type`;

CREATE TABLE `ces_shop_type` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `name` varchar(32) DEFAULT NULL COMMENT '分类名字',
  `content` varchar(200) DEFAULT NULL COMMENT '描述',
  `pics` varchar(500) DEFAULT NULL COMMENT '图片',
  `pid` varchar(32) DEFAULT NULL COMMENT '父级节点',
  `has_child` varchar(3) DEFAULT NULL COMMENT '是否有子节点',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `demo` */

DROP TABLE IF EXISTS `demo`;

CREATE TABLE `demo` (
  `id` varchar(50) NOT NULL COMMENT '主键ID',
  `name` varchar(30) DEFAULT NULL COMMENT '姓名',
  `key_word` varchar(255) DEFAULT NULL COMMENT '关键词',
  `punch_time` datetime DEFAULT NULL COMMENT '打卡时间',
  `salary_money` decimal(10,3) DEFAULT NULL COMMENT '工资',
  `bonus_money` double(10,2) DEFAULT NULL COMMENT '奖金',
  `sex` varchar(2) DEFAULT NULL COMMENT '性别 {男:1,女:2}',
  `age` int(11) DEFAULT NULL COMMENT '年龄',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `email` varchar(50) DEFAULT NULL COMMENT '邮箱',
  `content` varchar(1000) DEFAULT NULL COMMENT '个人简介',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门编码',
  `tenant_id` int(10) DEFAULT '0',
  `update_count` int(11) DEFAULT NULL COMMENT '乐观锁测试',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `demo_field_def_val_main` */

DROP TABLE IF EXISTS `demo_field_def_val_main`;

CREATE TABLE `demo_field_def_val_main` (
  `id` varchar(36) NOT NULL,
  `code` varchar(200) DEFAULT NULL COMMENT '编码',
  `name` varchar(200) DEFAULT NULL COMMENT '姓名',
  `sex` varchar(200) DEFAULT NULL COMMENT '性别',
  `address` varchar(200) DEFAULT NULL COMMENT '地址',
  `address_param` varchar(32) DEFAULT NULL COMMENT '地址（传参）',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `demo_field_def_val_sub` */

DROP TABLE IF EXISTS `demo_field_def_val_sub`;

CREATE TABLE `demo_field_def_val_sub` (
  `id` varchar(36) NOT NULL,
  `code` varchar(200) DEFAULT NULL COMMENT '编码',
  `name` varchar(200) DEFAULT NULL COMMENT '名称',
  `date` varchar(200) DEFAULT NULL COMMENT '日期',
  `main_id` varchar(200) DEFAULT NULL COMMENT '主表ID',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `doc_file_link` */

DROP TABLE IF EXISTS `doc_file_link`;

CREATE TABLE `doc_file_link` (
  `sid` int(32) NOT NULL,
  `tid` int(32) NOT NULL,
  PRIMARY KEY (`sid`,`tid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*Table structure for table `doc_files` */

DROP TABLE IF EXISTS `doc_files`;

CREATE TABLE `doc_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` varchar(64) NOT NULL COMMENT '文件名称',
  `file_path` varchar(512) DEFAULT NULL COMMENT '文件URL',
  `file_size` int(11) DEFAULT NULL COMMENT '文件大小(K)',
  `last_modify_time` datetime DEFAULT NULL COMMENT '最后修改时间',
  `file_tp` varchar(10) DEFAULT NULL COMMENT '文件类型',
  `ctp` int(11) DEFAULT NULL COMMENT '文件目录ID',
  `author` varchar(32) DEFAULT NULL COMMENT '作者',
  `file_source` int(3) DEFAULT NULL COMMENT '文件来源',
  `create_time` date DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建用户',
  `version` varchar(16) DEFAULT NULL COMMENT '版本',
  `des` varchar(512) DEFAULT NULL COMMENT '描述信息',
  `file_detail` text COMMENT '文件详细信息',
  `domain_code` varchar(16) DEFAULT NULL COMMENT '领域编码',
  `ind` int(11) DEFAULT NULL COMMENT '顺序号',
  `labels` varchar(128) DEFAULT NULL,
  `issued` varchar(64) DEFAULT NULL COMMENT '发布单位',
  `issued_date` date DEFAULT NULL COMMENT '发布日期',
  `issued_sta` smallint(2) DEFAULT NULL COMMENT '文件状态',
  `doc_no` varchar(128) DEFAULT NULL COMMENT '发文号',
  `apply_range_codes` varchar(256) DEFAULT NULL COMMENT '适用范围',
  `stp` int(2) DEFAULT NULL COMMENT '文件内容分类',
  PRIMARY KEY (`id`),
  KEY `idx_issued_date` (`issued_date`),
  KEY `idx_issued_sta_date` (`issued_sta`,`issued_date`)
) ENGINE=InnoDB AUTO_INCREMENT=2144007756 DEFAULT CHARSET=utf8;

/*Table structure for table `doc_files_dir` */

DROP TABLE IF EXISTS `doc_files_dir`;

CREATE TABLE `doc_files_dir` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pid` int(11) DEFAULT NULL COMMENT '父ID',
  `code` varchar(16) DEFAULT NULL COMMENT '编码',
  `name` varchar(40) DEFAULT NULL COMMENT '目录名称',
  `builtin` int(3) DEFAULT NULL COMMENT 'isbuild',
  `ind` int(11) DEFAULT NULL COMMENT '顺序号',
  `has_child` int(11) DEFAULT NULL COMMENT '是否有子',
  `label_names` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=204 DEFAULT CHARSET=utf8mb4;

/*Table structure for table `doc_files_history` */

DROP TABLE IF EXISTS `doc_files_history`;

CREATE TABLE `doc_files_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_name` varchar(64) NOT NULL COMMENT '文件名称',
  `file_path` varchar(512) DEFAULT NULL COMMENT '文件URL',
  `file_size` int(11) DEFAULT NULL COMMENT '文件大小(K)',
  `last_modify_time` date DEFAULT NULL COMMENT '最后修改时间',
  `file_tp` varchar(10) DEFAULT NULL COMMENT '文件类型',
  `ctp` int(11) DEFAULT NULL COMMENT '文件目录ID',
  `author` varchar(32) DEFAULT NULL COMMENT '作者',
  `file_source` int(3) DEFAULT NULL COMMENT '文件来源',
  `create_time` date DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建用户',
  `version` varchar(16) DEFAULT NULL COMMENT '版本',
  `des` varchar(512) DEFAULT NULL COMMENT '描述信息',
  `file_detail` text COMMENT '文件详细信息',
  `domain_code` varchar(16) DEFAULT NULL COMMENT '领域编码',
  `ind` int(11) DEFAULT NULL COMMENT '顺序号',
  `labels` varchar(128) DEFAULT NULL COMMENT 'labels',
  `issued` varchar(64) DEFAULT NULL COMMENT '发布单位',
  `issued_date` date DEFAULT NULL COMMENT '发布日期',
  `issued_sta` int(5) DEFAULT NULL COMMENT '文件状态',
  `doc_no` varchar(128) DEFAULT NULL COMMENT '发文号',
  `apply_range_codes` varchar(256) DEFAULT NULL COMMENT '适用范围',
  `stp` int(2) DEFAULT NULL COMMENT '文件内容分类',
  `hisid` int(11) DEFAULT NULL COMMENT '原始文件ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

/*Table structure for table `flow_my_business` */

DROP TABLE IF EXISTS `flow_my_business`;

CREATE TABLE `flow_my_business` (
  `id` varchar(50) NOT NULL COMMENT '主键ID',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `process_definition_key` varchar(50) DEFAULT NULL COMMENT '流程定义key 一个key会有多个版本的id',
  `process_definition_id` varchar(50) DEFAULT NULL COMMENT '流程定义id 一个流程定义唯一',
  `process_instance_id` varchar(50) DEFAULT NULL COMMENT '流程业务实例id 一个流程业务唯一，本表中也唯一',
  `title` varchar(500) DEFAULT NULL COMMENT '流程业务简要描述',
  `data_id` varchar(50) DEFAULT NULL COMMENT '业务表id，理论唯一',
  `service_impl_name` varchar(50) DEFAULT NULL COMMENT '业务类名，用来获取spring容器里的服务对象',
  `proposer` varchar(50) DEFAULT NULL COMMENT '申请人',
  `act_status` varchar(100) DEFAULT NULL COMMENT '流程状态说明，有：启动  撤回  驳回  审批中  审批通过  审批异常',
  `task_id` varchar(1000) DEFAULT NULL COMMENT '当前的节点定义上的Id,',
  `task_name` varchar(1000) DEFAULT NULL COMMENT '当前的节点',
  `task_name_id` varchar(50) DEFAULT NULL COMMENT '当前的节点实例上的Id',
  `todo_users` varchar(1000) DEFAULT NULL COMMENT '当前的节点可以处理的用户名',
  `done_users` varchar(1000) DEFAULT NULL COMMENT '处理过的人',
  `priority` varchar(100) DEFAULT NULL COMMENT '当前任务节点的优先级 流程定义的时候所填',
  PRIMARY KEY (`id`),
  UNIQUE KEY `dataid` (`data_id`) USING BTREE COMMENT '业务数据Id索引'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='流程业务扩展表';

/*Table structure for table `flw_channel_definition` */

DROP TABLE IF EXISTS `flw_channel_definition`;

CREATE TABLE `flw_channel_definition` (
  `ID_` varchar(255) NOT NULL,
  `NAME_` varchar(255) DEFAULT NULL,
  `VERSION_` int(11) DEFAULT NULL,
  `KEY_` varchar(255) DEFAULT NULL,
  `CATEGORY_` varchar(255) DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) DEFAULT NULL,
  `CREATE_TIME_` datetime(3) DEFAULT NULL,
  `TENANT_ID_` varchar(255) DEFAULT NULL,
  `RESOURCE_NAME_` varchar(255) DEFAULT NULL,
  `DESCRIPTION_` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_IDX_CHANNEL_DEF_UNIQ` (`KEY_`,`VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `flw_ev_databasechangelog` */

DROP TABLE IF EXISTS `flw_ev_databasechangelog`;

CREATE TABLE `flw_ev_databasechangelog` (
  `ID` varchar(255) NOT NULL,
  `AUTHOR` varchar(255) NOT NULL,
  `FILENAME` varchar(255) NOT NULL,
  `DATEEXECUTED` datetime NOT NULL,
  `ORDEREXECUTED` int(11) NOT NULL,
  `EXECTYPE` varchar(10) NOT NULL,
  `MD5SUM` varchar(35) DEFAULT NULL,
  `DESCRIPTION` varchar(255) DEFAULT NULL,
  `COMMENTS` varchar(255) DEFAULT NULL,
  `TAG` varchar(255) DEFAULT NULL,
  `LIQUIBASE` varchar(20) DEFAULT NULL,
  `CONTEXTS` varchar(255) DEFAULT NULL,
  `LABELS` varchar(255) DEFAULT NULL,
  `DEPLOYMENT_ID` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `flw_ev_databasechangeloglock` */

DROP TABLE IF EXISTS `flw_ev_databasechangeloglock`;

CREATE TABLE `flw_ev_databasechangeloglock` (
  `ID` int(11) NOT NULL,
  `LOCKED` bit(1) NOT NULL,
  `LOCKGRANTED` datetime DEFAULT NULL,
  `LOCKEDBY` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `flw_event_definition` */

DROP TABLE IF EXISTS `flw_event_definition`;

CREATE TABLE `flw_event_definition` (
  `ID_` varchar(255) NOT NULL,
  `NAME_` varchar(255) DEFAULT NULL,
  `VERSION_` int(11) DEFAULT NULL,
  `KEY_` varchar(255) DEFAULT NULL,
  `CATEGORY_` varchar(255) DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) DEFAULT NULL,
  `TENANT_ID_` varchar(255) DEFAULT NULL,
  `RESOURCE_NAME_` varchar(255) DEFAULT NULL,
  `DESCRIPTION_` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID_`),
  UNIQUE KEY `ACT_IDX_EVENT_DEF_UNIQ` (`KEY_`,`VERSION_`,`TENANT_ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `flw_event_deployment` */

DROP TABLE IF EXISTS `flw_event_deployment`;

CREATE TABLE `flw_event_deployment` (
  `ID_` varchar(255) NOT NULL,
  `NAME_` varchar(255) DEFAULT NULL,
  `CATEGORY_` varchar(255) DEFAULT NULL,
  `DEPLOY_TIME_` datetime(3) DEFAULT NULL,
  `TENANT_ID_` varchar(255) DEFAULT NULL,
  `PARENT_DEPLOYMENT_ID_` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `flw_event_resource` */

DROP TABLE IF EXISTS `flw_event_resource`;

CREATE TABLE `flw_event_resource` (
  `ID_` varchar(255) NOT NULL,
  `NAME_` varchar(255) DEFAULT NULL,
  `DEPLOYMENT_ID_` varchar(255) DEFAULT NULL,
  `RESOURCE_BYTES_` longblob,
  PRIMARY KEY (`ID_`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `flyway_schema_history` */

DROP TABLE IF EXISTS `flyway_schema_history`;

CREATE TABLE `flyway_schema_history` (
  `installed_rank` int(11) NOT NULL,
  `version` varchar(50) DEFAULT NULL,
  `description` varchar(200) NOT NULL,
  `type` varchar(20) NOT NULL,
  `script` varchar(1000) NOT NULL,
  `checksum` int(11) DEFAULT NULL,
  `installed_by` varchar(100) NOT NULL,
  `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `execution_time` int(11) NOT NULL,
  `success` tinyint(1) NOT NULL,
  PRIMARY KEY (`installed_rank`) USING BTREE,
  KEY `flyway_schema_history_s_idx` (`success`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jeecg_monthly_growth_analysis` */

DROP TABLE IF EXISTS `jeecg_monthly_growth_analysis`;

CREATE TABLE `jeecg_monthly_growth_analysis` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `year` varchar(50) DEFAULT NULL,
  `month` varchar(50) DEFAULT NULL COMMENT '月份',
  `main_income` decimal(18,2) DEFAULT '0.00' COMMENT '佣金/主营收入',
  `other_income` decimal(18,2) DEFAULT '0.00' COMMENT '其他收入',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jeecg_order_customer` */

DROP TABLE IF EXISTS `jeecg_order_customer`;

CREATE TABLE `jeecg_order_customer` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `name` varchar(100) NOT NULL COMMENT '客户名',
  `sex` varchar(4) DEFAULT NULL COMMENT '性别',
  `idcard` varchar(18) DEFAULT NULL COMMENT '身份证号码',
  `idcard_pic` varchar(500) DEFAULT NULL COMMENT '身份证扫描件',
  `telphone` varchar(32) DEFAULT NULL COMMENT '电话1',
  `order_id` varchar(32) NOT NULL COMMENT '外键',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jeecg_order_main` */

DROP TABLE IF EXISTS `jeecg_order_main`;

CREATE TABLE `jeecg_order_main` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `order_code` varchar(50) DEFAULT NULL COMMENT '订单号',
  `ctype` varchar(500) DEFAULT NULL COMMENT '订单类型',
  `order_date` datetime DEFAULT NULL COMMENT '订单日期',
  `order_money` double(10,3) DEFAULT NULL COMMENT '订单金额',
  `content` varchar(500) DEFAULT NULL COMMENT '订单备注',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `bpm_status` varchar(3) DEFAULT NULL COMMENT '流程状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jeecg_order_ticket` */

DROP TABLE IF EXISTS `jeecg_order_ticket`;

CREATE TABLE `jeecg_order_ticket` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `ticket_code` varchar(100) NOT NULL COMMENT '航班号',
  `tickect_date` datetime DEFAULT NULL COMMENT '航班时间',
  `order_id` varchar(32) NOT NULL COMMENT '外键',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jeecg_project_nature_income` */

DROP TABLE IF EXISTS `jeecg_project_nature_income`;

CREATE TABLE `jeecg_project_nature_income` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nature` varchar(50) NOT NULL COMMENT '项目性质',
  `insurance_fee` decimal(18,2) DEFAULT '0.00' COMMENT '保险经纪佣金费',
  `risk_consulting_fee` decimal(18,2) DEFAULT '0.00' COMMENT '风险咨询费',
  `evaluation_fee` decimal(18,2) DEFAULT '0.00' COMMENT '承保公估评估费',
  `insurance_evaluation_fee` decimal(18,2) DEFAULT '0.00' COMMENT '保险公估费',
  `bidding_consulting_fee` decimal(18,2) DEFAULT '0.00' COMMENT '投标咨询费',
  `interol_consulting_fee` decimal(18,2) DEFAULT '0.00' COMMENT '内控咨询费',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jimu_dict` */

DROP TABLE IF EXISTS `jimu_dict`;

CREATE TABLE `jimu_dict` (
  `id` varchar(32) NOT NULL,
  `dict_name` varchar(100) NOT NULL COMMENT '字典名称',
  `dict_code` varchar(100) NOT NULL COMMENT '字典编码',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `del_flag` int(1) DEFAULT NULL COMMENT '删除状态',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `type` int(1) unsigned zerofill DEFAULT '0' COMMENT '字典类型0为string,1为number',
  `tenant_id` varchar(10) DEFAULT NULL COMMENT '多租户标识',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_sd_dict_code` (`dict_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jimu_dict_item` */

DROP TABLE IF EXISTS `jimu_dict_item`;

CREATE TABLE `jimu_dict_item` (
  `id` varchar(32) NOT NULL,
  `dict_id` varchar(32) DEFAULT NULL COMMENT '字典id',
  `item_text` varchar(100) NOT NULL COMMENT '字典项文本',
  `item_value` varchar(100) NOT NULL COMMENT '字典项值',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `sort_order` int(10) DEFAULT NULL COMMENT '排序',
  `status` int(11) DEFAULT NULL COMMENT '状态（1启用 0不启用）',
  `create_by` varchar(32) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(32) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sdi_role_dict_id` (`dict_id`) USING BTREE,
  KEY `idx_sdi_role_sort_order` (`sort_order`) USING BTREE,
  KEY `idx_sdi_status` (`status`) USING BTREE,
  KEY `idx_sdi_dict_val` (`dict_id`,`item_value`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jimu_report` */

DROP TABLE IF EXISTS `jimu_report`;

CREATE TABLE `jimu_report` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `code` varchar(50) DEFAULT NULL COMMENT '编码',
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `note` varchar(255) DEFAULT NULL COMMENT '说明',
  `status` varchar(10) DEFAULT NULL COMMENT '状态',
  `type` varchar(50) DEFAULT NULL COMMENT '类型',
  `json_str` longtext COMMENT 'json字符串',
  `api_url` varchar(255) DEFAULT NULL COMMENT '请求地址',
  `thumb` text COMMENT '缩略图',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(50) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `del_flag` tinyint(1) DEFAULT NULL COMMENT '删除标识0-正常,1-已删除',
  `api_method` varchar(255) DEFAULT NULL COMMENT '请求方法0-get,1-post',
  `api_code` varchar(255) DEFAULT NULL COMMENT '请求编码',
  `template` tinyint(1) DEFAULT NULL COMMENT '是否是模板 0不是,1是',
  `view_count` bigint(15) DEFAULT '0' COMMENT '浏览次数',
  `css_str` text COMMENT 'css增强',
  `js_str` text COMMENT 'js增强',
  `py_str` text COMMENT 'py增强',
  `tenant_id` varchar(10) DEFAULT NULL COMMENT '多租户标识',
  `update_count` int(11) DEFAULT '0' COMMENT '乐观锁版本',
  `submit_form` tinyint(1) DEFAULT NULL COMMENT '是否填报报表 0不是,1是',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_jmreport_code` (`code`) USING BTREE,
  KEY `uniq_jmreport_createby` (`create_by`) USING BTREE,
  KEY `uniq_jmreport_delflag` (`del_flag`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='在线excel设计器';

/*Table structure for table `jimu_report_category` */

DROP TABLE IF EXISTS `jimu_report_category`;

CREATE TABLE `jimu_report_category` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `name` varchar(100) NOT NULL COMMENT '分类名称',
  `parent_id` varchar(32) DEFAULT NULL COMMENT '父级id',
  `iz_leaf` int(1) DEFAULT NULL COMMENT '是否为叶子节点(0 否 1是)',
  `source_type` varchar(10) DEFAULT NULL COMMENT '来源类型( report 积木报表 screen 大屏  drag 仪表盘)',
  `del_flag` int(1) DEFAULT NULL COMMENT '删除标识(0 正常 1 已删除)',
  `create_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人',
  `update_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  `tenant_id` varchar(11) DEFAULT NULL COMMENT '租户id',
  `sort_no` int(11) DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='分类';

/*Table structure for table `jimu_report_data_source` */

DROP TABLE IF EXISTS `jimu_report_data_source`;

CREATE TABLE `jimu_report_data_source` (
  `id` varchar(36) NOT NULL,
  `name` varchar(100) DEFAULT NULL COMMENT '数据源名称',
  `report_id` varchar(100) DEFAULT NULL COMMENT '报表_id',
  `code` varchar(100) DEFAULT NULL COMMENT '编码',
  `remark` varchar(200) DEFAULT NULL COMMENT '备注',
  `db_type` varchar(10) DEFAULT NULL COMMENT '数据库类型',
  `db_driver` varchar(100) DEFAULT NULL COMMENT '驱动类',
  `db_url` varchar(500) DEFAULT NULL COMMENT '数据源地址',
  `db_username` varchar(100) DEFAULT NULL COMMENT '用户名',
  `db_password` varchar(100) DEFAULT NULL COMMENT '密码',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `connect_times` int(11) DEFAULT '0' COMMENT '连接失败次数',
  `tenant_id` varchar(10) CHARACTER SET utf8 DEFAULT NULL COMMENT '多租户标识',
  `type` varchar(10) DEFAULT NULL COMMENT '类型(report:报表;drag:仪表盘)',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_jmdatasource_report_id` (`report_id`) USING BTREE,
  KEY `idx_jmdatasource_code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jimu_report_db` */

DROP TABLE IF EXISTS `jimu_report_db`;

CREATE TABLE `jimu_report_db` (
  `id` varchar(36) NOT NULL COMMENT 'id',
  `jimu_report_id` varchar(32) DEFAULT NULL COMMENT '主键字段',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `db_code` varchar(32) DEFAULT NULL COMMENT '数据集编码',
  `db_ch_name` varchar(50) DEFAULT NULL COMMENT '数据集名字',
  `db_type` varchar(32) DEFAULT NULL COMMENT '数据源类型',
  `db_table_name` varchar(32) DEFAULT NULL COMMENT '数据库表名',
  `db_dyn_sql` longtext COMMENT '动态查询SQL',
  `db_key` varchar(32) DEFAULT NULL COMMENT '数据源KEY',
  `tb_db_key` varchar(32) DEFAULT NULL COMMENT '填报数据源',
  `tb_db_table_name` varchar(32) DEFAULT NULL COMMENT '填报数据表',
  `java_type` varchar(32) DEFAULT NULL COMMENT 'java类数据集  类型（spring:springkey,class:java类名）',
  `java_value` varchar(255) DEFAULT NULL COMMENT 'java类数据源  数值（bean key/java类名）',
  `api_url` varchar(255) DEFAULT NULL COMMENT '请求地址',
  `api_method` varchar(255) DEFAULT NULL COMMENT '请求方法0-get,1-post',
  `is_list` varchar(10) DEFAULT '0' COMMENT '是否是列表0否1是 默认0',
  `is_page` varchar(10) DEFAULT NULL COMMENT '是否作为分页,0:不分页，1:分页',
  `db_source` varchar(255) DEFAULT NULL COMMENT '数据源',
  `db_source_type` varchar(50) DEFAULT NULL COMMENT '数据库类型 MYSQL ORACLE SQLSERVER',
  `json_data` text COMMENT 'json数据，直接解析json内容',
  `api_convert` varchar(255) DEFAULT NULL COMMENT 'api转换器',
  `iz_shared_source` int(1) DEFAULT NULL COMMENT '是否为共享数据源(0 否 1 是)',
  `jimu_shared_source_id` varchar(32) DEFAULT NULL COMMENT '指向共享数据集的id',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_jmreportdb_db_key` (`db_key`) USING BTREE,
  KEY `idx_jimu_report_id` (`jimu_report_id`) USING BTREE,
  KEY `idx_db_source_id` (`db_source`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jimu_report_db_field` */

DROP TABLE IF EXISTS `jimu_report_db_field`;

CREATE TABLE `jimu_report_db_field` (
  `id` varchar(36) NOT NULL COMMENT 'id',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `jimu_report_db_id` varchar(32) DEFAULT NULL COMMENT '数据源ID',
  `field_name` varchar(80) DEFAULT NULL COMMENT '字段名',
  `field_name_physics` varchar(200) DEFAULT NULL COMMENT '物理字段名（文件数据集使用，存的是excel的字段标题）',
  `field_text` varchar(50) DEFAULT NULL COMMENT '字段文本',
  `widget_type` varchar(50) DEFAULT NULL COMMENT '控件类型',
  `widget_width` int(10) DEFAULT NULL COMMENT '控件宽度',
  `order_num` int(3) DEFAULT NULL COMMENT '排序',
  `search_flag` int(3) DEFAULT '0' COMMENT '查询标识0否1是 默认0',
  `search_mode` int(3) DEFAULT NULL COMMENT '查询模式1简单2范围',
  `dict_code` varchar(255) DEFAULT NULL COMMENT '字典编码支持从表中取数据',
  `search_value` varchar(100) DEFAULT NULL COMMENT '查询默认值',
  `search_format` varchar(50) DEFAULT NULL COMMENT '查询时间格式化表达式',
  `ext_json` text COMMENT '参数配置',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_jrdf_jimu_report_db_id` (`jimu_report_db_id`) USING BTREE,
  KEY `idx_dbfield_order_num` (`order_num`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jimu_report_db_param` */

DROP TABLE IF EXISTS `jimu_report_db_param`;

CREATE TABLE `jimu_report_db_param` (
  `id` varchar(36) NOT NULL,
  `jimu_report_head_id` varchar(36) NOT NULL COMMENT '动态报表ID',
  `param_name` varchar(32) NOT NULL COMMENT '参数字段',
  `param_txt` varchar(32) DEFAULT NULL COMMENT '参数文本',
  `param_value` varchar(1000) DEFAULT NULL COMMENT '参数默认值',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `search_flag` int(1) DEFAULT NULL COMMENT '查询标识0否1是 默认0',
  `widget_type` varchar(50) DEFAULT NULL COMMENT '查询控件类型',
  `search_mode` int(1) DEFAULT NULL COMMENT '查询模式1简单2范围',
  `dict_code` varchar(255) DEFAULT NULL COMMENT '字典',
  `search_format` varchar(50) DEFAULT NULL COMMENT '查询时间格式化表达式',
  `ext_json` text COMMENT '参数配置',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_jrdp_jimu_report_head_id` (`jimu_report_head_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `jimu_report_export_job` */

DROP TABLE IF EXISTS `jimu_report_export_job`;

CREATE TABLE `jimu_report_export_job` (
  `id` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
  `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '任务名称',
  `begin_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `exec_interval` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '执行频率',
  `report_conf` text COLLATE utf8mb4_unicode_ci COMMENT '导出报表配置',
  `last_run_time` datetime DEFAULT NULL COMMENT '最后执行时间',
  `receiver_email` text COLLATE utf8mb4_unicode_ci COMMENT '接收通知的邮件',
  `file_sync_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文件同步路径',
  `status` int(11) DEFAULT NULL COMMENT '状态(0:停止;1:启动)',
  `create_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `tenant_id` varchar(10) CHARACTER SET utf8 DEFAULT NULL COMMENT '多租户标识',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='积木报表导出计划表';

/*Table structure for table `jimu_report_export_log` */

DROP TABLE IF EXISTS `jimu_report_export_log`;

CREATE TABLE `jimu_report_export_log` (
  `id` varchar(32) CHARACTER SET utf8 NOT NULL,
  `batch_no` varchar(50) DEFAULT NULL COMMENT '批次编号',
  `export_channel` varchar(20) DEFAULT NULL COMMENT '导出渠道',
  `export_type` varchar(10) DEFAULT NULL COMMENT '导出类型',
  `report_id` text COMMENT '报表id',
  `download_path` varchar(255) DEFAULT NULL COMMENT '下载路径',
  `status` varchar(15) DEFAULT NULL COMMENT '状态',
  `create_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `tenant_id` varchar(10) CHARACTER SET utf8 DEFAULT NULL COMMENT '多租户标识',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='积木报表自动导出记录表';

/*Table structure for table `jimu_report_icon_lib` */

DROP TABLE IF EXISTS `jimu_report_icon_lib`;

CREATE TABLE `jimu_report_icon_lib` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `name` varchar(100) DEFAULT NULL COMMENT '图片名称',
  `type` varchar(32) DEFAULT NULL COMMENT '图片类型',
  `image_url` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '图片地址',
  `create_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `tenant_id` int(11) DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='积木图库表';

/*Table structure for table `jimu_report_link` */

DROP TABLE IF EXISTS `jimu_report_link`;

CREATE TABLE `jimu_report_link` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `report_id` varchar(32) DEFAULT NULL COMMENT '积木设计器id',
  `parameter` text COMMENT '参数',
  `eject_type` varchar(1) DEFAULT NULL COMMENT '弹出方式（0 当前页面 1 新窗口）',
  `link_name` varchar(255) DEFAULT NULL COMMENT '链接名称',
  `api_method` varchar(1) DEFAULT NULL COMMENT '请求方法0-get,1-post',
  `link_type` varchar(1) DEFAULT NULL COMMENT '链接方式(0 网络报表 1 网络连接 2 图表联动)',
  `api_url` varchar(1000) DEFAULT NULL COMMENT '外网api',
  `link_chart_id` varchar(50) DEFAULT NULL COMMENT '联动图表的ID',
  `expression` varchar(255) DEFAULT NULL COMMENT '表达式',
  `requirement` varchar(255) DEFAULT NULL COMMENT '条件',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `uniq_link_reportid` (`report_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='超链接配置表';

/*Table structure for table `jimu_report_map` */

DROP TABLE IF EXISTS `jimu_report_map`;

CREATE TABLE `jimu_report_map` (
  `id` varchar(64) NOT NULL COMMENT '主键',
  `label` varchar(125) DEFAULT NULL COMMENT '地图名称',
  `name` varchar(125) DEFAULT NULL COMMENT '地图编码',
  `data` longtext COMMENT '地图数据',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `del_flag` varchar(1) DEFAULT NULL COMMENT '0表示未删除,1表示删除',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_jmreport_map_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='地图配置表';

/*Table structure for table `jimu_report_share` */

DROP TABLE IF EXISTS `jimu_report_share`;

CREATE TABLE `jimu_report_share` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `report_id` varchar(32) DEFAULT NULL COMMENT '在线excel设计器id',
  `preview_url` varchar(1000) DEFAULT NULL COMMENT '预览地址',
  `preview_lock` varchar(4) DEFAULT NULL COMMENT '密码锁',
  `last_update_time` datetime DEFAULT NULL COMMENT '最后更新时间',
  `term_of_validity` varchar(1) DEFAULT NULL COMMENT '有效期(0:永久有效，1:1天，2:7天)',
  `status` varchar(1) DEFAULT NULL COMMENT '是否过期(0未过期，1已过期)',
  `preview_lock_status` varchar(1) DEFAULT NULL COMMENT '是否为密码锁(0 否,1是)',
  `share_token` varchar(50) DEFAULT NULL COMMENT '分享token',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_report_id` (`report_id`) USING BTREE,
  UNIQUE KEY `uniq_jrs_report_id` (`report_id`) USING BTREE COMMENT '报表id唯一索引',
  KEY `idx_jrs_share_token` (`share_token`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='积木报表预览权限表';

/*Table structure for table `joa_demo` */

DROP TABLE IF EXISTS `joa_demo`;

CREATE TABLE `joa_demo` (
  `id` varchar(32) DEFAULT NULL COMMENT 'ID',
  `name` varchar(100) DEFAULT NULL COMMENT '请假人',
  `days` int(11) DEFAULT NULL COMMENT '请假天数',
  `begin_date` datetime DEFAULT NULL COMMENT '开始时间',
  `end_date` datetime DEFAULT NULL COMMENT '请假结束时间',
  `reason` varchar(500) DEFAULT NULL COMMENT '请假原因',
  `bpm_status` varchar(50) DEFAULT '1' COMMENT '流程状态',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='流程测试';

/*Table structure for table `metric_api_cfg` */

DROP TABLE IF EXISTS `metric_api_cfg`;

CREATE TABLE `metric_api_cfg` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `mtrc_no` varchar(32) NOT NULL COMMENT '指标ID',
  `api_name` varchar(32) NOT NULL COMMENT 'API接口名称',
  `url` varchar(128) NOT NULL COMMENT '接口URL',
  `request_method` varchar(16) DEFAULT NULL COMMENT '请求方法',
  `request_headers` varchar(256) DEFAULT NULL COMMENT '请求头',
  `accout` varchar(16) DEFAULT NULL COMMENT '登录账号',
  `pwd` varchar(16) DEFAULT NULL COMMENT '登录密码',
  `params` varchar(256) DEFAULT NULL COMMENT '请求参数',
  `value_type` smallint(4) DEFAULT NULL COMMENT '响应参数',
  `value_field` varchar(12) DEFAULT NULL COMMENT '返回值名',
  `receiver` varchar(512) DEFAULT NULL,
  `mult` float(10,2) DEFAULT NULL COMMENT '乘数',
  `st_date` date DEFAULT NULL COMMENT '开始日期',
  `st_time` int(11) DEFAULT NULL COMMENT '开始的时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `metric_monitor_set` */

DROP TABLE IF EXISTS `metric_monitor_set`;

CREATE TABLE `metric_monitor_set` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mtrc_name` varchar(128) DEFAULT NULL COMMENT '指标名称',
  `mtrc_no` varchar(32) NOT NULL COMMENT '指标NO',
  `st_tol_val` float(6,3) DEFAULT NULL,
  `tol_val` float(6,3) DEFAULT NULL COMMENT '容忍值',
  `warn_val` float(6,3) DEFAULT NULL COMMENT '预警值',
  `intv_val` float(6,3) DEFAULT NULL COMMENT '干预值',
  `mtrc_source_tp` int(4) DEFAULT NULL COMMENT '1:指标库2-自己创建',
  `mtrc_sta` int(5) DEFAULT NULL COMMENT '指标状态',
  `owner_user` varchar(32) DEFAULT NULL COMMENT '拥有人',
  `mtrc_ctp` smallint(4) DEFAULT NULL COMMENT '指标分类',
  `mtrc_tp` smallint(4) DEFAULT NULL COMMENT '指标类型',
  `created_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `coll_method` int(4) DEFAULT NULL COMMENT '采集方法',
  `coll_freq` varchar(16) DEFAULT NULL COMMENT '采集频率',
  `formulas` varchar(64) DEFAULT NULL COMMENT '公式',
  `unit` varchar(16) DEFAULT NULL COMMENT '指标单位',
  `params` varchar(512) DEFAULT NULL COMMENT '参数',
  `domain_no` varchar(16) DEFAULT NULL COMMENT '领域编号',
  `des` varchar(256) DEFAULT NULL COMMENT '备注',
  `mtrc_class` smallint(4) DEFAULT NULL COMMENT '类别',
  `notice_receive_low` varchar(512) DEFAULT NULL,
  `notice_receive_middle` varchar(512) DEFAULT NULL,
  `notice_receive_hight` varchar(512) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `create_by` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=304 DEFAULT CHARSET=utf8;

/*Table structure for table `metric_monitor_set_history` */

DROP TABLE IF EXISTS `metric_monitor_set_history`;

CREATE TABLE `metric_monitor_set_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mtrc_name` varchar(128) DEFAULT NULL COMMENT '指标名称',
  `mtrc_no` varchar(32) NOT NULL COMMENT '指标NO',
  `st_tol_val` double(6,3) DEFAULT NULL COMMENT 'stTolVal',
  `tol_val` double(6,3) DEFAULT NULL COMMENT '容忍值',
  `warn_val` double(6,3) DEFAULT NULL COMMENT '预警值',
  `intv_val` double(6,3) DEFAULT NULL COMMENT '干预值',
  `mtrc_source_tp` int(4) DEFAULT NULL COMMENT '1:指标库2-自己创建',
  `mtrc_sta` int(5) DEFAULT NULL COMMENT '指标状态',
  `owner_user` varchar(32) DEFAULT NULL COMMENT '拥有人',
  `mtrc_ctp` int(5) DEFAULT NULL COMMENT '指标分类',
  `mtrc_tp` int(5) DEFAULT NULL COMMENT '指标类型',
  `created_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `coll_method` int(4) DEFAULT NULL COMMENT '采集方法',
  `coll_freq` varchar(16) DEFAULT NULL COMMENT '采集频率',
  `formulas` varchar(64) DEFAULT NULL COMMENT '公式',
  `unit` varchar(16) DEFAULT NULL COMMENT '指标单位',
  `params` varchar(512) DEFAULT NULL COMMENT '参数',
  `domain_no` varchar(16) DEFAULT NULL COMMENT '领域编号',
  `des` varchar(256) DEFAULT NULL COMMENT '备注',
  `mtrc_class` int(5) DEFAULT NULL COMMENT '类别',
  `notice_receive_low` varchar(512) DEFAULT NULL COMMENT 'noticeReceiveLow',
  `notice_receive_middle` varchar(512) DEFAULT NULL COMMENT 'noticeReceiveMiddle',
  `notice_receive_hight` varchar(512) DEFAULT NULL COMMENT 'noticeReceiveHight',
  `create_time` datetime DEFAULT NULL,
  `create_by` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

/*Table structure for table `metric_monitor_set_other` */

DROP TABLE IF EXISTS `metric_monitor_set_other`;

CREATE TABLE `metric_monitor_set_other` (
  `id` int(11) NOT NULL,
  `affect_factor` varchar(512) DEFAULT NULL COMMENT '影响指标值的原因',
  `ge_warn_risk` varchar(512) DEFAULT NULL COMMENT '大于警告值的风险',
  `ge_warn_act` varchar(512) DEFAULT NULL COMMENT '超过预警值应该采取的措施',
  `ge_tol_act` varchar(512) DEFAULT NULL COMMENT '超过阀值应该采取的措施',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `metric_report` */

DROP TABLE IF EXISTS `metric_report`;

CREATE TABLE `metric_report` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mtrc_no` varchar(32) DEFAULT NULL COMMENT '指标NO',
  `fill_time` datetime DEFAULT NULL COMMENT '填报时间',
  `fill_vals` double(25,15) DEFAULT NULL COMMENT '填报值',
  `reporter` varchar(32) DEFAULT NULL COMMENT '填报人',
  `des` varchar(128) DEFAULT NULL COMMENT '备注',
  `risk_level` smallint(2) DEFAULT NULL COMMENT '风险等级',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=32099 DEFAULT CHARSET=utf8;

/*Table structure for table `metric_stat_report` */

DROP TABLE IF EXISTS `metric_stat_report`;

CREATE TABLE `metric_stat_report` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pk',
  `title` varchar(32) DEFAULT NULL COMMENT '标题',
  `report_date` date DEFAULT NULL COMMENT '报告日期',
  `st_date` date DEFAULT NULL COMMENT '开始日期',
  `end_date` date DEFAULT NULL COMMENT '结束日期',
  `report_depart` varchar(320) DEFAULT NULL COMMENT '报告部门',
  `stat_target_num` int(11) DEFAULT NULL COMMENT '统计指标数',
  `risk_low_num` int(11) DEFAULT NULL COMMENT '低风险指标数',
  `risk_medium_num` int(11) DEFAULT NULL COMMENT '中风险指标数',
  `risk_high_num` int(11) DEFAULT NULL COMMENT '高风险指标数',
  `risk_other_num` int(11) DEFAULT NULL COMMENT '其他',
  `tp` smallint(4) DEFAULT NULL COMMENT '报告分类',
  `filepath` varchar(64) DEFAULT NULL COMMENT '文件路径',
  `create_user` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `subtitle` varchar(32) DEFAULT NULL,
  `stat_method` smallint(4) DEFAULT NULL COMMENT '统计类型',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;

/*Table structure for table `metric_stat_set` */

DROP TABLE IF EXISTS `metric_stat_set`;

CREATE TABLE `metric_stat_set` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'pk',
  `tp` int(11) DEFAULT NULL COMMENT '报告类型',
  `Heading` varchar(32) DEFAULT NULL COMMENT '报告主标题',
  `subtitle` varchar(32) DEFAULT NULL COMMENT '副标题',
  `depart_id` varchar(128) DEFAULT NULL COMMENT '部门id',
  `stat_method` int(5) DEFAULT NULL COMMENT '统计方法',
  `level1` float(5,2) DEFAULT NULL COMMENT '优秀',
  `level2` float(5,2) DEFAULT NULL COMMENT '良好',
  `level3` float(5,2) DEFAULT NULL COMMENT '一般',
  `level4` float(5,2) DEFAULT NULL COMMENT '较差',
  `level5` float(5,2) DEFAULT NULL COMMENT '差',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1102409736 DEFAULT CHARSET=utf8;

/*Table structure for table `metric_task_alloc` */

DROP TABLE IF EXISTS `metric_task_alloc`;

CREATE TABLE `metric_task_alloc` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mtrc_no` varchar(32) NOT NULL COMMENT '指标NO',
  `report_depart` varchar(32) DEFAULT NULL COMMENT '填报部门',
  `reporter` varchar(32) DEFAULT NULL COMMENT '填报人',
  `alloc_sta` int(5) DEFAULT NULL COMMENT '状态',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=273 DEFAULT CHARSET=utf8;

/*Table structure for table `my_task` */

DROP TABLE IF EXISTS `my_task`;

CREATE TABLE `my_task` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(128) DEFAULT NULL COMMENT '名称',
  `tp` int(2) DEFAULT NULL COMMENT '分类',
  `link_addr` varchar(32) DEFAULT NULL COMMENT '跳转地址',
  `target_id` int(11) DEFAULT NULL COMMENT '目标ID',
  `target` varchar(64) DEFAULT NULL COMMENT '跳转地址',
  `task_name` varchar(16) DEFAULT NULL COMMENT '待办任务状态',
  `sta` int(2) DEFAULT NULL COMMENT '状态',
  `priority` char(1) DEFAULT NULL COMMENT '优先级',
  `uid` varchar(32) DEFAULT NULL COMMENT '待办人',
  `st_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '截止时间',
  `des` varchar(1024) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2140327939 DEFAULT CHARSET=utf8;

/*Table structure for table `oauth2_registered_client` */

DROP TABLE IF EXISTS `oauth2_registered_client`;

CREATE TABLE `oauth2_registered_client` (
  `id` varchar(100) NOT NULL,
  `client_id` varchar(100) NOT NULL,
  `client_id_issued_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `client_secret` varchar(200) DEFAULT NULL,
  `client_secret_expires_at` timestamp NULL DEFAULT NULL,
  `client_name` varchar(200) NOT NULL,
  `client_authentication_methods` varchar(1000) NOT NULL,
  `authorization_grant_types` varchar(1000) NOT NULL,
  `redirect_uris` varchar(1000) DEFAULT NULL,
  `post_logout_redirect_uris` varchar(1000) DEFAULT NULL,
  `scopes` varchar(1000) NOT NULL,
  `client_settings` varchar(2000) NOT NULL,
  `token_settings` varchar(2000) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_auth_data` */

DROP TABLE IF EXISTS `onl_auth_data`;

CREATE TABLE `onl_auth_data` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `cgform_id` varchar(32) DEFAULT NULL COMMENT 'online表ID',
  `rule_name` varchar(50) DEFAULT NULL COMMENT '规则名',
  `rule_column` varchar(50) DEFAULT NULL COMMENT '规则列',
  `rule_operator` varchar(50) DEFAULT NULL COMMENT '规则条件 大于小于like',
  `rule_value` varchar(255) DEFAULT NULL COMMENT '规则值',
  `status` int(1) DEFAULT NULL COMMENT '1有效 0无效',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_auth_page` */

DROP TABLE IF EXISTS `onl_auth_page`;

CREATE TABLE `onl_auth_page` (
  `id` varchar(32) NOT NULL COMMENT ' 主键',
  `cgform_id` varchar(32) DEFAULT NULL COMMENT 'online表id',
  `code` varchar(255) DEFAULT NULL COMMENT '字段名/按钮编码',
  `type` int(1) DEFAULT NULL COMMENT '1字段 2按钮',
  `control` int(1) DEFAULT NULL COMMENT '3可编辑 5可见(仅支持两种状态值3,5)',
  `page` int(1) DEFAULT NULL COMMENT '3列表 5表单(仅支持两种状态值3,5)',
  `status` int(1) DEFAULT NULL COMMENT '1有效 0无效',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_onl_auth_page_code` (`code`) USING BTREE,
  KEY `idx_onl_auth_page_cgform_id` (`cgform_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_auth_relation` */

DROP TABLE IF EXISTS `onl_auth_relation`;

CREATE TABLE `onl_auth_relation` (
  `id` varchar(32) NOT NULL,
  `role_id` varchar(32) DEFAULT NULL COMMENT '角色id',
  `auth_id` varchar(32) DEFAULT NULL COMMENT '权限id',
  `type` int(1) DEFAULT NULL COMMENT '1字段 2按钮 3数据权限',
  `cgform_id` varchar(32) DEFAULT NULL COMMENT 'online表单ID',
  `auth_mode` varchar(50) DEFAULT NULL COMMENT '授权方式role角色，depart部门，user人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_cgform_button` */

DROP TABLE IF EXISTS `onl_cgform_button`;

CREATE TABLE `onl_cgform_button` (
  `ID` varchar(32) NOT NULL COMMENT '主键ID',
  `BUTTON_CODE` varchar(50) DEFAULT NULL COMMENT '按钮编码',
  `BUTTON_ICON` varchar(50) DEFAULT NULL COMMENT '按钮图标',
  `BUTTON_NAME` varchar(50) DEFAULT NULL COMMENT '按钮名称',
  `BUTTON_STATUS` varchar(2) DEFAULT NULL COMMENT '按钮状态',
  `BUTTON_STYLE` varchar(20) DEFAULT NULL COMMENT '按钮样式',
  `EXP` varchar(255) DEFAULT NULL COMMENT '表达式',
  `CGFORM_HEAD_ID` varchar(32) DEFAULT NULL COMMENT '表单ID',
  `OPT_TYPE` varchar(20) DEFAULT NULL COMMENT '按钮类型',
  `ORDER_NUM` int(11) DEFAULT NULL COMMENT '排序',
  `OPT_POSITION` varchar(3) DEFAULT NULL COMMENT '按钮位置1侧面 2底部',
  PRIMARY KEY (`ID`) USING BTREE,
  KEY `idx_ocb_CGFORM_HEAD_ID` (`CGFORM_HEAD_ID`) USING BTREE,
  KEY `idx_ocb_BUTTON_CODE` (`BUTTON_CODE`) USING BTREE,
  KEY `idx_ocb_BUTTON_STATUS` (`BUTTON_STATUS`) USING BTREE,
  KEY `idx_ocb_ORDER_NUM` (`ORDER_NUM`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Online表单自定义按钮';

/*Table structure for table `onl_cgform_enhance_java` */

DROP TABLE IF EXISTS `onl_cgform_enhance_java`;

CREATE TABLE `onl_cgform_enhance_java` (
  `ID` varchar(36) NOT NULL,
  `BUTTON_CODE` varchar(32) DEFAULT NULL COMMENT '按钮编码',
  `CG_JAVA_TYPE` varchar(32) NOT NULL COMMENT '类型',
  `CG_JAVA_VALUE` varchar(200) NOT NULL COMMENT '数值',
  `CGFORM_HEAD_ID` varchar(32) NOT NULL COMMENT '表单ID',
  `ACTIVE_STATUS` varchar(2) DEFAULT '1' COMMENT '生效状态',
  `EVENT` varchar(10) NOT NULL DEFAULT 'end' COMMENT '事件状态(end:结束，start:开始)',
  PRIMARY KEY (`ID`) USING BTREE,
  KEY `idx_ejava_cgform_head_id` (`CGFORM_HEAD_ID`) USING BTREE,
  KEY `idx_ocej_BUTTON_CODE` (`BUTTON_CODE`) USING BTREE,
  KEY `idx_ocej_ACTIVE_STATUS` (`ACTIVE_STATUS`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_cgform_enhance_js` */

DROP TABLE IF EXISTS `onl_cgform_enhance_js`;

CREATE TABLE `onl_cgform_enhance_js` (
  `ID` varchar(32) NOT NULL COMMENT '主键ID',
  `CG_JS` longtext COMMENT 'JS增强内容',
  `CG_JS_TYPE` varchar(20) DEFAULT NULL COMMENT '类型',
  `CONTENT` varchar(1000) DEFAULT NULL COMMENT '备注',
  `CGFORM_HEAD_ID` varchar(32) DEFAULT NULL COMMENT '表单ID',
  PRIMARY KEY (`ID`) USING BTREE,
  KEY `idx_ejs_cgform_head_id` (`CGFORM_HEAD_ID`) USING BTREE,
  KEY `idx_ejs_cg_js_type` (`CG_JS_TYPE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_cgform_enhance_sql` */

DROP TABLE IF EXISTS `onl_cgform_enhance_sql`;

CREATE TABLE `onl_cgform_enhance_sql` (
  `ID` varchar(32) NOT NULL COMMENT '主键ID',
  `BUTTON_CODE` varchar(50) DEFAULT NULL COMMENT '按钮编码',
  `CGB_SQL` longtext COMMENT 'SQL内容',
  `CGB_SQL_NAME` varchar(50) DEFAULT NULL COMMENT 'Sql名称',
  `CONTENT` varchar(1000) DEFAULT NULL COMMENT '备注',
  `CGFORM_HEAD_ID` varchar(32) DEFAULT NULL COMMENT '表单ID',
  PRIMARY KEY (`ID`) USING BTREE,
  KEY `idx_oces_CGFORM_HEAD_ID` (`CGFORM_HEAD_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_cgform_field` */

DROP TABLE IF EXISTS `onl_cgform_field`;

CREATE TABLE `onl_cgform_field` (
  `id` varchar(32) NOT NULL COMMENT '主键ID',
  `cgform_head_id` varchar(32) NOT NULL COMMENT '表ID',
  `db_field_name` varchar(32) NOT NULL COMMENT '字段名字',
  `db_field_txt` varchar(200) DEFAULT NULL COMMENT '字段备注',
  `db_field_name_old` varchar(32) DEFAULT NULL COMMENT '原字段名',
  `db_is_key` tinyint(1) DEFAULT NULL COMMENT '是否主键 0否 1是',
  `db_is_null` tinyint(1) DEFAULT NULL COMMENT '是否允许为空0否 1是',
  `db_is_persist` tinyint(1) DEFAULT NULL COMMENT '是否需要同步数据库字段， 1是0否',
  `db_type` varchar(32) NOT NULL COMMENT '数据库字段类型',
  `db_length` int(11) NOT NULL COMMENT '数据库字段长度',
  `db_point_length` int(11) DEFAULT NULL COMMENT '小数点',
  `db_default_val` varchar(20) DEFAULT NULL COMMENT '表字段默认值',
  `dict_field` varchar(100) DEFAULT NULL COMMENT '字典code',
  `dict_table` varchar(255) DEFAULT NULL COMMENT '字典表',
  `dict_text` varchar(100) DEFAULT NULL COMMENT '字典Text',
  `field_show_type` varchar(20) DEFAULT NULL COMMENT '表单控件类型',
  `field_href` varchar(200) DEFAULT NULL COMMENT '跳转URL',
  `field_length` int(11) DEFAULT NULL COMMENT '表单控件长度',
  `field_valid_type` varchar(300) DEFAULT NULL COMMENT '表单字段校验规则',
  `field_must_input` varchar(2) DEFAULT NULL COMMENT '字段是否必填',
  `field_extend_json` varchar(500) DEFAULT NULL COMMENT '扩展参数JSON',
  `field_default_value` varchar(100) DEFAULT NULL COMMENT '控件默认值，不同的表达式展示不同的结果。\r\n1. 纯字符串直接赋给默认值；\r\n2. #{普通变量}；\r\n3. {{ 动态JS表达式 }}；\r\n4. ${填值规则编码}；\r\n填值规则表达式只允许存在一个，且不能和其他规则混用。',
  `is_query` tinyint(1) DEFAULT NULL COMMENT '是否查询条件0否 1是',
  `is_show_form` tinyint(1) DEFAULT NULL COMMENT '表单是否显示0否 1是',
  `is_show_list` tinyint(1) DEFAULT NULL COMMENT '列表是否显示0否 1是',
  `is_read_only` tinyint(1) DEFAULT '0' COMMENT '是否是只读（1是 0否）',
  `query_mode` varchar(10) DEFAULT NULL COMMENT '查询模式',
  `main_table` varchar(100) DEFAULT NULL COMMENT '外键主表名',
  `main_field` varchar(100) DEFAULT NULL COMMENT '外键主键字段',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
  `converter` varchar(255) DEFAULT NULL COMMENT '自定义值转换器',
  `query_def_val` varchar(50) DEFAULT NULL COMMENT '查询默认值',
  `query_dict_text` varchar(100) DEFAULT NULL COMMENT '查询配置字典text',
  `query_dict_field` varchar(100) DEFAULT NULL COMMENT '查询配置字典code',
  `query_dict_table` varchar(500) DEFAULT NULL COMMENT '查询配置字典table',
  `query_show_type` varchar(50) DEFAULT NULL COMMENT '查询显示控件',
  `query_config_flag` varchar(3) DEFAULT NULL COMMENT '是否启用查询配置1是0否',
  `query_valid_type` varchar(50) DEFAULT NULL COMMENT '查询字段校验类型',
  `query_must_input` varchar(3) DEFAULT NULL COMMENT '查询字段是否必填1是0否',
  `sort_flag` varchar(3) DEFAULT NULL COMMENT '是否支持排序1是0否',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_ocf_cgform_head_id` (`cgform_head_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_cgform_head` */

DROP TABLE IF EXISTS `onl_cgform_head`;

CREATE TABLE `onl_cgform_head` (
  `id` varchar(32) NOT NULL COMMENT '主键ID',
  `table_name` varchar(50) NOT NULL COMMENT '表名',
  `table_type` int(11) NOT NULL COMMENT '表类型: 0单表、1主表、2附表',
  `table_version` int(11) DEFAULT '1' COMMENT '表版本',
  `table_txt` varchar(200) NOT NULL COMMENT '表说明',
  `is_checkbox` varchar(5) NOT NULL COMMENT '是否带checkbox',
  `is_db_synch` varchar(20) NOT NULL DEFAULT 'N' COMMENT '同步数据库状态',
  `is_page` varchar(5) NOT NULL COMMENT '是否分页',
  `is_tree` varchar(5) NOT NULL COMMENT '是否是树',
  `id_sequence` varchar(200) DEFAULT NULL COMMENT '主键生成序列',
  `id_type` varchar(100) DEFAULT NULL COMMENT '主键类型',
  `query_mode` varchar(10) DEFAULT NULL COMMENT '查询模式',
  `relation_type` int(11) DEFAULT NULL COMMENT '映射关系 0一对多  1一对一',
  `sub_table_str` varchar(1000) DEFAULT NULL COMMENT '子表',
  `tab_order_num` int(11) DEFAULT NULL COMMENT '附表排序序号',
  `tree_parent_id_field` varchar(50) DEFAULT NULL COMMENT '树形表单父id',
  `tree_id_field` varchar(50) DEFAULT NULL COMMENT '树表主键字段',
  `tree_fieldname` varchar(50) DEFAULT NULL COMMENT '树开表单列字段',
  `form_category` varchar(50) NOT NULL DEFAULT 'bdfl_ptbd' COMMENT '表单分类',
  `form_template` varchar(50) DEFAULT NULL COMMENT 'PC表单模板',
  `form_template_mobile` varchar(50) DEFAULT NULL COMMENT '表单模板样式(移动端)',
  `scroll` int(3) DEFAULT '0' COMMENT '是否有横向滚动条',
  `copy_version` int(11) DEFAULT NULL COMMENT '复制版本号',
  `copy_type` int(3) DEFAULT '0' COMMENT '复制表类型1为复制表 0为原始表',
  `physic_id` varchar(32) DEFAULT NULL COMMENT '原始表ID',
  `ext_config_json` varchar(1000) DEFAULT NULL COMMENT '扩展JSON',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `theme_template` varchar(50) DEFAULT NULL COMMENT '主题模板',
  `is_des_form` varchar(2) DEFAULT NULL COMMENT '是否用设计器表单',
  `des_form_code` varchar(50) DEFAULT NULL COMMENT '设计器表单编码',
  `low_app_id` varchar(32) DEFAULT NULL COMMENT '关联的应用ID',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_och_cgform_head_id` (`table_name`) USING BTREE,
  KEY `idx_och_table_name` (`form_template`) USING BTREE,
  KEY `idx_och_form_template_mobile` (`form_template_mobile`) USING BTREE,
  KEY `idx_och_table_version` (`table_version`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_cgform_index` */

DROP TABLE IF EXISTS `onl_cgform_index`;

CREATE TABLE `onl_cgform_index` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `cgform_head_id` varchar(32) DEFAULT NULL COMMENT '主表id',
  `index_name` varchar(100) DEFAULT NULL COMMENT '索引名称',
  `index_name_old` varchar(100) DEFAULT NULL COMMENT '原索引名称',
  `index_field` varchar(500) DEFAULT NULL COMMENT '索引栏位',
  `index_type` varchar(32) DEFAULT NULL COMMENT '索引类型',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `is_db_synch` varchar(2) DEFAULT 'N' COMMENT '是否同步数据库 N未同步 Y已同步',
  `del_flag` int(1) DEFAULT '0' COMMENT '是否删除 0未删除 1删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_oci_cgform_head_id` (`cgform_head_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_cgreport_head` */

DROP TABLE IF EXISTS `onl_cgreport_head`;

CREATE TABLE `onl_cgreport_head` (
  `id` varchar(36) NOT NULL,
  `code` varchar(100) NOT NULL COMMENT '报表编码',
  `name` varchar(100) NOT NULL COMMENT '报表名字',
  `cgr_sql` varchar(1000) NOT NULL COMMENT '报表SQL',
  `return_val_field` varchar(100) DEFAULT NULL COMMENT '返回值字段',
  `return_txt_field` varchar(100) DEFAULT NULL COMMENT '返回文本字段',
  `return_type` varchar(2) DEFAULT '1' COMMENT '返回类型，单选或多选',
  `db_source` varchar(100) DEFAULT NULL COMMENT '动态数据源',
  `content` varchar(1000) DEFAULT NULL COMMENT '描述',
  `low_app_id` varchar(32) DEFAULT NULL COMMENT '关联的应用ID',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `index_onlinereport_code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_cgreport_item` */

DROP TABLE IF EXISTS `onl_cgreport_item`;

CREATE TABLE `onl_cgreport_item` (
  `id` varchar(36) NOT NULL,
  `cgrhead_id` varchar(36) NOT NULL COMMENT '报表ID',
  `field_name` varchar(36) NOT NULL COMMENT '字段名字',
  `field_txt` varchar(300) DEFAULT NULL COMMENT '字段文本',
  `field_width` int(3) DEFAULT NULL,
  `field_type` varchar(10) DEFAULT NULL COMMENT '字段类型',
  `search_mode` varchar(10) DEFAULT NULL COMMENT '查询模式',
  `is_order` int(2) DEFAULT '0' COMMENT '是否排序  0否,1是',
  `is_search` int(2) DEFAULT '0' COMMENT '是否查询  0否,1是',
  `dict_code` varchar(500) DEFAULT NULL COMMENT '字典CODE',
  `field_href` varchar(120) DEFAULT NULL COMMENT '字段跳转URL',
  `is_show` int(2) DEFAULT '1' COMMENT '是否显示  0否,1显示',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  `replace_val` varchar(200) DEFAULT NULL COMMENT '取值表达式',
  `is_total` varchar(2) DEFAULT NULL COMMENT '是否合计 0否,1是（仅对数值有效）',
  `group_title` varchar(50) DEFAULT NULL COMMENT '分组标题',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_oci_cgrhead_id` (`cgrhead_id`) USING BTREE,
  KEY `idx_oci_is_show` (`is_show`) USING BTREE,
  KEY `idx_oci_order_num` (`order_num`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_cgreport_param` */

DROP TABLE IF EXISTS `onl_cgreport_param`;

CREATE TABLE `onl_cgreport_param` (
  `id` varchar(36) NOT NULL,
  `cgrhead_id` varchar(36) NOT NULL COMMENT '动态报表ID',
  `param_name` varchar(32) NOT NULL COMMENT '参数字段',
  `param_txt` varchar(32) DEFAULT NULL COMMENT '参数文本',
  `param_value` varchar(32) DEFAULT NULL COMMENT '参数默认值',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_ocp_cgrhead_id` (`cgrhead_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_drag_comp` */

DROP TABLE IF EXISTS `onl_drag_comp`;

CREATE TABLE `onl_drag_comp` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `parent_id` varchar(32) DEFAULT NULL,
  `comp_name` varchar(50) DEFAULT NULL COMMENT '组件名称',
  `comp_type` varchar(20) DEFAULT NULL,
  `icon` varchar(50) DEFAULT NULL COMMENT '图标',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  `type_id` int(11) DEFAULT NULL COMMENT '组件类型',
  `comp_config` longtext COMMENT '组件配置',
  `status` varchar(2) CHARACTER SET utf8 DEFAULT '0' COMMENT '状态0:无效 1:有效',
  `create_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件库';

/*Table structure for table `onl_drag_dataset_head` */

DROP TABLE IF EXISTS `onl_drag_dataset_head`;

CREATE TABLE `onl_drag_dataset_head` (
  `id` varchar(32) NOT NULL COMMENT 'id',
  `name` varchar(100) NOT NULL COMMENT '名称',
  `code` varchar(36) DEFAULT NULL COMMENT '编码',
  `parent_id` varchar(36) DEFAULT NULL COMMENT '父id',
  `db_source` varchar(100) DEFAULT NULL COMMENT '动态数据源',
  `query_sql` varchar(5000) DEFAULT '0' COMMENT '查询数据SQL',
  `content` varchar(1000) DEFAULT NULL COMMENT '描述',
  `iz_agent` varchar(10) DEFAULT '0' COMMENT 'iz_agent',
  `data_type` varchar(50) DEFAULT NULL COMMENT '数据类型',
  `api_method` varchar(10) DEFAULT NULL COMMENT 'api方法：get/post',
  `create_time` datetime DEFAULT NULL,
  `create_by` varchar(50) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `update_by` varchar(50) DEFAULT NULL,
  `low_app_id` varchar(32) DEFAULT NULL COMMENT '应用ID',
  `tenant_id` int(10) DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_drag_dataset_item` */

DROP TABLE IF EXISTS `onl_drag_dataset_item`;

CREATE TABLE `onl_drag_dataset_item` (
  `id` varchar(32) NOT NULL COMMENT 'id',
  `head_id` varchar(36) NOT NULL COMMENT '主表ID',
  `field_name` varchar(36) DEFAULT NULL COMMENT '字段名',
  `field_txt` varchar(1000) DEFAULT NULL COMMENT '字段文本',
  `field_type` varchar(10) DEFAULT NULL COMMENT '字段类型',
  `widget_type` varchar(30) DEFAULT NULL COMMENT '控件类型',
  `dict_code` varchar(500) DEFAULT NULL COMMENT '字典Code',
  `dict_table` varchar(125) DEFAULT NULL,
  `dict_text` varchar(125) DEFAULT NULL,
  `iz_show` varchar(5) DEFAULT NULL COMMENT '是否列表显示',
  `iz_search` varchar(10) DEFAULT NULL COMMENT '是否查询',
  `iz_total` varchar(5) DEFAULT NULL COMMENT '是否计算总计（仅对数值有效）',
  `search_mode` varchar(10) DEFAULT NULL COMMENT '查询模式',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_oddi_head_id` (`head_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_drag_dataset_param` */

DROP TABLE IF EXISTS `onl_drag_dataset_param`;

CREATE TABLE `onl_drag_dataset_param` (
  `id` varchar(36) NOT NULL,
  `head_id` varchar(36) NOT NULL COMMENT '动态报表ID',
  `param_name` varchar(32) NOT NULL COMMENT '参数字段',
  `param_txt` varchar(32) DEFAULT NULL COMMENT '参数文本',
  `param_value` varchar(1000) DEFAULT NULL COMMENT '参数默认值',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  `iz_search` int(11) DEFAULT NULL COMMENT '查询标识0否1是 默认0',
  `widget_type` varchar(50) DEFAULT NULL COMMENT '查询控件类型',
  `search_mode` int(11) DEFAULT NULL COMMENT '查询模式1简单2范围',
  `dict_code` varchar(255) DEFAULT NULL COMMENT '字典',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_oddp_head_id` (`head_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `onl_drag_page` */

DROP TABLE IF EXISTS `onl_drag_page`;

CREATE TABLE `onl_drag_page` (
  `id` varchar(50) NOT NULL COMMENT '主键',
  `name` varchar(100) DEFAULT NULL COMMENT '界面名称',
  `path` varchar(100) DEFAULT NULL COMMENT '访问路径',
  `background_color` varchar(10) DEFAULT NULL COMMENT '背景色',
  `background_image` varchar(255) DEFAULT NULL COMMENT '背景图',
  `design_type` int(1) DEFAULT NULL COMMENT '设计模式(1:pc,2:手机,3:平板)',
  `theme` varchar(10) DEFAULT NULL COMMENT '主题色',
  `style` varchar(20) DEFAULT NULL COMMENT '面板主题',
  `cover_url` varchar(500) DEFAULT NULL COMMENT '封面图',
  `des_json` varchar(500) DEFAULT NULL COMMENT '仪表盘主配置JSON',
  `template` longtext COMMENT '布局json',
  `protection_code` varchar(32) DEFAULT NULL COMMENT '保护码',
  `type` varchar(64) DEFAULT NULL COMMENT '所属分类',
  `iz_template` varchar(10) DEFAULT '0' COMMENT '是否模板(1:是；0不是)',
  `create_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `low_app_id` varchar(50) DEFAULT NULL COMMENT '应用ID',
  `tenant_id` int(10) DEFAULT NULL COMMENT '租户ID',
  `update_count` int(10) DEFAULT '1',
  `visits_num` int(11) DEFAULT NULL COMMENT '访问次数',
  `del_flag` int(11) DEFAULT NULL COMMENT '删除状态( 0未删除 1已删除)',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='可视化拖拽界面';

/*Table structure for table `onl_drag_page_comp` */

DROP TABLE IF EXISTS `onl_drag_page_comp`;

CREATE TABLE `onl_drag_page_comp` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `parent_id` varchar(32) DEFAULT NULL COMMENT '父组件ID',
  `page_Id` varchar(50) DEFAULT NULL COMMENT '界面ID',
  `comp_id` varchar(32) DEFAULT NULL COMMENT '组件库ID',
  `component` varchar(50) DEFAULT NULL COMMENT '组件名称',
  `config` longtext COMMENT '组件配置',
  `create_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='可视化拖拽页面组件';

/*Table structure for table `onl_drag_share` */

DROP TABLE IF EXISTS `onl_drag_share`;

CREATE TABLE `onl_drag_share` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `drag_id` varchar(32) DEFAULT NULL COMMENT '在线仪表盘设计器id',
  `preview_url` varchar(1000) DEFAULT NULL COMMENT '预览地址',
  `preview_lock` varchar(4) DEFAULT NULL COMMENT '密码锁',
  `last_update_time` datetime DEFAULT NULL COMMENT '最后更新时间',
  `term_of_validity` varchar(1) DEFAULT NULL COMMENT '有效期(0:永久有效，1:1天，7:7天)',
  `status` varchar(1) DEFAULT NULL COMMENT '是否过期(0未过期，1已过期)',
  `preview_lock_status` varchar(1) DEFAULT NULL COMMENT '是否为密码锁(0 否,1是)',
  `share_token` varchar(32) DEFAULT NULL COMMENT '分享token',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_ods_drag_id` (`drag_id`) USING BTREE COMMENT '仪表盘id唯一索引'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='仪表盘预览分享表';

/*Table structure for table `onl_drag_table_relation` */

DROP TABLE IF EXISTS `onl_drag_table_relation`;

CREATE TABLE `onl_drag_table_relation` (
  `id` varchar(50) NOT NULL COMMENT '主键',
  `aggregation_name` varchar(100) DEFAULT NULL COMMENT '聚合表名称',
  `aggregation_desc` varchar(100) DEFAULT NULL COMMENT '聚合表描述',
  `relation_forms` longtext COMMENT '关联表单',
  `filter_condition` longtext COMMENT '过滤条件',
  `header_fields` longtext COMMENT '表头字段',
  `calculate_fields` longtext COMMENT '公式字段',
  `validate_info` longtext COMMENT '校验信息',
  `del_flag` tinyint(1) DEFAULT NULL COMMENT '删除状态(0-正常,1-已删除)',
  `low_app_id` varchar(50) DEFAULT NULL COMMENT '应用ID',
  `tenant_id` int(11) DEFAULT NULL COMMENT '租户ID',
  `create_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_aggregation_name` (`aggregation_name`) USING BTREE,
  KEY `idx_del_flag` (`del_flag`) USING BTREE,
  KEY `idx_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_create_by` (`create_by`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='仪表盘聚合表';

/*Table structure for table `oss_file` */

DROP TABLE IF EXISTS `oss_file`;

CREATE TABLE `oss_file` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `file_name` varchar(255) DEFAULT NULL COMMENT '文件名称',
  `url` varchar(1000) DEFAULT NULL COMMENT '文件地址',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Oss File';

/*Table structure for table `qingjia_dan` */

DROP TABLE IF EXISTS `qingjia_dan`;

CREATE TABLE `qingjia_dan` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `name` varchar(32) DEFAULT NULL COMMENT '请假人',
  `sex` varchar(32) DEFAULT NULL COMMENT '性别',
  `age` int(11) DEFAULT NULL COMMENT '年龄',
  `descc` varchar(1000) DEFAULT NULL COMMENT '请假原因',
  `days` int(11) DEFAULT NULL COMMENT '请假天数',
  `be_date` date DEFAULT NULL COMMENT '开始时间',
  `end_date` date DEFAULT NULL COMMENT '结束时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_blob_triggers` */

DROP TABLE IF EXISTS `qrtz_blob_triggers`;

CREATE TABLE `qrtz_blob_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `BLOB_DATA` blob,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE,
  CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_calendars` */

DROP TABLE IF EXISTS `qrtz_calendars`;

CREATE TABLE `qrtz_calendars` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `CALENDAR_NAME` varchar(200) NOT NULL,
  `CALENDAR` blob NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_cron_triggers` */

DROP TABLE IF EXISTS `qrtz_cron_triggers`;

CREATE TABLE `qrtz_cron_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `CRON_EXPRESSION` varchar(200) NOT NULL,
  `TIME_ZONE_ID` varchar(80) DEFAULT NULL,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE,
  CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_fired_triggers` */

DROP TABLE IF EXISTS `qrtz_fired_triggers`;

CREATE TABLE `qrtz_fired_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `ENTRY_ID` varchar(95) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `INSTANCE_NAME` varchar(200) NOT NULL,
  `FIRED_TIME` bigint(13) NOT NULL,
  `SCHED_TIME` bigint(13) NOT NULL,
  `PRIORITY` int(11) NOT NULL,
  `STATE` varchar(16) NOT NULL,
  `JOB_NAME` varchar(200) DEFAULT NULL,
  `JOB_GROUP` varchar(200) DEFAULT NULL,
  `IS_NONCONCURRENT` varchar(1) DEFAULT NULL,
  `REQUESTS_RECOVERY` varchar(1) DEFAULT NULL,
  PRIMARY KEY (`SCHED_NAME`,`ENTRY_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_job_details` */

DROP TABLE IF EXISTS `qrtz_job_details`;

CREATE TABLE `qrtz_job_details` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `JOB_NAME` varchar(200) NOT NULL,
  `JOB_GROUP` varchar(200) NOT NULL,
  `DESCRIPTION` varchar(250) DEFAULT NULL,
  `JOB_CLASS_NAME` varchar(250) NOT NULL,
  `IS_DURABLE` varchar(1) NOT NULL,
  `IS_NONCONCURRENT` varchar(1) NOT NULL,
  `IS_UPDATE_DATA` varchar(1) NOT NULL,
  `REQUESTS_RECOVERY` varchar(1) NOT NULL,
  `JOB_DATA` blob,
  PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_locks` */

DROP TABLE IF EXISTS `qrtz_locks`;

CREATE TABLE `qrtz_locks` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `LOCK_NAME` varchar(40) NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_paused_trigger_grps` */

DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`;

CREATE TABLE `qrtz_paused_trigger_grps` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_scheduler_state` */

DROP TABLE IF EXISTS `qrtz_scheduler_state`;

CREATE TABLE `qrtz_scheduler_state` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `INSTANCE_NAME` varchar(200) NOT NULL,
  `LAST_CHECKIN_TIME` bigint(13) NOT NULL,
  `CHECKIN_INTERVAL` bigint(13) NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_simple_triggers` */

DROP TABLE IF EXISTS `qrtz_simple_triggers`;

CREATE TABLE `qrtz_simple_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `REPEAT_COUNT` bigint(7) NOT NULL,
  `REPEAT_INTERVAL` bigint(12) NOT NULL,
  `TIMES_TRIGGERED` bigint(10) NOT NULL,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE,
  CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_simprop_triggers` */

DROP TABLE IF EXISTS `qrtz_simprop_triggers`;

CREATE TABLE `qrtz_simprop_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `STR_PROP_1` varchar(512) DEFAULT NULL,
  `STR_PROP_2` varchar(512) DEFAULT NULL,
  `STR_PROP_3` varchar(512) DEFAULT NULL,
  `INT_PROP_1` int(11) DEFAULT NULL,
  `INT_PROP_2` int(11) DEFAULT NULL,
  `LONG_PROP_1` bigint(20) DEFAULT NULL,
  `LONG_PROP_2` bigint(20) DEFAULT NULL,
  `DEC_PROP_1` decimal(13,4) DEFAULT NULL,
  `DEC_PROP_2` decimal(13,4) DEFAULT NULL,
  `BOOL_PROP_1` varchar(1) DEFAULT NULL,
  `BOOL_PROP_2` varchar(1) DEFAULT NULL,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE,
  CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `qrtz_triggers` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `qrtz_triggers` */

DROP TABLE IF EXISTS `qrtz_triggers`;

CREATE TABLE `qrtz_triggers` (
  `SCHED_NAME` varchar(120) NOT NULL,
  `TRIGGER_NAME` varchar(200) NOT NULL,
  `TRIGGER_GROUP` varchar(200) NOT NULL,
  `JOB_NAME` varchar(200) NOT NULL,
  `JOB_GROUP` varchar(200) NOT NULL,
  `DESCRIPTION` varchar(250) DEFAULT NULL,
  `NEXT_FIRE_TIME` bigint(13) DEFAULT NULL,
  `PREV_FIRE_TIME` bigint(13) DEFAULT NULL,
  `PRIORITY` int(11) DEFAULT NULL,
  `TRIGGER_STATE` varchar(16) NOT NULL,
  `TRIGGER_TYPE` varchar(8) NOT NULL,
  `START_TIME` bigint(13) NOT NULL,
  `END_TIME` bigint(13) DEFAULT NULL,
  `CALENDAR_NAME` varchar(200) DEFAULT NULL,
  `MISFIRE_INSTR` smallint(2) DEFAULT NULL,
  `JOB_DATA` blob,
  PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`) USING BTREE,
  KEY `SCHED_NAME` (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`) USING BTREE,
  CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `qrtz_job_details` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `rate_domain` */

DROP TABLE IF EXISTS `rate_domain`;

CREATE TABLE `rate_domain` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `rule_id` varchar(36) DEFAULT NULL COMMENT '规则id',
  `ratedomain` varchar(32) DEFAULT NULL COMMENT '领域',
  `sondomain` varchar(256) DEFAULT NULL COMMENT '子领域',
  `remark` varchar(512) DEFAULT NULL COMMENT '备注说明',
  `valindex` int(11) DEFAULT NULL COMMENT '序号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_domaininfo` */

DROP TABLE IF EXISTS `rate_domaininfo`;

CREATE TABLE `rate_domaininfo` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` date DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` date DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `ratedomain_id` varchar(2) DEFAULT NULL COMMENT '领域编码',
  `ratedomain` varchar(32) DEFAULT NULL COMMENT '领域',
  `scoremax` double DEFAULT NULL COMMENT '评分选中项限制得分',
  `valindex` int(11) DEFAULT NULL COMMENT '序号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_domainscore` */

DROP TABLE IF EXISTS `rate_domainscore`;

CREATE TABLE `rate_domainscore` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` date DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` date DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `ratedomain_id` varchar(2) DEFAULT NULL COMMENT '领域编码',
  `rate_task_id` varchar(36) DEFAULT NULL COMMENT '任务 id',
  `ratedomain` varchar(32) DEFAULT NULL COMMENT '领域',
  `ratescore` double DEFAULT NULL COMMENT '得分',
  `ratescoreof` double DEFAULT NULL COMMENT '扣分',
  `inputscore` double DEFAULT NULL COMMENT '填报得分',
  `inputscoreof` double DEFAULT NULL COMMENT '填报扣分',
  `valindex` int(11) DEFAULT NULL COMMENT '序号',
  `limitstatus` varchar(32) DEFAULT NULL COMMENT '关键要点标志',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_file` */

DROP TABLE IF EXISTS `rate_file`;

CREATE TABLE `rate_file` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` date DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` date DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `keyitem_id` varchar(36) DEFAULT NULL COMMENT '要素id',
  `val_index` int(11) DEFAULT NULL COMMENT '序号',
  `inputuser` varchar(50) DEFAULT NULL COMMENT '填报人',
  `task_id` varchar(36) DEFAULT NULL COMMENT '任务id',
  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
  `file` blob COMMENT '附件',
  `filenamestr` varchar(128) DEFAULT NULL COMMENT '附件名',
  `filenamesufstr` varchar(64) DEFAULT NULL COMMENT '附件类型',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_keyitem` */

DROP TABLE IF EXISTS `rate_keyitem`;

CREATE TABLE `rate_keyitem` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `rate_domain_id` varchar(36) DEFAULT NULL COMMENT '领域id',
  `keyitem` varchar(256) DEFAULT NULL COMMENT '评估要素',
  `keyitem_score` double DEFAULT NULL COMMENT '分值',
  `remark` varchar(512) DEFAULT NULL COMMENT '备注说明',
  `keyindex` int(11) DEFAULT NULL COMMENT '序号',
  `filenum` varchar(32) DEFAULT NULL COMMENT '附件要求',
  `filenamestr` varchar(1024) DEFAULT NULL COMMENT '附件名',
  `filenamesufstr` varchar(1024) DEFAULT NULL COMMENT '附件类型',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_opt` */

DROP TABLE IF EXISTS `rate_opt`;

CREATE TABLE `rate_opt` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` date DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` date DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `std_id` varchar(512) DEFAULT NULL COMMENT '选项id',
  `keyitem_id` varchar(36) DEFAULT NULL COMMENT '要素id',
  `score` double DEFAULT NULL COMMENT '分值',
  `scoreof` double DEFAULT NULL COMMENT '分值扣分',
  `val_index` int(11) DEFAULT NULL COMMENT '序号',
  `inputuser` varchar(36) DEFAULT NULL COMMENT '填报人',
  `inputdept` varchar(36) DEFAULT NULL COMMENT '填报人',
  `task_id` varchar(36) DEFAULT NULL COMMENT '任务id',
  `remark` varchar(1024) DEFAULT NULL COMMENT '现状描述',
  `approvestatus` varchar(32) DEFAULT NULL COMMENT '审核状态',
  `rateremark` varchar(1024) DEFAULT NULL COMMENT '评分理由',
  `approveuser` varchar(36) DEFAULT NULL COMMENT '审核人',
  `approvetime` datetime DEFAULT NULL COMMENT '审核时间',
  `inputscore` double(10,1) DEFAULT NULL COMMENT '自评分',
  `inputscoreof` double(10,1) DEFAULT NULL COMMENT '自评扣分',
  `rateuser` varchar(36) DEFAULT NULL COMMENT '评分人',
  `ratedept` varchar(36) DEFAULT NULL COMMENT '评分部门',
  `ratetime` datetime DEFAULT NULL COMMENT '评分时间',
  `approveremark` varchar(1024) DEFAULT NULL COMMENT '审核意见',
  `approvedept` varchar(36) DEFAULT NULL COMMENT '审核部门',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_rule` */

DROP TABLE IF EXISTS `rate_rule`;

CREATE TABLE `rate_rule` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `rulenum` varchar(32) DEFAULT NULL COMMENT '规则编号',
  `rulename` varchar(128) DEFAULT NULL COMMENT '规则名称',
  `ruleobject` varchar(32) DEFAULT NULL COMMENT '适用对象',
  `ruleremark` varchar(512) DEFAULT NULL COMMENT '规则说明',
  `rate_scoretype` varchar(32) DEFAULT NULL COMMENT '计分规则',
  `score` double DEFAULT NULL COMMENT '总分',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_sco` */

DROP TABLE IF EXISTS `rate_sco`;

CREATE TABLE `rate_sco` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `std_id` varchar(512) DEFAULT NULL COMMENT '选项',
  `keyitem_id` varchar(36) DEFAULT NULL COMMENT '要素id',
  `score` double DEFAULT NULL COMMENT '分值',
  `inputuser` varchar(50) DEFAULT NULL COMMENT '评分人',
  `inputdept` varchar(36) DEFAULT NULL COMMENT '评分人部门',
  `task_id` varchar(36) DEFAULT NULL COMMENT '任务id',
  `remark` varchar(1024) DEFAULT NULL COMMENT '评分原因',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_std` */

DROP TABLE IF EXISTS `rate_std`;

CREATE TABLE `rate_std` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `stdopt` varchar(1024) DEFAULT NULL COMMENT '评分依据',
  `val_score` double DEFAULT NULL COMMENT '自评分',
  `val_scoremin` double DEFAULT NULL COMMENT '最小分值',
  `val_scoremax` double DEFAULT NULL COMMENT '最大扣分',
  `val_index` int(11) DEFAULT NULL COMMENT '序号',
  `rate_keyitem_id` varchar(36) DEFAULT NULL COMMENT '要素id',
  `stdtype` varchar(36) DEFAULT NULL COMMENT '显示类型',
  `limitstatus` varchar(36) DEFAULT NULL COMMENT '限制得分状态',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_task` */

DROP TABLE IF EXISTS `rate_task`;

CREATE TABLE `rate_task` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `task_year` varchar(4) DEFAULT NULL COMMENT '年度',
  `task_name` varchar(256) DEFAULT NULL COMMENT '评估表名称',
  `rule_id` varchar(36) DEFAULT NULL COMMENT '评估规则',
  `rate_user` varchar(36) DEFAULT NULL COMMENT '评估人',
  `rate_dept` varchar(36) DEFAULT NULL COMMENT '评估部门',
  `task_endtime` datetime DEFAULT NULL COMMENT '填报截至日期',
  `remark` varchar(1024) DEFAULT NULL COMMENT '备注说明',
  `rate_approve` varchar(36) DEFAULT NULL COMMENT '是否审批',
  `rate_taskstatus` varchar(36) DEFAULT NULL COMMENT '状态',
  `ratescore` double(10,1) DEFAULT NULL COMMENT '得分',
  `ratescoreof` double(10,1) DEFAULT NULL COMMENT '扣分',
  `inputscore` double(10,1) DEFAULT NULL COMMENT '填报得分',
  `inputscoreof` double(10,1) DEFAULT NULL COMMENT '填报扣分',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_taskdept` */

DROP TABLE IF EXISTS `rate_taskdept`;

CREATE TABLE `rate_taskdept` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `rate_task_id` varchar(36) DEFAULT NULL COMMENT '任务 id',
  `rule_id` varchar(36) DEFAULT NULL COMMENT '规则id',
  `rate_domain_id` varchar(36) DEFAULT NULL COMMENT '子领域id',
  `ratedomain` varchar(32) DEFAULT NULL COMMENT '领域',
  `sondomain` varchar(256) DEFAULT NULL COMMENT '子领域',
  `valindex` int(11) DEFAULT NULL COMMENT '序号',
  `rate_dept` varchar(36) DEFAULT NULL COMMENT '责任部门',
  `rate_user` varchar(36) DEFAULT NULL COMMENT '部门责任人',
  `option_user` varchar(36) DEFAULT NULL COMMENT '操作人',
  `option_time` datetime DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_taskdetail` */

DROP TABLE IF EXISTS `rate_taskdetail`;

CREATE TABLE `rate_taskdetail` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `task_year` varchar(4) DEFAULT NULL COMMENT '年度',
  `task_name` varchar(256) DEFAULT NULL COMMENT '评估表名称',
  `rule_id` varchar(36) DEFAULT NULL COMMENT '评估规则',
  `rate_user` varchar(36) DEFAULT NULL COMMENT '评估人',
  `rate_dept` varchar(36) DEFAULT NULL COMMENT '评估部门',
  `task_endtime` datetime DEFAULT NULL COMMENT '填报截至日期',
  `remark` varchar(1024) DEFAULT NULL COMMENT '备注说明',
  `rate_approve` varchar(36) DEFAULT NULL COMMENT '是否审批',
  `rate_taskstatus` varchar(36) DEFAULT NULL COMMENT '状态',
  `duty_user` varchar(36) DEFAULT NULL COMMENT '责任人',
  `duty_dept` varchar(36) DEFAULT NULL COMMENT '责任部门',
  `rate_task_id` varchar(36) DEFAULT NULL COMMENT '任务id',
  `approveuser` varchar(36) DEFAULT NULL COMMENT '审核人',
  `distflag` varchar(2) DEFAULT NULL COMMENT '分配方式',
  `inputscore` double DEFAULT NULL COMMENT '自评分得分',
  `inputscoreof` double DEFAULT NULL COMMENT '自评分扣分',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_taskuser` */

DROP TABLE IF EXISTS `rate_taskuser`;

CREATE TABLE `rate_taskuser` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `taskdept_id` varchar(36) DEFAULT NULL COMMENT '任务部门id',
  `rate_task_id` varchar(36) DEFAULT NULL COMMENT '任务 id',
  `rule_id` varchar(36) DEFAULT NULL COMMENT '规则id',
  `rate_domain_id` varchar(36) DEFAULT NULL COMMENT '子领域id',
  `ratedomain` varchar(32) DEFAULT NULL COMMENT '领域',
  `sondomain` varchar(256) DEFAULT NULL COMMENT '子领域',
  `keyitem` varchar(256) DEFAULT NULL COMMENT '评估要素',
  `keyitem_id` varchar(36) DEFAULT NULL COMMENT '评估要素id',
  `keyindex` int(11) DEFAULT NULL COMMENT '序号',
  `rate_dept` varchar(36) DEFAULT NULL COMMENT '填报部门',
  `rate_user` varchar(36) DEFAULT NULL COMMENT '填报人',
  `option_user` varchar(36) DEFAULT NULL COMMENT '分配人',
  `option_time` datetime DEFAULT NULL COMMENT '分配时间',
  `valindex` int(11) DEFAULT NULL COMMENT '领域序号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rate_userscore` */

DROP TABLE IF EXISTS `rate_userscore`;

CREATE TABLE `rate_userscore` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` date DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` date DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `rate_task_id` varchar(36) DEFAULT NULL COMMENT '任务 id',
  `rate_user` varchar(36) DEFAULT NULL COMMENT '填报人',
  `ratescore` double DEFAULT NULL COMMENT '得分',
  `ratescoreof` double DEFAULT NULL COMMENT '扣分',
  `inputscore` double DEFAULT NULL COMMENT '填报得分',
  `inputscoreof` double DEFAULT NULL COMMENT '填报扣分',
  `limitstatus` varchar(32) DEFAULT NULL COMMENT '关键要点标志',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `rep_demo_dxtj` */

DROP TABLE IF EXISTS `rep_demo_dxtj`;

CREATE TABLE `rep_demo_dxtj` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `name` varchar(50) DEFAULT NULL COMMENT '姓名',
  `gtime` datetime DEFAULT NULL COMMENT '雇佣日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '职务',
  `jphone` varchar(125) DEFAULT NULL COMMENT '家庭电话',
  `birth` datetime DEFAULT NULL COMMENT '出生日期',
  `hukou` varchar(32) DEFAULT NULL COMMENT '户口所在地',
  `laddress` varchar(125) DEFAULT NULL COMMENT '联系地址',
  `jperson` varchar(32) DEFAULT NULL COMMENT '紧急联系人',
  `sex` varchar(32) DEFAULT NULL COMMENT 'xingbie',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `rep_demo_employee` */

DROP TABLE IF EXISTS `rep_demo_employee`;

CREATE TABLE `rep_demo_employee` (
  `id` varchar(10) NOT NULL COMMENT '主键',
  `num` varchar(50) DEFAULT NULL COMMENT '编号',
  `name` varchar(100) DEFAULT NULL COMMENT '姓名',
  `sex` varchar(10) DEFAULT NULL COMMENT '性别',
  `birthday` datetime DEFAULT NULL COMMENT '出生日期',
  `nation` varchar(30) DEFAULT NULL COMMENT '民族',
  `political` varchar(30) DEFAULT NULL COMMENT '政治面貌',
  `native_place` varchar(30) DEFAULT NULL COMMENT '籍贯',
  `height` varchar(30) DEFAULT NULL COMMENT '身高',
  `weight` varchar(30) DEFAULT NULL COMMENT '体重',
  `health` varchar(30) DEFAULT NULL COMMENT '健康状况',
  `id_card` varchar(80) DEFAULT NULL COMMENT '身份证号',
  `education` varchar(30) DEFAULT NULL COMMENT '学历',
  `school` varchar(80) DEFAULT NULL COMMENT '毕业学校',
  `major` varchar(80) DEFAULT NULL COMMENT '专业',
  `address` varchar(100) DEFAULT NULL COMMENT '联系地址',
  `zip_code` varchar(30) DEFAULT NULL COMMENT '邮编',
  `email` varchar(30) DEFAULT NULL COMMENT 'Email',
  `phone` varchar(30) DEFAULT NULL COMMENT '手机号',
  `foreign_language` varchar(30) DEFAULT NULL COMMENT '外语语种',
  `foreign_language_level` varchar(30) DEFAULT NULL COMMENT '外语水平',
  `computer_level` varchar(30) DEFAULT NULL COMMENT '计算机水平',
  `graduation_time` datetime DEFAULT NULL COMMENT '毕业时间',
  `arrival_time` datetime DEFAULT NULL COMMENT '到职时间',
  `positional_titles` varchar(30) DEFAULT NULL COMMENT '职称',
  `education_experience` text COMMENT '教育经历',
  `work_experience` text COMMENT '工作经历',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `del_flag` tinyint(1) DEFAULT NULL COMMENT '删除标识0-正常,1-已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `rep_demo_gongsi` */

DROP TABLE IF EXISTS `rep_demo_gongsi`;

CREATE TABLE `rep_demo_gongsi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `gname` varchar(125) NOT NULL COMMENT '货品名称',
  `gdata` varchar(255) NOT NULL COMMENT '返利',
  `tdata` varchar(125) NOT NULL COMMENT '备注',
  `didian` varchar(255) NOT NULL,
  `zhaiyao` varchar(255) NOT NULL,
  `num` varchar(255) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `rep_demo_jianpiao` */

DROP TABLE IF EXISTS `rep_demo_jianpiao`;

CREATE TABLE `rep_demo_jianpiao` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bnum` varchar(125) NOT NULL,
  `ftime` varchar(125) NOT NULL,
  `sfkong` varchar(125) NOT NULL,
  `kaishi` varchar(125) NOT NULL,
  `jieshu` varchar(125) NOT NULL,
  `hezairen` varchar(125) NOT NULL,
  `jpnum` varchar(125) NOT NULL,
  `shihelv` varchar(125) NOT NULL,
  `s_id` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `rep_demo_order_main` */

DROP TABLE IF EXISTS `rep_demo_order_main`;

CREATE TABLE `rep_demo_order_main` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `order_code` varchar(32) DEFAULT NULL COMMENT '订单编码',
  `order_date` datetime DEFAULT NULL COMMENT '下单时间',
  `descc` varchar(100) DEFAULT NULL COMMENT '描述',
  `xiala` varchar(32) DEFAULT NULL COMMENT '下拉多选',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `rep_demo_order_product` */

DROP TABLE IF EXISTS `rep_demo_order_product`;

CREATE TABLE `rep_demo_order_product` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `product_name` varchar(32) DEFAULT NULL COMMENT '产品名字',
  `price` double(32,0) DEFAULT NULL COMMENT '价格',
  `num` int(11) DEFAULT NULL COMMENT '数量',
  `descc` varchar(32) DEFAULT NULL COMMENT '描述',
  `order_fk_id` varchar(32) NOT NULL COMMENT '订单外键ID',
  `pro_type` varchar(32) DEFAULT NULL COMMENT '产品类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `st_ca_main` */

DROP TABLE IF EXISTS `st_ca_main`;

CREATE TABLE `st_ca_main` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `CA_NO` varchar(9) DEFAULT NULL COMMENT '活动编号',
  `CA_NAME` varchar(100) DEFAULT NULL COMMENT '控制活动名称',
  `DOMAIN_CODE` varchar(16) DEFAULT NULL COMMENT '所属领域代码',
  `CA_DESC` text COMMENT '控制互动说明',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;4 初始状态 3 提交审核 2退回 1审核通过',
  `VAILD` varchar(1) NOT NULL DEFAULT '1' COMMENT '有效标志;1 表示有效 0删除',
  `CREATE_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `SDOMAIN_CODE` varchar(8) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `IDX_STCA_NO` (`CA_NO`)
) ENGINE=InnoDB AUTO_INCREMENT=2146779550 DEFAULT CHARSET=utf8mb4 COMMENT='控制活动表';

/*Table structure for table `st_ca_main_check` */

DROP TABLE IF EXISTS `st_ca_main_check`;

CREATE TABLE `st_ca_main_check` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `CA_NO` varchar(32) DEFAULT NULL COMMENT '活动编号',
  `CHECK_CONTENT` text COMMENT '检查内容',
  `CHECK_ASK` varchar(100) DEFAULT NULL COMMENT '询问',
  `CHECK_CROSS` varchar(100) DEFAULT NULL COMMENT '交叉/确证寻问',
  `CHECK_OBSERVE` varchar(100) DEFAULT NULL COMMENT '观察',
  `CHECK_REVIEW` varchar(100) DEFAULT NULL COMMENT '审阅',
  `CHECK_RERUN` text COMMENT '重新运行',
  `CHECK_ABILITY` text COMMENT '能力评估',
  `CHECK_SYS_VALID` varchar(100) DEFAULT NULL COMMENT '系统验证',
  `CHECK_DATA_VALID` varchar(100) DEFAULT NULL COMMENT '数据验证',
  `CHECK_TRAJECTION` text COMMENT '穿行性测试',
  `CHECK_AN_REVIEW` text COMMENT '分析性复核',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;4 初始状态 3 提交审核 2退回 1审核通过',
  `VALID` varchar(1) DEFAULT NULL COMMENT '有效标志;1 有效 0无效',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`),
  KEY `IDX_SCMCHECK_CANO` (`CA_NO`)
) ENGINE=InnoDB AUTO_INCREMENT=2108993544 DEFAULT CHARSET=utf8 COMMENT='检查方法表';

/*Table structure for table `st_ca_main_collection` */

DROP TABLE IF EXISTS `st_ca_main_collection`;

CREATE TABLE `st_ca_main_collection` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `COLLECTION_NO` varchar(9) DEFAULT NULL COMMENT '集合编号',
  `CA_NO` varchar(9) DEFAULT NULL COMMENT '控制活动编号',
  `COLLECTION_NAME` varchar(255) DEFAULT NULL COMMENT '集合名称',
  `COLLECTION_DESC` varchar(255) DEFAULT NULL COMMENT '集合说明',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;4 初始状态 3 提交审核 2退回 1审核通过',
  `VAILD` varchar(1) NOT NULL DEFAULT '1' COMMENT '有效标志;1 表示有效 0删除',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `IDX_SCMC_COLLECTIONNO` (`COLLECTION_NO`),
  KEY `IDX_SCMC_CANO` (`CA_NO`)
) ENGINE=InnoDB AUTO_INCREMENT=2071277570 DEFAULT CHARSET=utf8mb4 COMMENT='活动集合关系表';

/*Table structure for table `st_ca_main_lable` */

DROP TABLE IF EXISTS `st_ca_main_lable`;

CREATE TABLE `st_ca_main_lable` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `CA_NO` varchar(8) DEFAULT NULL COMMENT '活动编号',
  `LABLE_CODE` varchar(4) DEFAULT NULL COMMENT '标签代码',
  `VAILD` varchar(1) NOT NULL COMMENT '有效标志;1 有效 0无效',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2146713763 DEFAULT CHARSET=utf8mb4 COMMENT='控制活动标签表;';

/*Table structure for table `st_ca_main_metric` */

DROP TABLE IF EXISTS `st_ca_main_metric`;

CREATE TABLE `st_ca_main_metric` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `CA_NO` varchar(8) DEFAULT NULL COMMENT '活动编号',
  `METRIC_NO` varchar(8) DEFAULT NULL COMMENT '指标编号',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;4 初始状态 3 提交审核 2退回 1审核通过',
  `VALID` varchar(1) DEFAULT NULL COMMENT '有效标志;1 有效 0无效',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='控制活动度量关系表';

/*Table structure for table `st_ca_main_problem` */

DROP TABLE IF EXISTS `st_ca_main_problem`;

CREATE TABLE `st_ca_main_problem` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `CA_NO` varchar(8) DEFAULT NULL COMMENT '活动编号',
  `PROBLEM_NO` varchar(8) DEFAULT NULL COMMENT '问题编号',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;4 初始状态 3 提交审核 2退回 1审核通过',
  `VALID` varchar(1) DEFAULT NULL COMMENT '有效标志;1 有效 0无效',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='控制活动存在问题关系表';

/*Table structure for table `st_ca_main_rel_collection` */

DROP TABLE IF EXISTS `st_ca_main_rel_collection`;

CREATE TABLE `st_ca_main_rel_collection` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `COLLECTION_NO` varchar(9) DEFAULT NULL COMMENT '集合编号',
  `CA_NO` varchar(9) DEFAULT NULL COMMENT '控制活动编号',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;4 初始状态 3 提交审核 2退回 1审核通过',
  `VAILD` varchar(1) NOT NULL DEFAULT '1' COMMENT '有效标志;1 表示有效 0删除',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2146799618 DEFAULT CHARSET=utf8mb4 COMMENT='活动集合关系表';

/*Table structure for table `st_classify` */

DROP TABLE IF EXISTS `st_classify`;

CREATE TABLE `st_classify` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `CLASSIFY_CODE` varchar(4) DEFAULT NULL COMMENT '分类代码',
  `CLASSIFY_NAME` varchar(255) DEFAULT NULL COMMENT '分类名称',
  `LEVEL` int(11) DEFAULT NULL COMMENT '等级',
  `SORT_NO` int(11) DEFAULT NULL COMMENT '排序',
  `CLASSIFY_DESC` varchar(100) DEFAULT NULL COMMENT '领域说明',
  `UPPER_CLASSIFY_CODE` varchar(4) DEFAULT NULL COMMENT '上级分类代码',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;4 初始状态 3 提交审核 2退回 1审核通过',
  `VALID` varchar(1) DEFAULT NULL COMMENT '有效标志;1 有效 0无效',
  `HAS_CHILD` varchar(3) DEFAULT NULL COMMENT '是否有子节点',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2029346819 DEFAULT CHARSET=utf8mb4 COMMENT='分类管理';

/*Table structure for table `st_domain` */

DROP TABLE IF EXISTS `st_domain`;

CREATE TABLE `st_domain` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `DOMAIN_CODE` varchar(32) DEFAULT NULL COMMENT '领域代码',
  `DOMAIN_NAME` varchar(255) DEFAULT NULL COMMENT '领域名称',
  `LEVEL` int(11) DEFAULT NULL COMMENT '等级',
  `DOMAIN_DESC` varchar(5120) DEFAULT NULL COMMENT '领域说明',
  `UPPER_DOMAIN_CODE` varchar(32) DEFAULT NULL COMMENT '上级领域代码',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;4 初始状态 3 提交审核 2退回 1审核通过',
  `VALID` varchar(1) DEFAULT NULL COMMENT '有效标志;1 有效 0无效',
  `HAS_CHILD` varchar(3) DEFAULT NULL COMMENT '是否有子节点',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `IDX_DOMAIN_CODE` (`DOMAIN_CODE`),
  KEY `IDX_DOMAIN_UPPERCODE` (`UPPER_DOMAIN_CODE`)
) ENGINE=InnoDB AUTO_INCREMENT=2129924200 DEFAULT CHARSET=utf8mb4 COMMENT='领域管理表';

/*Table structure for table `st_lable` */

DROP TABLE IF EXISTS `st_lable`;

CREATE TABLE `st_lable` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `LABLE_CODE` varchar(4) DEFAULT NULL COMMENT '标签代码',
  `LABLE_NAME` varchar(32) DEFAULT NULL COMMENT '标签名称',
  `PCLASSIFY_CODE` varchar(16) DEFAULT NULL COMMENT '一级分类代码',
  `SCLASSIFY_CODE` varchar(16) DEFAULT NULL COMMENT '二级分类代码',
  `LABLE_DESC` text COMMENT '标签说明',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;4 初始状态 3 提交审核 2退回 1审核通过',
  `VALID` varchar(1) DEFAULT NULL COMMENT '有效标志;1 有效 0无效',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2108968962 DEFAULT CHARSET=utf8mb4 COMMENT='标签表';

/*Table structure for table `st_plan_approve` */

DROP TABLE IF EXISTS `st_plan_approve`;

CREATE TABLE `st_plan_approve` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `PLAN_CODE` varchar(8) DEFAULT NULL COMMENT '计划编码',
  `APPROVE_TYPE` varchar(255) DEFAULT NULL COMMENT '审核类型',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核结果;0 驳回 1 通过',
  `APPROVE_TIME` datetime DEFAULT NULL COMMENT '审核时间',
  `OPT_DES` varchar(255) DEFAULT NULL COMMENT '操作信息',
  `APPROVE_DES` varchar(255) DEFAULT NULL COMMENT '审核信息',
  `APPROVE_USER` varchar(32) DEFAULT NULL COMMENT '审核人',
  `CREATED_USER` varchar(32) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(32) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2079657987 DEFAULT CHARSET=utf8mb4 COMMENT='计划审核表';

/*Table structure for table `st_plan_man` */

DROP TABLE IF EXISTS `st_plan_man`;

CREATE TABLE `st_plan_man` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `PLAN_CODE` varchar(8) DEFAULT NULL COMMENT '计划编码',
  `PROJECT_NAME` varchar(255) DEFAULT NULL COMMENT '项目名称',
  `PROJECT_TYPE` varchar(36) DEFAULT NULL COMMENT '项目类型',
  `EXEC_DEP_CODE` varchar(32) DEFAULT NULL COMMENT '执行部门',
  `HEAD_CODE` varchar(32) DEFAULT NULL COMMENT '负责人',
  `PLAN_START_DATE` datetime DEFAULT NULL COMMENT '计划开始日期',
  `PLAN_END_DATE` datetime DEFAULT NULL COMMENT '计划结束日期',
  `APPROVE_DEP_CODE` varchar(32) DEFAULT NULL COMMENT '审核部门',
  `APPROVE_USER` varchar(32) DEFAULT NULL COMMENT '审核人',
  `PROJECT_DESC` text COMMENT '项目描述',
  `FILE_UPLOAD_PATH` varchar(255) DEFAULT NULL COMMENT '相关附件',
  `PLAN_FLAG` varchar(2) DEFAULT NULL COMMENT '审核标志;0 编制中、1 待审核、2 已驳回、3 已生效、4 已作废',
  `APPROVE_TIME` datetime DEFAULT NULL COMMENT '审核时间',
  `OPT_DES` varchar(255) DEFAULT NULL COMMENT '操作信息;用来存放废止等描述信息',
  `APPROVE_DES` varchar(255) DEFAULT NULL COMMENT '审核信息',
  `VALID` varchar(1) DEFAULT NULL COMMENT '有效标志;1 有效 0无效',
  `CREATED_USER` varchar(32) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(32) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `PLAN_BASIS` varchar(1024) DEFAULT NULL COMMENT '计划依据',
  `PLAN_REQUEST` varchar(512) DEFAULT NULL COMMENT '要求',
  `PLAN_DELIVERABLE` varchar(512) DEFAULT NULL COMMENT '交付物',
  `EXE_RULE` smallint(2) DEFAULT NULL COMMENT '执行规则',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=1995706370 DEFAULT CHARSET=utf8mb4 COMMENT='计划编制';

/*Table structure for table `st_plan_trance` */

DROP TABLE IF EXISTS `st_plan_trance`;

CREATE TABLE `st_plan_trance` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `PLAN_CODE` varchar(8) DEFAULT NULL COMMENT '计划编码',
  `PROJECT_NAME` varchar(255) DEFAULT NULL COMMENT '项目名称',
  `PROJECT_TYPE` varchar(6) DEFAULT NULL COMMENT '项目类型',
  `PLAN_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;0 编制中、1 待审核、2 已驳回、3 已生效、4 已作废',
  `EXEC_DEP_CODE` varchar(32) DEFAULT NULL COMMENT '执行部门',
  `HEAD_CODE` varchar(32) DEFAULT NULL COMMENT '负责人',
  `PLAN_START_DATE` datetime DEFAULT NULL COMMENT '计划开始日期',
  `PLAN_END_DATE` datetime DEFAULT NULL COMMENT '计划结束日期',
  `APPROVE_DEP_CODE` varchar(32) DEFAULT NULL COMMENT '审核部门',
  `APPROVE_USER` varchar(32) DEFAULT NULL COMMENT '审核人',
  `PROJECT_DESC` varchar(255) DEFAULT NULL COMMENT '项目描述',
  `FILE_UPLOAD_PATH` varchar(255) DEFAULT NULL COMMENT '相关附件',
  `OPT_DES` varchar(255) DEFAULT NULL COMMENT '操作信息',
  `APPROVE_DES` varchar(255) DEFAULT NULL COMMENT '审核信息',
  `APPROVE_TIME` datetime DEFAULT NULL COMMENT '审核时间',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2130714627 DEFAULT CHARSET=utf8mb4 COMMENT='计划轨迹';

/*Table structure for table `st_problem` */

DROP TABLE IF EXISTS `st_problem`;

CREATE TABLE `st_problem` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `CA_NO` varchar(8) DEFAULT NULL COMMENT '控制活动编号',
  `COMPLIANE_NO` varchar(32) DEFAULT NULL COMMENT '合规文件编号',
  `PROBLEM_ITEM` varchar(255) DEFAULT NULL COMMENT '问题项',
  `PROBLEM_EXAMPLE` text COMMENT '问题示例',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;4 初始状态 3 提交审核 2退回 1审核通过',
  `VALID` varchar(1) DEFAULT NULL COMMENT '有效标志;1 有效 0无效',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `PROBLEM_LEVEL` varchar(2) DEFAULT NULL COMMENT '问题等级',
  `PROBLEM_ADVISE` varchar(512) DEFAULT NULL COMMENT '改进建议',
  `PROBLEM_ANALYSIS` varchar(512) DEFAULT NULL COMMENT '影响分析',
  `domain` varchar(32) DEFAULT NULL,
  `PROBLEM_NATURE` varchar(32) DEFAULT NULL,
  `risk_event_tp` int(11) DEFAULT NULL COMMENT '风险事件分类',
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2138390530 DEFAULT CHARSET=utf8mb4 COMMENT='存在问题表';

/*Table structure for table `st_problem_ca` */

DROP TABLE IF EXISTS `st_problem_ca`;

CREATE TABLE `st_problem_ca` (
  `ca_no` varchar(32) NOT NULL,
  `problemid` int(11) NOT NULL,
  PRIMARY KEY (`ca_no`,`problemid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `st_problem_task_assin` */

DROP TABLE IF EXISTS `st_problem_task_assin`;

CREATE TABLE `st_problem_task_assin` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `ACT_NO` varchar(11) DEFAULT NULL COMMENT '控制活动',
  `PROBLEM_ITEM` varchar(255) DEFAULT NULL COMMENT '问题项',
  `PROBLEM_DES` varchar(5096) DEFAULT NULL COMMENT '问题描述',
  `PROBLEM_SOURCE_FLAG` varchar(1) DEFAULT NULL COMMENT '问题来源标志;0 项目 1 问题库 2 专项检查',
  `PROBLEM_SOURCE` varchar(32) DEFAULT NULL COMMENT '问题来源;存放项目名称 或者具体库名等',
  `PROJECT_NO` varchar(11) DEFAULT NULL COMMENT '项目编码',
  `SEVERITY` varchar(4) DEFAULT NULL COMMENT '严重程度;0001 不严重 0002 一般 0003 严重 004 非常严重',
  `PRIORITY_FLAG` varchar(4) DEFAULT NULL COMMENT '优先级;0001 低 0002 中 0003 高',
  `LATE_FINISH_TIME` datetime DEFAULT NULL COMMENT '最晚完成时间',
  `ASSIN_STATUS` varchar(1) DEFAULT NULL COMMENT '分配状态;0 未分配 1 已分配',
  `RECEIVE_STATUS` varchar(1) DEFAULT NULL COMMENT '接收状态;0 未接收 1 已接受 2已拒绝',
  `HAS_CHILD` varchar(1) DEFAULT NULL COMMENT '是否子节点;0 没有 1 有子节点',
  `PID` int(11) DEFAULT NULL COMMENT '父级id',
  `HEAD_DEP_CODE` varchar(32) DEFAULT NULL COMMENT '负责部门',
  `HEAD_CODE` varchar(32) DEFAULT NULL COMMENT '负责人',
  `IS_RECEIVE` varchar(1) DEFAULT NULL COMMENT '是否接收;0 否 1 是',
  `STRATEGY` varchar(4) DEFAULT NULL COMMENT '整改策略',
  `PROGRAMME` varchar(255) DEFAULT NULL COMMENT '整改方案',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`),
  KEY `IDX_PROBLEMTASKASSIN_ACTNO` (`ACT_NO`),
  KEY `IDX_PROBLEMTASKASSIN_PID` (`PID`)
) ENGINE=InnoDB AUTO_INCREMENT=2134175747 DEFAULT CHARSET=utf8mb4 COMMENT='问题任务分配';

/*Table structure for table `st_rectify_approve` */

DROP TABLE IF EXISTS `st_rectify_approve`;

CREATE TABLE `st_rectify_approve` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `PROBLEM_TASK_ID` int(11) DEFAULT NULL COMMENT '问题任务ID',
  `RECTIFY_PLAN_ID` int(11) DEFAULT NULL COMMENT '整改计划ID',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核结果;0 驳回 1 通过',
  `APPROVE_TIME` datetime DEFAULT NULL COMMENT '审核时间',
  `APPROVE_DES` varchar(255) DEFAULT NULL COMMENT '审核信息',
  `APPROVE_USER` varchar(255) DEFAULT NULL COMMENT '审核人',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`),
  KEY `IDX_RECTIFYAPPROVE_PTID` (`PROBLEM_TASK_ID`),
  KEY `IDX_RECTIFYAPPROVE_RPID` (`RECTIFY_PLAN_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=1320472579 DEFAULT CHARSET=utf8mb4 COMMENT='整改审核';

/*Table structure for table `st_rectify_exec` */

DROP TABLE IF EXISTS `st_rectify_exec`;

CREATE TABLE `st_rectify_exec` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `PROBLEM_TASK_ID` int(11) DEFAULT NULL COMMENT '问题任务ID',
  `RECTIFY_PLAN_ID` int(11) DEFAULT NULL COMMENT '整改计划ID',
  `EXEC_TIME` datetime DEFAULT NULL COMMENT '执行时间',
  `RECTIFY_DES` varchar(255) DEFAULT NULL COMMENT '整改情况描述',
  `EXEC_USER` varchar(255) DEFAULT NULL COMMENT '执行人',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`ID`),
  KEY `IDX_RECTIFYEXEC_PTID` (`PROBLEM_TASK_ID`),
  KEY `IDX_RECTIFYEXEC_RPID` (`RECTIFY_PLAN_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=1911898115 DEFAULT CHARSET=utf8 COMMENT='计划执行';

/*Table structure for table `st_rectify_plan` */

DROP TABLE IF EXISTS `st_rectify_plan`;

CREATE TABLE `st_rectify_plan` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `PROBLEM_TASK_ID` int(11) DEFAULT NULL COMMENT '问题任务ID',
  `HEAD_DEP_CODE` varchar(32) DEFAULT NULL COMMENT '负责部门;来源问题任务分配',
  `HEAD_CODE` varchar(32) DEFAULT NULL COMMENT '负责人;来源问题任务分配',
  `EXEC_DEP_CODE` varchar(32) DEFAULT NULL COMMENT '执行部门',
  `EXEC_USER` varchar(32) DEFAULT NULL COMMENT '执行人',
  `APPROVE_DEP_CODE` varchar(32) DEFAULT NULL COMMENT '审核部门',
  `APPROVE_USER` varchar(32) DEFAULT NULL COMMENT '审核人',
  `PLAN_START_DATE` datetime DEFAULT NULL COMMENT '计划开始日期',
  `PLAN_END_DATE` datetime DEFAULT NULL COMMENT '计划结束日期',
  `EDIT_FLAG` varchar(1) DEFAULT '0' COMMENT '编制状态;0 未编制  1 已编制',
  `APPROVE_FLAG` varchar(1) DEFAULT NULL COMMENT '审核标志;0 未开始 1 待审核、2 已审核、3 已驳回',
  `APPROVE_DES` varchar(255) DEFAULT NULL COMMENT '审核意见',
  `APPROVE_TIME` datetime DEFAULT NULL COMMENT '审核时间',
  `START_DATE` datetime DEFAULT NULL COMMENT '实际开始日期',
  `END_DATE` datetime DEFAULT NULL COMMENT '实际结束日期',
  `RECTIFY_DES` varchar(255) DEFAULT NULL COMMENT '整改情况',
  `FILE_UPLOAD_PATH` varchar(255) DEFAULT NULL COMMENT '相关附件',
  `CREATED_USER` varchar(8) DEFAULT NULL COMMENT '创建人',
  `CREATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `UPDATED_USER` varchar(8) DEFAULT NULL COMMENT '更新人',
  `UPDATED_TIME` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `edit_date` datetime DEFAULT NULL,
  `exec_date` datetime DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `IDX_RECTIFYPLAN_PTID` (`PROBLEM_TASK_ID`),
  KEY `IDX_RECTIFYPLAN_APUSER` (`APPROVE_USER`)
) ENGINE=InnoDB AUTO_INCREMENT=1022676994 DEFAULT CHARSET=utf8mb4 COMMENT='整改计划编制';

/*Table structure for table `sys_announcement` */

DROP TABLE IF EXISTS `sys_announcement`;

CREATE TABLE `sys_announcement` (
  `id` varchar(32) NOT NULL,
  `titile` varchar(100) DEFAULT NULL COMMENT '标题',
  `msg_content` text COMMENT '内容',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `sender` varchar(100) DEFAULT NULL COMMENT '发布人',
  `priority` varchar(255) DEFAULT NULL COMMENT '优先级（L低，M中，H高）',
  `msg_category` varchar(10) NOT NULL DEFAULT '2' COMMENT '消息类型1:通知公告2:系统消息',
  `msg_type` varchar(10) DEFAULT NULL COMMENT '通告对象类型（USER:指定用户，ALL:全体用户）',
  `send_status` varchar(10) DEFAULT NULL COMMENT '发布状态（0未发布，1已发布，2已撤销）',
  `send_time` datetime DEFAULT NULL COMMENT '发布时间',
  `cancel_time` datetime DEFAULT NULL COMMENT '撤销时间',
  `del_flag` varchar(1) DEFAULT NULL COMMENT '删除状态（0，正常，1已删除）',
  `bus_type` varchar(20) DEFAULT NULL COMMENT '业务类型(email:邮件 bpm:流程 tenant_invite:租户邀请)',
  `bus_id` varchar(50) DEFAULT NULL COMMENT '业务id',
  `open_type` varchar(20) DEFAULT NULL COMMENT '打开方式(组件：component 路由：url)',
  `open_page` varchar(255) DEFAULT NULL COMMENT '组件/路由 地址',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `user_ids` text COMMENT '指定用户',
  `msg_abstract` text COMMENT '摘要/扩展业务参数',
  `dt_task_id` varchar(100) DEFAULT NULL COMMENT '钉钉task_id，用于撤回消息',
  `tenant_id` int(10) DEFAULT '0' COMMENT '租户ID',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sanno_endtime` (`end_time`) USING BTREE,
  KEY `idx_sanno_start_time` (`start_time`) USING BTREE,
  KEY `idx_sanno_msg_type` (`msg_type`) USING BTREE,
  KEY `idx_sanno_send_status` (`send_status`) USING BTREE,
  KEY `idx_sanno_del_flag` (`del_flag`) USING BTREE,
  KEY `idx_sanno_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_sanno_sender` (`sender`) USING BTREE,
  KEY `idx_sanno_create_time` (`create_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='系统通告表';

/*Table structure for table `sys_announcement_send` */

DROP TABLE IF EXISTS `sys_announcement_send`;

CREATE TABLE `sys_announcement_send` (
  `id` varchar(32) NOT NULL,
  `annt_id` varchar(32) DEFAULT NULL COMMENT '通告ID',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `read_flag` int(10) DEFAULT NULL COMMENT '阅读状态（0未读，1已读）',
  `read_time` datetime DEFAULT NULL COMMENT '阅读时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `star_flag` varchar(10) DEFAULT NULL COMMENT '标星状态( 1为标星 空/0没有标星)',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sacm_annt_id` (`annt_id`) USING BTREE,
  KEY `idx_sacm_user_id` (`user_id`) USING BTREE,
  KEY `idx_sacm_read_flag` (`read_flag`) USING BTREE,
  KEY `idx_sacm_star_flag` (`star_flag`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户通告阅读标记表';

/*Table structure for table `sys_category` */

DROP TABLE IF EXISTS `sys_category`;

CREATE TABLE `sys_category` (
  `id` varchar(36) NOT NULL,
  `pid` varchar(36) DEFAULT NULL COMMENT '父级节点',
  `name` varchar(100) DEFAULT NULL COMMENT '类型名称',
  `code` varchar(100) DEFAULT NULL COMMENT '类型编码',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `has_child` varchar(3) DEFAULT NULL COMMENT '是否有子节点',
  `tenant_id` int(11) DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `index_code` (`code`) USING BTREE,
  KEY `idx_sc_code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_check_rule` */

DROP TABLE IF EXISTS `sys_check_rule`;

CREATE TABLE `sys_check_rule` (
  `id` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '主键id',
  `rule_name` varchar(100) DEFAULT NULL COMMENT '规则名称',
  `rule_code` varchar(100) DEFAULT NULL COMMENT '规则Code',
  `rule_json` varchar(1024) DEFAULT NULL COMMENT '规则JSON',
  `rule_description` varchar(200) DEFAULT NULL COMMENT '规则描述',
  `update_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_scr_rule_code` (`rule_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_comment` */

DROP TABLE IF EXISTS `sys_comment`;

CREATE TABLE `sys_comment` (
  `id` varchar(32) NOT NULL,
  `table_name` varchar(50) NOT NULL COMMENT '表名',
  `table_data_id` varchar(32) NOT NULL COMMENT '数据id',
  `from_user_id` varchar(32) NOT NULL COMMENT '来源用户id',
  `to_user_id` varchar(32) DEFAULT NULL COMMENT '发送给用户id(允许为空)',
  `comment_id` varchar(32) DEFAULT NULL COMMENT '评论id(允许为空，不为空时，则为回复)',
  `comment_content` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '回复内容',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_table_data_id` (`table_name`,`table_data_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='系统评论回复表';

/*Table structure for table `sys_data_log` */

DROP TABLE IF EXISTS `sys_data_log`;

CREATE TABLE `sys_data_log` (
  `id` varchar(32) NOT NULL COMMENT 'id',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人登录名称',
  `create_name` varchar(100) DEFAULT NULL COMMENT '创建人真实名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `data_table` varchar(200) DEFAULT NULL COMMENT '表名',
  `data_id` varchar(32) DEFAULT NULL COMMENT '数据ID',
  `data_content` text COMMENT '数据内容',
  `data_version` int(11) DEFAULT NULL COMMENT '版本号',
  `type` varchar(20) DEFAULT 'json' COMMENT '类型',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sdl_data_table_id` (`data_table`,`data_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_data_source` */

DROP TABLE IF EXISTS `sys_data_source`;

CREATE TABLE `sys_data_source` (
  `id` varchar(36) NOT NULL,
  `code` varchar(100) DEFAULT NULL COMMENT '数据源编码',
  `name` varchar(100) DEFAULT NULL COMMENT '数据源名称',
  `remark` varchar(200) DEFAULT NULL COMMENT '备注',
  `db_type` varchar(10) DEFAULT NULL COMMENT '数据库类型',
  `db_driver` varchar(100) DEFAULT NULL COMMENT '驱动类',
  `db_url` varchar(500) DEFAULT NULL COMMENT '数据源地址',
  `db_name` varchar(100) DEFAULT NULL COMMENT '数据库名称',
  `db_username` varchar(100) DEFAULT NULL COMMENT '用户名',
  `db_password` varchar(100) DEFAULT NULL COMMENT '密码',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `tenant_id` int(10) DEFAULT '0' COMMENT '租户ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_sdc_rule_code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_depart` */

DROP TABLE IF EXISTS `sys_depart`;

CREATE TABLE `sys_depart` (
  `id` varchar(32) NOT NULL COMMENT 'ID',
  `parent_id` varchar(32) DEFAULT NULL COMMENT '父机构ID',
  `depart_name` varchar(100) NOT NULL COMMENT '机构/部门名称',
  `depart_name_en` varchar(500) DEFAULT NULL COMMENT '英文名',
  `depart_name_abbr` varchar(500) DEFAULT NULL COMMENT '缩写',
  `depart_order` int(11) DEFAULT '0' COMMENT '排序',
  `description` varchar(500) DEFAULT NULL COMMENT '描述',
  `org_category` varchar(10) NOT NULL DEFAULT '1' COMMENT '机构类别 1公司，2组织机构，3岗位',
  `org_type` varchar(10) DEFAULT NULL COMMENT '机构类型 1一级部门 2子部门',
  `org_code` varchar(64) NOT NULL COMMENT '机构编码',
  `mobile` varchar(32) DEFAULT NULL COMMENT '手机号',
  `fax` varchar(32) DEFAULT NULL COMMENT '传真',
  `address` varchar(100) DEFAULT NULL COMMENT '地址',
  `memo` varchar(500) DEFAULT NULL COMMENT '备注',
  `status` varchar(1) DEFAULT NULL COMMENT '状态（1启用，0不启用）',
  `del_flag` varchar(1) DEFAULT NULL COMMENT '删除状态（0，正常，1已删除）',
  `qywx_identifier` varchar(100) DEFAULT NULL COMMENT '对接企业微信的ID',
  `ding_identifier` varchar(100) DEFAULT NULL COMMENT '对接钉钉部门的ID',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `tenant_id` int(10) DEFAULT '0' COMMENT '租户ID',
  `iz_leaf` tinyint(1) DEFAULT '0' COMMENT '是否有叶子节点: 1是0否',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_depart_org_code` (`org_code`) USING BTREE,
  KEY `idx_sd_parent_id` (`parent_id`) USING BTREE,
  KEY `idx_sd_depart_order` (`depart_order`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='组织机构表';

/*Table structure for table `sys_depart_permission` */

DROP TABLE IF EXISTS `sys_depart_permission`;

CREATE TABLE `sys_depart_permission` (
  `id` varchar(32) NOT NULL,
  `depart_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  `permission_id` varchar(32) DEFAULT NULL COMMENT '权限id',
  `data_rule_ids` varchar(1000) DEFAULT NULL COMMENT '数据规则id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='部门权限表';

/*Table structure for table `sys_depart_role` */

DROP TABLE IF EXISTS `sys_depart_role`;

CREATE TABLE `sys_depart_role` (
  `id` varchar(32) NOT NULL,
  `depart_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  `role_name` varchar(200) DEFAULT NULL COMMENT '部门角色名称',
  `role_code` varchar(100) DEFAULT NULL COMMENT '部门角色编码',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='部门角色表';

/*Table structure for table `sys_depart_role_permission` */

DROP TABLE IF EXISTS `sys_depart_role_permission`;

CREATE TABLE `sys_depart_role_permission` (
  `id` varchar(32) NOT NULL,
  `depart_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  `role_id` varchar(32) DEFAULT NULL COMMENT '角色id',
  `permission_id` varchar(32) DEFAULT NULL COMMENT '权限id',
  `data_rule_ids` varchar(1000) DEFAULT NULL COMMENT '数据权限ids',
  `operate_date` datetime DEFAULT NULL COMMENT '操作时间',
  `operate_ip` varchar(20) DEFAULT NULL COMMENT '操作ip',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sdrp_role_per_id` (`role_id`,`permission_id`) USING BTREE,
  KEY `idx_sdrp_role_id` (`role_id`) USING BTREE,
  KEY `idx_sdrp_per_id` (`permission_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='部门角色权限表';

/*Table structure for table `sys_depart_role_user` */

DROP TABLE IF EXISTS `sys_depart_role_user`;

CREATE TABLE `sys_depart_role_user` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `drole_id` varchar(32) DEFAULT NULL COMMENT '角色id',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sdr_user_id` (`user_id`) USING BTREE,
  KEY `idx_sdr_role_id` (`drole_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='部门角色用户表';

/*Table structure for table `sys_dict` */

DROP TABLE IF EXISTS `sys_dict`;

CREATE TABLE `sys_dict` (
  `id` varchar(32) NOT NULL,
  `dict_name` varchar(100) NOT NULL COMMENT '字典名称',
  `dict_code` varchar(100) NOT NULL COMMENT '字典编码',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `del_flag` int(1) DEFAULT NULL COMMENT '删除状态',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `type` int(1) unsigned zerofill DEFAULT '0' COMMENT '字典类型0为string,1为number',
  `tenant_id` int(10) DEFAULT NULL,
  `low_app_id` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_sd_dict_code` (`dict_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_dict_item` */

DROP TABLE IF EXISTS `sys_dict_item`;

CREATE TABLE `sys_dict_item` (
  `id` varchar(32) NOT NULL,
  `dict_id` varchar(32) DEFAULT NULL COMMENT '字典id',
  `item_text` varchar(100) NOT NULL COMMENT '字典项文本',
  `item_value` varchar(100) NOT NULL COMMENT '字典项值',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `sort_order` int(10) DEFAULT NULL COMMENT '排序',
  `status` int(11) DEFAULT NULL COMMENT '状态（1启用 0不启用）',
  `create_by` varchar(32) DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `update_by` varchar(32) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `item_color` varchar(10) DEFAULT NULL COMMENT '字典项颜色',
  `tenant_id` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sdi_role_dict_id` (`dict_id`) USING BTREE,
  KEY `idx_sdi_role_sort_order` (`sort_order`) USING BTREE,
  KEY `idx_sdi_status` (`status`) USING BTREE,
  KEY `idx_sdi_dict_val` (`dict_id`,`item_value`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_expression` */

DROP TABLE IF EXISTS `sys_expression`;

CREATE TABLE `sys_expression` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '表单主键',
  `name` varchar(50) DEFAULT NULL COMMENT '表达式名称',
  `expression` varchar(255) DEFAULT NULL COMMENT '表达式内容',
  `data_type` varchar(255) DEFAULT NULL COMMENT '表达式类型',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` bigint(20) DEFAULT NULL COMMENT '创建人员',
  `update_by` bigint(20) DEFAULT NULL COMMENT '更新人员',
  `status` tinyint(2) DEFAULT '0' COMMENT '状态',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='流程表达式';

/*Table structure for table `sys_files` */

DROP TABLE IF EXISTS `sys_files`;

CREATE TABLE `sys_files` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `file_name` varchar(255) DEFAULT NULL COMMENT '文件名称',
  `url` varchar(1000) DEFAULT NULL COMMENT '文件地址',
  `file_type` varchar(20) DEFAULT NULL COMMENT '文档类型（folder:文件夹 excel:excel doc:word ppt:ppt image:图片  archive:其他文档 video:视频 pdf:pdf）',
  `store_type` varchar(20) DEFAULT NULL COMMENT '文件上传类型(temp/本地上传(临时文件) manage/知识库)',
  `parent_id` varchar(32) DEFAULT NULL COMMENT '父级id',
  `tenant_id` varchar(100) DEFAULT NULL COMMENT '租户id',
  `file_size` double(13,2) DEFAULT NULL COMMENT '文件大小（kb）',
  `iz_folder` varchar(2) DEFAULT NULL COMMENT '是否文件夹(1：是  0：否)',
  `iz_root_folder` varchar(2) DEFAULT NULL COMMENT '是否为1级文件夹，允许为空 (1：是 )',
  `iz_star` varchar(2) DEFAULT NULL COMMENT '是否标星(1：是  0：否)',
  `down_count` int(11) DEFAULT NULL COMMENT '下载次数',
  `read_count` int(11) DEFAULT NULL COMMENT '阅读次数',
  `share_url` varchar(255) DEFAULT NULL COMMENT '分享链接',
  `share_perms` varchar(2) DEFAULT NULL COMMENT '分享权限(1.关闭分享 2.允许所有联系人查看 3.允许任何人查看)',
  `enable_down` varchar(2) DEFAULT NULL COMMENT '是否允许下载(1：是  0：否)',
  `enable_updat` varchar(2) DEFAULT NULL COMMENT '是否允许修改(1：是  0：否)',
  `del_flag` varchar(2) DEFAULT NULL COMMENT '删除状态(0-正常,1-删除至回收站)',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_tenant_id` (`tenant_id`) USING BTREE,
  KEY `index_del_flag` (`del_flag`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='知识库-文档管理';

/*Table structure for table `sys_fill_rule` */

DROP TABLE IF EXISTS `sys_fill_rule`;

CREATE TABLE `sys_fill_rule` (
  `id` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '主键ID',
  `rule_name` varchar(100) DEFAULT NULL COMMENT '规则名称',
  `rule_code` varchar(100) DEFAULT NULL COMMENT '规则Code',
  `rule_class` varchar(100) DEFAULT NULL COMMENT '规则实现类',
  `rule_params` varchar(200) DEFAULT NULL COMMENT '规则参数',
  `update_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `create_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_sfr_rule_code` (`rule_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_form` */

DROP TABLE IF EXISTS `sys_form`;

CREATE TABLE `sys_form` (
  `form_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '表单主键',
  `form_name` varchar(50) DEFAULT NULL COMMENT '表单名称',
  `form_content` longtext COMMENT '表单内容',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` bigint(20) DEFAULT NULL COMMENT '创建人员',
  `update_by` bigint(20) DEFAULT NULL COMMENT '更新人员',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`form_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='流程表单';

/*Table structure for table `sys_form_file` */

DROP TABLE IF EXISTS `sys_form_file`;

CREATE TABLE `sys_form_file` (
  `id` varchar(32) NOT NULL,
  `table_name` varchar(50) NOT NULL COMMENT '表名',
  `table_data_id` varchar(32) NOT NULL COMMENT '数据id',
  `file_id` varchar(32) DEFAULT NULL COMMENT '关联文件id',
  `file_type` varchar(20) DEFAULT NULL COMMENT '文件类型(text:文本, excel:excel doc:word ppt:ppt image:图片  archive:其他文档 video:视频 pdf:pdf）)',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_table_form` (`table_name`,`table_data_id`) USING BTREE,
  KEY `index_file_id` (`file_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_gateway_route` */

DROP TABLE IF EXISTS `sys_gateway_route`;

CREATE TABLE `sys_gateway_route` (
  `id` varchar(36) NOT NULL,
  `router_id` varchar(50) DEFAULT NULL COMMENT '路由ID',
  `name` varchar(64) DEFAULT NULL COMMENT '服务名',
  `uri` varchar(32) DEFAULT NULL COMMENT '服务地址',
  `predicates` text COMMENT '断言',
  `filters` text COMMENT '过滤器',
  `retryable` int(3) DEFAULT NULL COMMENT '是否重试:0-否 1-是',
  `strip_prefix` int(3) DEFAULT NULL COMMENT '是否忽略前缀0-否 1-是',
  `persistable` int(3) DEFAULT NULL COMMENT '是否为保留数据:0-否 1-是',
  `show_api` int(3) DEFAULT NULL COMMENT '是否在接口文档中展示:0-否 1-是',
  `status` int(3) DEFAULT NULL COMMENT '状态:0-无效 1-有效',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `del_flag` int(11) DEFAULT NULL COMMENT '删除状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_listener` */

DROP TABLE IF EXISTS `sys_listener`;

CREATE TABLE `sys_listener` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '表单主键',
  `name` varchar(128) DEFAULT NULL COMMENT '名称',
  `type` char(2) DEFAULT NULL COMMENT '监听类型',
  `event_type` varchar(32) DEFAULT NULL COMMENT '事件类型',
  `value_type` varchar(32) DEFAULT NULL COMMENT '值类型',
  `value` varchar(255) DEFAULT NULL COMMENT '执行内容',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `create_by` bigint(20) DEFAULT NULL COMMENT '创建人员',
  `update_by` bigint(20) DEFAULT NULL COMMENT '更新人员',
  `status` tinyint(2) DEFAULT '0' COMMENT '状态',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='流程监听';

/*Table structure for table `sys_log` */

DROP TABLE IF EXISTS `sys_log`;

CREATE TABLE `sys_log` (
  `id` varchar(32) NOT NULL,
  `log_type` int(3) DEFAULT NULL COMMENT '日志类型（1登录日志，2操作日志, 3.租户操作日志）',
  `log_content` longtext COMMENT '日志内容',
  `operate_type` int(2) DEFAULT NULL COMMENT '操作类型',
  `userid` varchar(32) DEFAULT NULL COMMENT '操作用户账号',
  `username` varchar(100) DEFAULT NULL COMMENT '操作用户名称',
  `ip` varchar(100) DEFAULT NULL COMMENT 'IP',
  `method` varchar(1000) DEFAULT NULL COMMENT '请求java方法',
  `request_url` varchar(255) DEFAULT NULL COMMENT '请求路径',
  `request_param` longtext COMMENT '请求参数',
  `request_type` varchar(10) DEFAULT NULL COMMENT '请求类型',
  `cost_time` bigint(20) DEFAULT NULL COMMENT '耗时',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `tenant_id` int(10) DEFAULT NULL COMMENT '租户ID',
  `client_type` varchar(5) DEFAULT NULL COMMENT '客户端类型 pc:电脑端 app:手机端 h5:移动网页端',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sl_userid` (`userid`) USING BTREE,
  KEY `idx_sl_log_type` (`log_type`) USING BTREE,
  KEY `idx_sl_operate_type` (`operate_type`) USING BTREE,
  KEY `idx_sl_create_time` (`create_time`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='系统日志表';

/*Table structure for table `sys_permission` */

DROP TABLE IF EXISTS `sys_permission`;

CREATE TABLE `sys_permission` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `parent_id` varchar(32) DEFAULT NULL COMMENT '父id',
  `name` varchar(255) DEFAULT NULL COMMENT '菜单标题',
  `url` varchar(255) DEFAULT NULL COMMENT '路径',
  `component` varchar(255) DEFAULT NULL COMMENT '组件',
  `is_route` tinyint(1) DEFAULT '1' COMMENT '是否路由菜单: 0:不是  1:是（默认值1）',
  `component_name` varchar(255) DEFAULT NULL COMMENT '组件名字',
  `redirect` varchar(255) DEFAULT NULL COMMENT '一级菜单跳转地址',
  `menu_type` int(11) DEFAULT NULL COMMENT '菜单类型(0:一级菜单; 1:子菜单:2:按钮权限)',
  `perms` varchar(255) DEFAULT NULL COMMENT '菜单权限编码',
  `perms_type` varchar(10) DEFAULT '0' COMMENT '权限策略1显示2禁用',
  `sort_no` double(8,2) DEFAULT NULL COMMENT '菜单排序',
  `always_show` tinyint(1) DEFAULT NULL COMMENT '聚合子路由: 1是0否',
  `icon` varchar(255) DEFAULT NULL COMMENT '菜单图标',
  `is_leaf` tinyint(1) DEFAULT NULL COMMENT '是否叶子节点:    1是0否',
  `keep_alive` tinyint(1) DEFAULT NULL COMMENT '是否缓存该页面:    1:是   0:不是',
  `hidden` tinyint(4) DEFAULT '0' COMMENT '是否隐藏路由: 0否,1是',
  `hide_tab` tinyint(4) DEFAULT NULL COMMENT '是否隐藏tab: 0否,1是',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(255) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `del_flag` int(11) DEFAULT '0' COMMENT '删除状态 0正常 1已删除',
  `rule_flag` int(3) DEFAULT '0' COMMENT '是否添加数据权限1是0否',
  `status` varchar(2) DEFAULT NULL COMMENT '按钮权限状态(0无效1有效)',
  `internal_or_external` tinyint(1) DEFAULT NULL COMMENT '外链菜单打开方式 0/内部打开 1/外部打开',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `index_menu_type` (`menu_type`) USING BTREE,
  KEY `index_menu_hidden` (`hidden`) USING BTREE,
  KEY `index_menu_status` (`status`) USING BTREE,
  KEY `index_menu_del_flag` (`del_flag`) USING BTREE,
  KEY `index_menu_url` (`url`) USING BTREE,
  KEY `index_menu_sort_no` (`sort_no`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='菜单权限表';

/*Table structure for table `sys_permission_data_rule` */

DROP TABLE IF EXISTS `sys_permission_data_rule`;

CREATE TABLE `sys_permission_data_rule` (
  `id` varchar(32) NOT NULL COMMENT 'ID',
  `permission_id` varchar(32) DEFAULT NULL COMMENT '菜单ID',
  `rule_name` varchar(50) DEFAULT NULL COMMENT '规则名称',
  `rule_column` varchar(50) DEFAULT NULL COMMENT '字段',
  `rule_conditions` varchar(50) DEFAULT NULL COMMENT '条件',
  `rule_value` varchar(300) DEFAULT NULL COMMENT '规则值',
  `status` varchar(3) DEFAULT NULL COMMENT '权限有效状态1有0否',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_spdr_permission_id` (`permission_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_position` */

DROP TABLE IF EXISTS `sys_position`;

CREATE TABLE `sys_position` (
  `id` varchar(32) NOT NULL,
  `code` varchar(100) DEFAULT NULL COMMENT '职务编码',
  `name` varchar(100) DEFAULT NULL COMMENT '职务名称',
  `post_rank` varchar(2) DEFAULT NULL COMMENT '职级',
  `company_id` varchar(255) DEFAULT NULL COMMENT '公司id',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(50) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '组织机构编码',
  `tenant_id` int(10) DEFAULT '0' COMMENT '租户ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_quartz_job` */

DROP TABLE IF EXISTS `sys_quartz_job`;

CREATE TABLE `sys_quartz_job` (
  `id` varchar(32) NOT NULL,
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `del_flag` int(1) DEFAULT NULL COMMENT '删除状态',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `job_class_name` varchar(255) DEFAULT NULL COMMENT '任务类名',
  `cron_expression` varchar(255) DEFAULT NULL COMMENT 'cron表达式',
  `parameter` varchar(255) DEFAULT NULL COMMENT '参数',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `status` int(1) DEFAULT NULL COMMENT '状态 0正常 -1停止',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_role` */

DROP TABLE IF EXISTS `sys_role`;

CREATE TABLE `sys_role` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `role_name` varchar(200) DEFAULT NULL COMMENT '角色名称',
  `role_code` varchar(100) NOT NULL COMMENT '角色编码',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `tenant_id` int(10) DEFAULT '0' COMMENT '租户ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_sys_role_role_code` (`role_code`) USING BTREE,
  KEY `idx_sysrole_tenant_id` (`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色表';

/*Table structure for table `sys_role_index` */

DROP TABLE IF EXISTS `sys_role_index`;

CREATE TABLE `sys_role_index` (
  `id` varchar(32) NOT NULL,
  `role_code` varchar(50) DEFAULT NULL COMMENT '角色编码',
  `url` varchar(100) DEFAULT NULL COMMENT '路由地址',
  `component` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '组件',
  `is_route` tinyint(1) DEFAULT '1' COMMENT '是否路由菜单: 0:不是  1:是（默认值1）',
  `priority` int(11) DEFAULT '0' COMMENT '优先级',
  `status` varchar(2) CHARACTER SET utf8 DEFAULT '0' COMMENT '状态0:无效 1:有效',
  `create_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '所属部门',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sri_role_code` (`role_code`) USING BTREE,
  KEY `idx_sri_status` (`status`) USING BTREE,
  KEY `idx_sri_priority` (`priority`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='角色首页表';

/*Table structure for table `sys_role_permission` */

DROP TABLE IF EXISTS `sys_role_permission`;

CREATE TABLE `sys_role_permission` (
  `id` varchar(32) NOT NULL,
  `role_id` varchar(32) DEFAULT NULL COMMENT '角色id',
  `permission_id` varchar(32) DEFAULT NULL COMMENT '权限id',
  `data_rule_ids` varchar(1000) DEFAULT NULL COMMENT '数据权限ids',
  `operate_date` datetime DEFAULT NULL COMMENT '操作时间',
  `operate_ip` varchar(100) DEFAULT NULL COMMENT '操作ip',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_srp_role_per_id` (`role_id`,`permission_id`) USING BTREE,
  KEY `idx_srp_role_id` (`role_id`) USING BTREE,
  KEY `idx_srp_permission_id` (`permission_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色权限表';

/*Table structure for table `sys_sms` */

DROP TABLE IF EXISTS `sys_sms`;

CREATE TABLE `sys_sms` (
  `id` varchar(32) NOT NULL COMMENT 'ID',
  `es_title` varchar(100) DEFAULT NULL COMMENT '消息标题',
  `es_type` varchar(50) DEFAULT NULL COMMENT '发送方式：参考枚举MessageTypeEnum',
  `es_receiver` varchar(50) DEFAULT NULL COMMENT '接收人',
  `es_param` varchar(1000) DEFAULT NULL COMMENT '发送所需参数Json格式',
  `es_content` longtext COMMENT '推送内容',
  `es_send_time` datetime DEFAULT NULL COMMENT '推送时间',
  `es_send_status` varchar(1) DEFAULT NULL COMMENT '推送状态 0未推送 1推送成功 2推送失败 -1失败不再发送',
  `es_send_num` int(11) DEFAULT NULL COMMENT '发送次数 超过5次不再发送',
  `es_result` varchar(255) DEFAULT NULL COMMENT '推送失败原因',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_ss_es_type` (`es_type`) USING BTREE,
  KEY `idx_ss_es_receiver` (`es_receiver`) USING BTREE,
  KEY `idx_ss_es_send_time` (`es_send_time`) USING BTREE,
  KEY `idx_ss_es_send_status` (`es_send_status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_sms_template` */

DROP TABLE IF EXISTS `sys_sms_template`;

CREATE TABLE `sys_sms_template` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `template_name` varchar(50) DEFAULT NULL COMMENT '模板标题',
  `template_code` varchar(32) NOT NULL COMMENT '模板CODE',
  `template_type` varchar(1) NOT NULL COMMENT '模板类型：1短信 2邮件 3微信',
  `template_content` varchar(1000) NOT NULL COMMENT '模板内容',
  `template_test_json` varchar(1000) DEFAULT NULL COMMENT '模板测试json',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人登录名称',
  `use_status` varchar(1) DEFAULT NULL COMMENT '是否使用中 1是0否',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_sst_template_code` (`template_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_table_white_list` */

DROP TABLE IF EXISTS `sys_table_white_list`;

CREATE TABLE `sys_table_white_list` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `table_name` varchar(100) DEFAULT NULL COMMENT '允许的表名',
  `field_name` varchar(200) DEFAULT NULL COMMENT '允许的字段名，多个用逗号分割',
  `status` varchar(10) DEFAULT '1' COMMENT '状态，1=启用，0=禁用',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_sys_table_white_list_table_name` (`table_name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='系统表白名单';

/*Table structure for table `sys_tenant` */

DROP TABLE IF EXISTS `sys_tenant`;

CREATE TABLE `sys_tenant` (
  `id` int(10) NOT NULL COMMENT '租户编码',
  `name` varchar(100) DEFAULT NULL COMMENT '租户名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(100) DEFAULT NULL COMMENT '创建人',
  `begin_date` datetime DEFAULT NULL COMMENT '开始时间',
  `end_date` datetime DEFAULT NULL COMMENT '结束时间',
  `status` int(1) DEFAULT NULL COMMENT '状态 1正常 0冻结',
  `trade` varchar(10) DEFAULT NULL COMMENT '所属行业',
  `company_size` varchar(10) DEFAULT NULL COMMENT '公司规模',
  `company_address` varchar(100) DEFAULT NULL COMMENT '公司地址',
  `company_logo` varchar(200) DEFAULT NULL COMMENT '公司logo',
  `house_number` varchar(10) DEFAULT NULL COMMENT '门牌号',
  `work_place` varchar(100) CHARACTER SET utf32 DEFAULT NULL COMMENT '工作地点',
  `secondary_domain` varchar(50) DEFAULT NULL COMMENT '二级域名',
  `login_bkgd_img` varchar(200) DEFAULT NULL COMMENT '登录背景图片',
  `position` varchar(10) DEFAULT NULL COMMENT '职级',
  `department` varchar(10) DEFAULT NULL COMMENT '部门',
  `del_flag` tinyint(1) DEFAULT '0' COMMENT '删除状态(0-正常,1-已删除)',
  `update_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `apply_status` int(3) DEFAULT NULL COMMENT '允许申请管理员 1允许 0不允许',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='多租户信息表';

/*Table structure for table `sys_tenant_pack` */

DROP TABLE IF EXISTS `sys_tenant_pack`;

CREATE TABLE `sys_tenant_pack` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `tenant_id` int(10) DEFAULT NULL COMMENT '租户id',
  `pack_name` varchar(20) DEFAULT NULL COMMENT '产品包名',
  `status` varchar(1) DEFAULT NULL COMMENT '开启状态(0 未开启 1开启)',
  `remarks` varchar(100) DEFAULT NULL COMMENT '备注',
  `create_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_time` date DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人',
  `update_time` date DEFAULT NULL COMMENT '更新时间',
  `pack_code` varchar(50) DEFAULT NULL COMMENT '编码,默认添加的三个管理员需要设置编码',
  `pack_type` varchar(10) DEFAULT 'custom' COMMENT '产品包类型(default 默认产品包 custom 自定义产品包)',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='租户产品包';

/*Table structure for table `sys_tenant_pack_perms` */

DROP TABLE IF EXISTS `sys_tenant_pack_perms`;

CREATE TABLE `sys_tenant_pack_perms` (
  `id` varchar(32) NOT NULL COMMENT '主键编号',
  `pack_id` varchar(32) DEFAULT NULL COMMENT '租户产品包名称',
  `permission_id` varchar(32) DEFAULT NULL COMMENT '菜单id',
  `create_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_time` date DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人',
  `update_time` date DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_stpp_pack_id` (`pack_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='租户产品包和菜单关系表';

/*Table structure for table `sys_tenant_pack_user` */

DROP TABLE IF EXISTS `sys_tenant_pack_user`;

CREATE TABLE `sys_tenant_pack_user` (
  `id` varchar(32) NOT NULL,
  `pack_id` varchar(32) DEFAULT NULL COMMENT '租户产品包ID',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID',
  `tenant_id` int(10) DEFAULT NULL COMMENT '租户ID',
  `create_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `status` int(3) DEFAULT NULL COMMENT '状态 正常状态1 申请状态0',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_tpu_pack_id` (`pack_id`) USING BTREE,
  KEY `idx_tpu_user_id` (`user_id`) USING BTREE,
  KEY `idx_tpu_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_tpu_status` (`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='租户套餐人员表';

/*Table structure for table `sys_third_account` */

DROP TABLE IF EXISTS `sys_third_account`;

CREATE TABLE `sys_third_account` (
  `id` varchar(32) NOT NULL COMMENT '编号',
  `sys_user_id` varchar(32) DEFAULT NULL COMMENT '第三方登录id',
  `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态(1-正常,2-冻结)',
  `del_flag` tinyint(1) DEFAULT NULL COMMENT '删除状态(0-正常,1-已删除)',
  `realname` varchar(100) DEFAULT NULL COMMENT '真实姓名',
  `tenant_id` int(10) DEFAULT '0' COMMENT '租户id',
  `third_user_uuid` varchar(100) DEFAULT NULL COMMENT '第三方账号',
  `third_user_id` varchar(100) DEFAULT NULL COMMENT '第三方app用户账号',
  `create_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `third_type` varchar(50) DEFAULT NULL COMMENT '登录来源',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_stat_third_type_user_id` (`third_type`,`third_user_id`) USING BTREE,
  UNIQUE KEY `uniq_sta_third_user_id_third_type` (`third_user_id`,`third_type`,`tenant_id`) USING BTREE,
  UNIQUE KEY `uniq_sta_third_user_uuid_third_type` (`third_user_uuid`,`third_type`,`tenant_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_third_app_config` */

DROP TABLE IF EXISTS `sys_third_app_config`;

CREATE TABLE `sys_third_app_config` (
  `id` varchar(32) NOT NULL,
  `tenant_id` int(10) NOT NULL DEFAULT '0' COMMENT '租户id',
  `agent_id` varchar(20) DEFAULT NULL COMMENT '钉钉/企业微信应用id',
  `client_id` varchar(50) DEFAULT NULL COMMENT '钉钉/企业微信 应用id',
  `client_secret` varchar(100) DEFAULT NULL COMMENT '钉钉/企业微信应用id对应的秘钥',
  `corp_id` varchar(100) DEFAULT NULL COMMENT '钉钉企业id',
  `third_type` varchar(20) DEFAULT NULL COMMENT '第三方类别(dingtalk 钉钉 wechat_enterprise 企业微信)',
  `status` int(1) DEFAULT '1' COMMENT '是否启用(0-否,1-是)',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_stac_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_stac_third_type` (`third_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='租户第三方配置表';

/*Table structure for table `sys_user` */

DROP TABLE IF EXISTS `sys_user`;

CREATE TABLE `sys_user` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `username` varchar(100) DEFAULT NULL COMMENT '登录账号',
  `realname` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '真实姓名',
  `password` varchar(255) DEFAULT NULL COMMENT '密码',
  `salt` varchar(45) DEFAULT NULL COMMENT 'md5密码盐',
  `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `sex` tinyint(1) DEFAULT NULL COMMENT '性别(0-默认未知,1-男,2-女)',
  `email` varchar(45) DEFAULT NULL COMMENT '电子邮件',
  `phone` varchar(45) DEFAULT NULL COMMENT '电话',
  `org_code` varchar(64) DEFAULT NULL COMMENT '登录会话的机构编码',
  `status` tinyint(1) DEFAULT NULL COMMENT '性别(1-正常,2-冻结)',
  `del_flag` tinyint(1) DEFAULT NULL COMMENT '删除状态(0-正常,1-已删除)',
  `third_id` varchar(100) DEFAULT NULL COMMENT '第三方登录的唯一标识',
  `third_type` varchar(100) DEFAULT NULL COMMENT '第三方类型',
  `activiti_sync` tinyint(1) DEFAULT NULL COMMENT '同步工作流引擎(1-同步,0-不同步)',
  `work_no` varchar(100) DEFAULT NULL COMMENT '工号，唯一键',
  `telephone` varchar(45) DEFAULT NULL COMMENT '座机号',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `user_identity` tinyint(1) DEFAULT NULL COMMENT '身份（1普通成员 2上级）',
  `depart_ids` varchar(1000) DEFAULT NULL COMMENT '负责部门',
  `client_id` varchar(64) DEFAULT NULL COMMENT '设备ID',
  `login_tenant_id` int(11) DEFAULT NULL COMMENT '上次登录选择租户ID',
  `bpm_status` varchar(2) DEFAULT NULL COMMENT '流程入职离职状态',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uniq_sys_user_work_no` (`work_no`) USING BTREE,
  UNIQUE KEY `uniq_sys_user_username` (`username`) USING BTREE,
  UNIQUE KEY `uniq_sys_user_phone` (`phone`) USING BTREE,
  UNIQUE KEY `uniq_sys_user_email` (`email`) USING BTREE,
  KEY `idx_su_status` (`status`) USING BTREE,
  KEY `idx_su_del_flag` (`del_flag`) USING BTREE,
  KEY `idx_su_del_username` (`username`,`del_flag`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户表';

/*Table structure for table `sys_user_agent` */

DROP TABLE IF EXISTS `sys_user_agent`;

CREATE TABLE `sys_user_agent` (
  `id` varchar(32) NOT NULL COMMENT '序号',
  `user_name` varchar(100) DEFAULT NULL COMMENT '用户名',
  `agent_user_name` varchar(100) DEFAULT NULL COMMENT '代理人用户名',
  `start_time` datetime DEFAULT NULL COMMENT '代理开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '代理结束时间',
  `status` varchar(2) DEFAULT NULL COMMENT '状态0无效1有效',
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_sug_user_name` (`user_name`) USING BTREE,
  KEY `idx_sug_status` (`status`) USING BTREE,
  KEY `idx_sug_start_time` (`start_time`) USING BTREE,
  KEY `idx_sug_end_time` (`end_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户代理人设置';

/*Table structure for table `sys_user_depart` */

DROP TABLE IF EXISTS `sys_user_depart`;

CREATE TABLE `sys_user_depart` (
  `ID` varchar(32) NOT NULL COMMENT 'id',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `dep_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  PRIMARY KEY (`ID`) USING BTREE,
  UNIQUE KEY `idx_sud_user_dep_id` (`user_id`,`dep_id`) USING BTREE,
  KEY `idx_sud_user_id` (`user_id`) USING BTREE,
  KEY `idx_sud_dep_id` (`dep_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_user_position` */

DROP TABLE IF EXISTS `sys_user_position`;

CREATE TABLE `sys_user_position` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `position_id` varchar(32) DEFAULT NULL COMMENT '职位id',
  `create_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sup_user_id` (`user_id`) USING BTREE,
  KEY `idx_sup_position_id` (`position_id`) USING BTREE,
  KEY `idx_sup_user_position_id` (`user_id`,`position_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `sys_user_role` */

DROP TABLE IF EXISTS `sys_user_role`;

CREATE TABLE `sys_user_role` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `role_id` varchar(32) DEFAULT NULL COMMENT '角色id',
  `tenant_id` int(10) DEFAULT '0' COMMENT '租户ID',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sur_user_id` (`user_id`) USING BTREE,
  KEY `idx_sur_role_id` (`role_id`) USING BTREE,
  KEY `idx_sur_user_role_id` (`user_id`,`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户角色表';

/*Table structure for table `sys_user_tenant` */

DROP TABLE IF EXISTS `sys_user_tenant`;

CREATE TABLE `sys_user_tenant` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `tenant_id` int(10) DEFAULT NULL COMMENT '租户id',
  `status` varchar(1) DEFAULT NULL COMMENT '状态(1 正常 2 离职 3 待审核 4 拒绝 5 邀请加入)',
  `create_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_sut_user_id` (`user_id`) USING BTREE,
  KEY `idx_sut_tenant_id` (`tenant_id`) USING BTREE,
  KEY `idx_sut_user_rel_tenant` (`user_id`,`tenant_id`) USING BTREE,
  KEY `idx_sut_status` (`status`) USING BTREE,
  KEY `idx_sut_userid_status` (`user_id`,`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户租户关系表';

/*Table structure for table `test_demo` */

DROP TABLE IF EXISTS `test_demo`;

CREATE TABLE `test_demo` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `name` varchar(200) DEFAULT NULL COMMENT '用户名',
  `sex` varchar(32) DEFAULT NULL COMMENT '性别',
  `age` int(32) DEFAULT NULL COMMENT '年龄',
  `descc` varchar(500) DEFAULT NULL COMMENT '描述',
  `birthday` datetime DEFAULT NULL COMMENT '生日',
  `user_code` varchar(32) DEFAULT NULL COMMENT '用户编码',
  `file_kk` varchar(500) DEFAULT NULL COMMENT '附件',
  `top_pic` varchar(500) DEFAULT NULL COMMENT '头像',
  `chegnshi` varchar(300) DEFAULT NULL COMMENT '城市',
  `ceck` varchar(32) DEFAULT NULL COMMENT 'checkbox',
  `xiamuti` varchar(100) DEFAULT NULL COMMENT '下拉多选',
  `search_sel` varchar(100) DEFAULT NULL COMMENT '搜索下拉',
  `pop` varchar(32) DEFAULT NULL COMMENT '弹窗',
  `sel_table` varchar(32) DEFAULT NULL COMMENT '下拉字典表',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `test_enhance_select` */

DROP TABLE IF EXISTS `test_enhance_select`;

CREATE TABLE `test_enhance_select` (
  `id` varchar(36) NOT NULL,
  `province` varchar(100) DEFAULT NULL COMMENT '省份',
  `city` varchar(100) DEFAULT NULL COMMENT '市',
  `area` varchar(100) DEFAULT NULL COMMENT '区',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `test_note` */

DROP TABLE IF EXISTS `test_note`;

CREATE TABLE `test_note` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `name` varchar(32) DEFAULT NULL COMMENT '用户名',
  `age` int(11) DEFAULT NULL COMMENT '年龄',
  `sex` varchar(32) DEFAULT NULL COMMENT '性别',
  `birthday` datetime DEFAULT NULL COMMENT '生日',
  `contents` varchar(500) DEFAULT NULL COMMENT '请假原因',
  `year` date DEFAULT NULL COMMENT '年',
  `sheng` varchar(32) DEFAULT NULL COMMENT '地区',
  `month` date DEFAULT NULL COMMENT '月',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `test_online_link` */

DROP TABLE IF EXISTS `test_online_link`;

CREATE TABLE `test_online_link` (
  `id` varchar(32) NOT NULL,
  `pid` varchar(32) DEFAULT NULL COMMENT 'pid',
  `name` varchar(255) DEFAULT NULL COMMENT 'name',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `test_order_customer` */

DROP TABLE IF EXISTS `test_order_customer`;

CREATE TABLE `test_order_customer` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `name` varchar(32) DEFAULT NULL COMMENT '客户名字',
  `sex` varchar(32) DEFAULT NULL COMMENT '性别',
  `age` int(11) DEFAULT NULL COMMENT '年龄',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `order_id` varchar(32) DEFAULT NULL COMMENT '订单id',
  `address` varchar(300) DEFAULT NULL COMMENT '地址',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `test_order_main` */

DROP TABLE IF EXISTS `test_order_main`;

CREATE TABLE `test_order_main` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `order_code` varchar(32) DEFAULT NULL COMMENT '订单编码',
  `order_date` datetime DEFAULT NULL COMMENT '下单时间',
  `descc` varchar(100) DEFAULT NULL COMMENT '描述',
  `xiala` varchar(32) DEFAULT NULL COMMENT '下拉多选',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `test_order_product` */

DROP TABLE IF EXISTS `test_order_product`;

CREATE TABLE `test_order_product` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `product_name` varchar(32) DEFAULT NULL COMMENT '产品名字',
  `price` double(32,0) DEFAULT NULL COMMENT '价格',
  `num` int(32) DEFAULT NULL COMMENT '数量',
  `descc` varchar(32) DEFAULT NULL COMMENT '描述',
  `order_fk_id` varchar(32) NOT NULL COMMENT '订单外键ID',
  `pro_type` varchar(32) DEFAULT NULL COMMENT '产品类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `test_person` */

DROP TABLE IF EXISTS `test_person`;

CREATE TABLE `test_person` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sex` varchar(32) DEFAULT NULL COMMENT '性别',
  `name` varchar(200) DEFAULT NULL COMMENT '用户名',
  `content` longtext COMMENT '请假原因',
  `be_date` datetime DEFAULT NULL COMMENT '请假时间',
  `qj_days` int(11) DEFAULT NULL COMMENT '请假天数',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `test_shoptype_tree` */

DROP TABLE IF EXISTS `test_shoptype_tree`;

CREATE TABLE `test_shoptype_tree` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `type_name` varchar(32) DEFAULT NULL COMMENT '商品分类',
  `pic` varchar(500) DEFAULT NULL COMMENT '分类图片',
  `pid` varchar(32) DEFAULT NULL COMMENT '父级节点',
  `has_child` varchar(3) DEFAULT NULL COMMENT '是否有子节点',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `tmp_report_data_1` */

DROP TABLE IF EXISTS `tmp_report_data_1`;

CREATE TABLE `tmp_report_data_1` (
  `monty` varchar(255) DEFAULT NULL COMMENT '月份',
  `main_income` decimal(10,2) DEFAULT NULL,
  `total` decimal(10,2) DEFAULT NULL,
  `his_lowest` decimal(10,2) DEFAULT NULL,
  `his_average` decimal(10,2) DEFAULT NULL,
  `his_highest` decimal(10,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `tmp_report_data_income` */

DROP TABLE IF EXISTS `tmp_report_data_income`;

CREATE TABLE `tmp_report_data_income` (
  `biz_income` varchar(100) DEFAULT NULL,
  `bx_jj_yongjin` decimal(10,2) DEFAULT NULL,
  `bx_zx_money` decimal(10,2) DEFAULT NULL,
  `chengbao_gz_money` decimal(10,2) DEFAULT NULL,
  `bx_gg_moeny` decimal(10,2) DEFAULT NULL,
  `tb_zx_money` decimal(10,2) DEFAULT NULL,
  `neikong_zx_money` decimal(10,2) DEFAULT NULL,
  `total` decimal(10,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

/*Table structure for table `v3_demo1` */

DROP TABLE IF EXISTS `v3_demo1`;

CREATE TABLE `v3_demo1` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `name` varchar(32) DEFAULT NULL COMMENT '名字',
  `sex` varchar(32) DEFAULT NULL COMMENT '性别',
  `age` int(32) DEFAULT NULL COMMENT '年龄',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `salary` double(10,2) DEFAULT NULL COMMENT '工资',
  `cccc` varchar(1000) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `v3_hello` */

DROP TABLE IF EXISTS `v3_hello`;

CREATE TABLE `v3_hello` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `name` varchar(32) DEFAULT NULL COMMENT '名字',
  `age` int(11) DEFAULT NULL COMMENT '年龄',
  `sex` varchar(32) DEFAULT NULL COMMENT '性别',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `cc` varchar(1000) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `v3_hello_copy` */

DROP TABLE IF EXISTS `v3_hello_copy`;

CREATE TABLE `v3_hello_copy` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `name` varchar(32) DEFAULT NULL COMMENT '名字',
  `age` int(11) DEFAULT NULL COMMENT '年龄',
  `sex` varchar(32) DEFAULT NULL COMMENT '性别',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `cc` varchar(1000) DEFAULT NULL COMMENT 'MD文本',
  `bm` varchar(32) DEFAULT NULL COMMENT '选部门',
  `sel_user` varchar(32) DEFAULT NULL COMMENT '选用户',
  `pop` varchar(32) DEFAULT NULL COMMENT 'popup',
  `cc3` varchar(1000) DEFAULT NULL COMMENT '富文本',
  `aa` varchar(32) DEFAULT NULL COMMENT 'aaa',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*Table structure for table `wb_check` */

DROP TABLE IF EXISTS `wb_check`;

CREATE TABLE `wb_check` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL COMMENT '名称',
  `st_time` datetime DEFAULT NULL COMMENT '开始时间',
  `des` varchar(512) DEFAULT NULL COMMENT '说明信息',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `scene_id` int(11) DEFAULT NULL COMMENT '场景id',
  `ind` int(11) DEFAULT NULL COMMENT '顺序号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_check_cfg` */

DROP TABLE IF EXISTS `wb_check_cfg`;

CREATE TABLE `wb_check_cfg` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `wb_level` int(11) DEFAULT NULL COMMENT '是否重要外包商',
  `wb_service_tp` int(11) DEFAULT NULL COMMENT '外包商服务类型',
  `wb_workplace_tp` int(11) DEFAULT NULL COMMENT '是否驻场',
  `tid` int(11) DEFAULT NULL COMMENT '企业属性ID',
  `des` varchar(128) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_check_item` */

DROP TABLE IF EXISTS `wb_check_item`;

CREATE TABLE `wb_check_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tp` smallint(4) DEFAULT NULL COMMENT '1:要求 2：指标',
  `tid` int(11) DEFAULT NULL COMMENT '要求id',
  `tname` varchar(128) DEFAULT NULL COMMENT '目标ID',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `check_id` int(11) DEFAULT NULL COMMENT '检查点ID',
  `des` varchar(256) DEFAULT NULL COMMENT '说明',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_company_check_rule` */

DROP TABLE IF EXISTS `wb_company_check_rule`;

CREATE TABLE `wb_company_check_rule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rule_code` varchar(16) DEFAULT NULL COMMENT '规则编码',
  `rule_tp` varchar(16) DEFAULT NULL COMMENT '规则分类',
  `rule_name` varchar(16) DEFAULT NULL COMMENT '规则名称',
  `rule_key` varchar(16) DEFAULT NULL COMMENT '规则KEY',
  `check_rules` varchar(128) DEFAULT NULL COMMENT '检查规则',
  `des` varchar(512) DEFAULT NULL COMMENT '说明',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_company_detail` */

DROP TABLE IF EXISTS `wb_company_detail`;

CREATE TABLE `wb_company_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cid` int(11) DEFAULT NULL COMMENT '外包商ID',
  `attr_key` varchar(64) DEFAULT NULL COMMENT '属性',
  `attr_name` varchar(64) DEFAULT NULL COMMENT '属性名称',
  `attr_val` text COMMENT '属性值',
  `api_id` int(11) DEFAULT NULL COMMENT '接口ID',
  `grp_ind` int(11) DEFAULT NULL COMMENT '组号',
  `create_time` datetime DEFAULT NULL COMMENT '采集时间',
  `sta` varchar(10) DEFAULT NULL COMMENT '状态',
  `attr_val_tp` varchar(16) DEFAULT NULL COMMENT '值分类',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66523 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_company_info` */

DROP TABLE IF EXISTS `wb_company_info`;

CREATE TABLE `wb_company_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL COMMENT '外包商名称',
  `tel` varchar(16) DEFAULT NULL COMMENT '联系电话',
  `address` varchar(32) DEFAULT NULL COMMENT '地区',
  `service_tp` smallint(4) DEFAULT NULL COMMENT '服务类型',
  `service_method` smallint(4) DEFAULT NULL COMMENT '服务类型',
  `workplace_tp` smallint(4) DEFAULT NULL COMMENT '工作场地',
  `level` smallint(4) DEFAULT NULL COMMENT '服务等级',
  `reg_status` tinyint(1) DEFAULT NULL COMMENT '存续',
  `reg_capital` float(10,2) DEFAULT NULL COMMENT '注册资本',
  `legal_person` varchar(16) DEFAULT NULL COMMENT '法人',
  `exist_duration` int(11) DEFAULT NULL COMMENT '存续时间(年)',
  `website` varchar(32) DEFAULT NULL COMMENT '官网地址',
  `contacts` varchar(16) DEFAULT NULL COMMENT '联系人',
  `des` varchar(256) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_company_third_api` */

DROP TABLE IF EXISTS `wb_company_third_api`;

CREATE TABLE `wb_company_third_api` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL COMMENT '接口名称',
  `url` varchar(128) DEFAULT NULL COMMENT '接口地址',
  `api_id` int(11) DEFAULT NULL COMMENT '接口ID',
  `req_method` varchar(10) DEFAULT NULL COMMENT '请求方法',
  `res_format` varchar(10) DEFAULT NULL COMMENT '返回格式',
  `has_page` int(3) DEFAULT NULL COMMENT '是否分页',
  `tp` int(5) DEFAULT NULL COMMENT '接口分类',
  `weight` int(11) DEFAULT NULL COMMENT '权重',
  `risk_level` smallint(6) DEFAULT NULL COMMENT '风险等级',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_key_name` */

DROP TABLE IF EXISTS `wb_key_name`;

CREATE TABLE `wb_key_name` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `wkey` varchar(32) DEFAULT NULL COMMENT 'wkey',
  `wname` varchar(32) DEFAULT NULL COMMENT 'wname',
  `api_id` int(10) DEFAULT NULL COMMENT 'apiId',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_pull_data_log` */

DROP TABLE IF EXISTS `wb_pull_data_log`;

CREATE TABLE `wb_pull_data_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cid` int(11) DEFAULT NULL COMMENT '公司ID',
  `api_id` int(11) DEFAULT NULL COMMENT '接口ID',
  `sta` int(11) DEFAULT NULL COMMENT '状态',
  `create_time` date DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `cname` varchar(128) DEFAULT NULL COMMENT '公司名称',
  `api_name` varchar(32) DEFAULT NULL COMMENT '接口名称',
  `sta_msg` varchar(64) DEFAULT NULL COMMENT '状态信息',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=523 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_scene` */

DROP TABLE IF EXISTS `wb_scene`;

CREATE TABLE `wb_scene` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` char(32) DEFAULT NULL COMMENT '场景名称',
  `des` varchar(512) DEFAULT NULL COMMENT '场景描述',
  `tp` smallint(2) DEFAULT NULL COMMENT '分类',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_survey_cfg` */

DROP TABLE IF EXISTS `wb_survey_cfg`;

CREATE TABLE `wb_survey_cfg` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `domain_name` varchar(32) DEFAULT NULL COMMENT '领域名称',
  `domain_code` varchar(32) DEFAULT NULL COMMENT '领域编码',
  `attr_name` varchar(32) DEFAULT NULL COMMENT '属性名称',
  `attr_key` varchar(32) DEFAULT NULL COMMENT '属性编码',
  `coll_method` smallint(4) DEFAULT NULL COMMENT '数据采集方式',
  `api_id` int(11) DEFAULT NULL COMMENT 'api_id',
  `tp` smallint(2) DEFAULT NULL COMMENT '分类',
  `risk_level` smallint(2) DEFAULT NULL COMMENT '风险等级',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_survey_plan` */

DROP TABLE IF EXISTS `wb_survey_plan`;

CREATE TABLE `wb_survey_plan` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL COMMENT '方案名称',
  `make_man` varchar(32) DEFAULT NULL COMMENT '制定人',
  `make_time` datetime DEFAULT NULL COMMENT '制定时间',
  `sta` smallint(4) DEFAULT NULL COMMENT '状态',
  `content` text,
  `file_upload_path` varchar(64) DEFAULT NULL COMMENT '文件地址',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1334546435 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_survey_report` */

DROP TABLE IF EXISTS `wb_survey_report`;

CREATE TABLE `wb_survey_report` (
  `id` int(11) NOT NULL,
  `name` varchar(32) DEFAULT NULL COMMENT '报告名称',
  `cid` varchar(32) DEFAULT NULL COMMENT '外包商ID',
  `plan_id` varchar(32) DEFAULT NULL COMMENT '调查方案',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `sta` varchar(10) DEFAULT NULL COMMENT '状态',
  `des` varchar(128) DEFAULT NULL COMMENT '说明',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Table structure for table `wb_survey_result` */

DROP TABLE IF EXISTS `wb_survey_result`;

CREATE TABLE `wb_survey_result` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cid` int(11) DEFAULT NULL COMMENT '公司ID',
  `survey_item_id` int(11) DEFAULT NULL COMMENT '调查项目ID',
  `survey_result` varchar(512) DEFAULT NULL COMMENT '调查结果',
  `create_time` date DEFAULT NULL COMMENT '调查时间',
  `create_by` varchar(32) DEFAULT NULL COMMENT '调查人',
  `domain_code` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_tmp_cfg` */

DROP TABLE IF EXISTS `wb_tmp_cfg`;

CREATE TABLE `wb_tmp_cfg` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL COMMENT '配置名称',
  `st_docid` int(11) DEFAULT NULL COMMENT '起始记录ID',
  `root_path` varchar(128) DEFAULT NULL COMMENT '根路径',
  `tp` varchar(16) DEFAULT NULL COMMENT '类别',
  `end_docid` int(11) DEFAULT NULL COMMENT '最后记录ID',
  `update_time` date DEFAULT NULL COMMENT '最后更新时间',
  `total` int(11) DEFAULT NULL,
  `psize` int(11) DEFAULT NULL,
  `pind` int(11) DEFAULT NULL,
  `itemid` int(11) DEFAULT NULL,
  `pages` int(11) DEFAULT NULL COMMENT '页数',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;

/*Table structure for table `wb_tmp_data` */

DROP TABLE IF EXISTS `wb_tmp_data`;

CREATE TABLE `wb_tmp_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `tp` varchar(16) DEFAULT NULL COMMENT '分类',
  `title` varchar(1024) DEFAULT NULL COMMENT '标题',
  `COMPLIANE_NO` int(11) DEFAULT NULL COMMENT '记录编号',
  `DOC_NO` varchar(1024) DEFAULT NULL COMMENT '行政处罚决定书文号',
  `PUNISHED_USERS` varchar(2048) DEFAULT NULL COMMENT '个人名称',
  `PUNISHED_ORG` varchar(2048) DEFAULT NULL COMMENT '单位名称',
  `PUNISHED_ORG_HEAD` varchar(128) DEFAULT NULL COMMENT '主要负责人',
  `VIOLATION_FACT` varchar(4056) DEFAULT NULL COMMENT '主要违法违规事实',
  `PUNISH_BASIS` varchar(4056) DEFAULT NULL COMMENT '行政处罚依据',
  `PUNISH_DECISION` varchar(4056) DEFAULT NULL COMMENT '行政处罚决定',
  `PUNISH_COM` varchar(1028) DEFAULT NULL COMMENT '做出处罚行政机关',
  `PUNISH_DATE` varchar(16) DEFAULT NULL COMMENT '作出处罚决定日期',
  `created_time` datetime DEFAULT NULL COMMENT '创建时间',
  `itemid` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=116643 DEFAULT CHARSET=utf8;

/*Table structure for table `wu_liao` */

DROP TABLE IF EXISTS `wu_liao`;

CREATE TABLE `wu_liao` (
  `id` varchar(36) NOT NULL,
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
  `wul_name` varchar(32) DEFAULT NULL COMMENT '物料名称',
  `wul_code` varchar(32) DEFAULT NULL COMMENT '物料编码',
  `pid` varchar(32) DEFAULT NULL COMMENT '父级节点',
  `has_child` varchar(3) DEFAULT NULL COMMENT '是否有子节点',
  `picc` varchar(500) DEFAULT NULL COMMENT '封面图',
  `xingqi` date DEFAULT NULL COMMENT '星期',
  `year1` date DEFAULT NULL COMMENT '年度',
  `fuwenb` varchar(32) DEFAULT NULL COMMENT '富文本',
  `guanl` varchar(32) DEFAULT NULL COMMENT '关联请假单',
  `yonhu` varchar(32) DEFAULT NULL COMMENT '用户',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
