DROP TABLE IF EXISTS `BLADE_MODULE_VERSION`;
CREATE TABLE `BLADE_MODULE_VERSION`  (
    `MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NOT NULL,
    `VERSION` VARCHAR(8) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NOT NULL,
    `HISTORY` VARCHAR(300) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL,
    PRIMARY KEY (`MODULE_NAME`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_CERTIFICATET
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_CERTIFICATET`;
CREATE TABLE `HZIMS_CERTIFICATET`  (
    `ID` BIGINT(20) NOT NULL,
    `PERSON_ID` BIGINT(20) NOT NULL COMMENT '用户管理表ID',
    `TYPE` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '证件类型',
    `DEAD_TIME` DATETIME NOT NULL COMMENT '到期时间',
    `PIC` VARCHAR(5000) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '证书图片',
    `CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
    `CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
    `UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
    `UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
    `STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '流程状态（1：待审批；3：审批通过；4：审批不通过）',
    `IS_DELETED` TINYINT(4) UNSIGNED NULL DEFAULT NULL COMMENT '是否已删除（0：否，1：是）',
    `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
    `CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
    PRIMARY KEY (`ID`) USING BTREE,
    INDEX `INDEX_PERSON_ID`(`PERSON_ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_CERTIFICATET_NOTICE
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_CERTIFICATET_NOTICE`;
CREATE TABLE `HZIMS_CERTIFICATET_NOTICE`  (
    `ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
    `SEND_TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '通知类型  1=短信 2=系统通知',
    `SAFE_TIME` INT(11) NOT NULL COMMENT '提前几天通知',
    `NOTICE_USERS` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '通知用户',
    `IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0,
    `STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '业务状态',
    `CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位',
    `CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人',
    `CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间',
    `UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
    `UPDATE_TIME` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
    `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
    PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1742361446949122051 CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_PERSON_MANAGEMET
-- ----------------------------
DROP TABLE IF EXISTS `HZIMS_PERSON_MANAGEMET`;
CREATE TABLE `HZIMS_PERSON_MANAGEMET`  (
    `ID` BIGINT(20) NOT NULL,
    `USER_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '用户ID',
    `NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '用户姓名',
    `UNIT_NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '单位名称',
    `SEX` TINYINT(4) NULL DEFAULT NULL COMMENT '性别（男0，女1）',
    `JOB` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '职位',
    `ACADEMIC_TITLE` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '职称',
    `PHONE` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '联系电话',
    `CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
    `CREATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
    `UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
    `UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
    `STATUS` TINYINT(11) NULL DEFAULT NULL COMMENT '流程状态（1：待审批；3：审批通过；4：审批不通过）',
    `IS_DELETED` TINYINT(4) UNSIGNED NULL DEFAULT 0 COMMENT '是否已删除（0：否，1：是）',
    `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
    `CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '部门ID',
    PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC;
