create sequence ACT_EVT_LOG_SEQ
    ;
create sequence ACT_HI_TASK_EVT_LOG_SEQ
    ;
create sequence GEN_BASE_CLASS_SEQ
    ;
create sequence GEN_DATASOURCE_SEQ
    ;
create sequence GEN_FIELD_TYPE_SEQ
    ;
create sequence GEN_PROJECT_MODIFY_SEQ
    ;
create sequence GEN_TABLE_FIELD_SEQ
    ;
create sequence GEN_TABLE_SEQ
    ;
create sequence GEN_TEST_STUDENT_SEQ
    ;
create sequence XXL_JOB_GROUP_SEQ
    ;
create sequence XXL_JOB_INFO_SEQ
    ;
create sequence XXL_JOB_LOG_REPORT_SEQ
    ;
create sequence XXL_JOB_LOG_SEQ
    ;
create sequence XXL_JOB_LOGGLUE_SEQ
    ;
create sequence XXL_JOB_REGISTRY_SEQ
    ;
create sequence XXL_JOB_USER_SEQ
    ;

create table XXL_JOB_USER
(
    ID         NUMBER(11)   not null
        constraint SYS_C009499
            primary key
        constraint SYS_C0014870
            check ("ID" IS NOT NULL)
        constraint SYS_C00152312
            check ("ID" IS NOT NULL)
        constraint SYS_C009495
            check ("ID" IS NOT NULL),
    USERNAME   VARCHAR2(50) not null
        constraint SYS_C0014871
            check ("USERNAME" IS NOT NULL)
        constraint SYS_C00152313
            check ("USERNAME" IS NOT NULL)
        constraint SYS_C009496
            check ("USERNAME" IS NOT NULL),
    PASSWORD   VARCHAR2(50) not null
        constraint SYS_C0014872
            check ("PASSWORD" IS NOT NULL)
        constraint SYS_C00152314
            check ("PASSWORD" IS NOT NULL)
        constraint SYS_C009497
            check ("PASSWORD" IS NOT NULL),
    ROLE       NUMBER(4)    not null
        constraint SYS_C0014873
            check ("ROLE" IS NOT NULL)
        constraint SYS_C00152315
            check ("ROLE" IS NOT NULL)
        constraint SYS_C009498
            check ("ROLE" IS NOT NULL),
    PERMISSION VARCHAR2(255)
)
    ;

comment on table XXL_JOB_USER is '系统用户表'
;

comment on column XXL_JOB_USER.USERNAME is '账号'
;

comment on column XXL_JOB_USER.PASSWORD is '密码'
;

comment on column XXL_JOB_USER.ROLE is '角色：0-普通用户、1-管理员'
;

comment on column XXL_JOB_USER.PERMISSION is '权限：执行器ID列表，多个逗号分割'
;

create table XXL_JOB_REGISTRY
(
    ID             NUMBER(11)    not null
        constraint SYS_C009494
            primary key
        constraint SYS_C0014866
            check ("ID" IS NOT NULL)
        constraint SYS_C00152302
            check ("ID" IS NOT NULL)
        constraint SYS_C009490
            check ("ID" IS NOT NULL),
    REGISTRY_GROUP VARCHAR2(50)  not null
        constraint SYS_C0014867
            check ("REGISTRY_GROUP" IS NOT NULL)
        constraint SYS_C00152303
            check ("REGISTRY_GROUP" IS NOT NULL)
        constraint SYS_C009491
            check ("REGISTRY_GROUP" IS NOT NULL),
    REGISTRY_KEY   VARCHAR2(255) not null
        constraint SYS_C0014868
            check ("REGISTRY_KEY" IS NOT NULL)
        constraint SYS_C00152304
            check ("REGISTRY_KEY" IS NOT NULL)
        constraint SYS_C009492
            check ("REGISTRY_KEY" IS NOT NULL),
    REGISTRY_VALUE VARCHAR2(255) not null
        constraint SYS_C0014869
            check ("REGISTRY_VALUE" IS NOT NULL)
        constraint SYS_C00152305
            check ("REGISTRY_VALUE" IS NOT NULL)
        constraint SYS_C009493
            check ("REGISTRY_VALUE" IS NOT NULL),
    UPDATE_TIME    TIMESTAMP(6)
)
    ;

comment on table XXL_JOB_REGISTRY is '执行器注册表'
;

create table XXL_JOB_LOGGLUE
(
    ID          NUMBER(11)    not null
        constraint SYS_C009484
            primary key
        constraint SYS_C0014863
            check ("ID" IS NOT NULL)
        constraint SYS_C00152298
            check ("ID" IS NOT NULL)
        constraint SYS_C009481
            check ("ID" IS NOT NULL),
    JOB_ID      NUMBER(11)    not null
        constraint SYS_C0014864
            check ("JOB_ID" IS NOT NULL)
        constraint SYS_C00152299
            check ("JOB_ID" IS NOT NULL)
        constraint SYS_C009482
            check ("JOB_ID" IS NOT NULL),
    GLUE_TYPE   VARCHAR2(50),
    GLUE_SOURCE CLOB,
    GLUE_REMARK VARCHAR2(128) not null
        constraint SYS_C0014865
            check ("GLUE_REMARK" IS NOT NULL)
        constraint SYS_C00152300
            check ("GLUE_REMARK" IS NOT NULL)
        constraint SYS_C009483
            check ("GLUE_REMARK" IS NOT NULL),
    ADD_TIME    TIMESTAMP(6),
    UPDATE_TIME TIMESTAMP(6)
)
    ;

comment on table XXL_JOB_LOGGLUE is '任务GLUE日志'
;

comment on column XXL_JOB_LOGGLUE.JOB_ID is '任务，主键ID'
;

comment on column XXL_JOB_LOGGLUE.GLUE_TYPE is 'GLUE类型'
;

comment on column XXL_JOB_LOGGLUE.GLUE_SOURCE is 'GLUE源代码'
;

comment on column XXL_JOB_LOGGLUE.GLUE_REMARK is 'GLUE备注'
;

create table XXL_JOB_LOG_REPORT
(
    ID            NUMBER(11)             not null
        constraint SYS_C009489
            primary key
        constraint SYS_C0014859
            check ("ID" IS NOT NULL)
        constraint SYS_C00152293
            check ("ID" IS NOT NULL)
        constraint SYS_C009485
            check ("ID" IS NOT NULL),
    TRIGGER_DAY   TIMESTAMP(6),
    RUNNING_COUNT NUMBER(11) default '0' not null
        constraint SYS_C0014860
            check ("RUNNING_COUNT" IS NOT NULL)
        constraint SYS_C00152294
            check ("RUNNING_COUNT" IS NOT NULL)
        constraint SYS_C009486
            check ("RUNNING_COUNT" IS NOT NULL),
    SUC_COUNT     NUMBER(11) default '0' not null
        constraint SYS_C0014861
            check ("SUC_COUNT" IS NOT NULL)
        constraint SYS_C00152295
            check ("SUC_COUNT" IS NOT NULL)
        constraint SYS_C009487
            check ("SUC_COUNT" IS NOT NULL),
    FAIL_COUNT    NUMBER(11) default '0' not null
        constraint SYS_C0014862
            check ("FAIL_COUNT" IS NOT NULL)
        constraint SYS_C00152296
            check ("FAIL_COUNT" IS NOT NULL)
        constraint SYS_C009488
            check ("FAIL_COUNT" IS NOT NULL),
    UPDATE_TIME   TIMESTAMP(6)
)
    ;

comment on table XXL_JOB_LOG_REPORT is '调度日志报表'
;

comment on column XXL_JOB_LOG_REPORT.TRIGGER_DAY is '调度-时间'
;

comment on column XXL_JOB_LOG_REPORT.RUNNING_COUNT is '运行中-日志数量'
;

comment on column XXL_JOB_LOG_REPORT.SUC_COUNT is '执行成功-日志数量'
;

comment on column XXL_JOB_LOG_REPORT.FAIL_COUNT is '执行失败-日志数量'
;

create table XXL_JOB_LOG
(
    ID                        NUMBER(20)             not null
        constraint SYS_C0010318
            primary key
        constraint SYS_C0010304
            check ("ID" IS NOT NULL)
        constraint SYS_C0014852
            check ("ID" IS NOT NULL)
        constraint SYS_C00152285
            check ("ID" IS NOT NULL),
    JOB_GROUP                 NUMBER(11)             not null
        constraint SYS_C0010305
            check ("JOB_GROUP" IS NOT NULL)
        constraint SYS_C0014853
            check ("JOB_GROUP" IS NOT NULL)
        constraint SYS_C00152286
            check ("JOB_GROUP" IS NOT NULL),
    JOB_ID                    NUMBER(11)             not null
        constraint SYS_C0010306
            check ("JOB_ID" IS NOT NULL)
        constraint SYS_C0014854
            check ("JOB_ID" IS NOT NULL)
        constraint SYS_C00152287
            check ("JOB_ID" IS NOT NULL),
    EXECUTOR_ADDRESS          VARCHAR2(255),
    EXECUTOR_HANDLER          VARCHAR2(255),
    EXECUTOR_PARAM            VARCHAR2(512),
    EXECUTOR_SHARDING_PARAM   VARCHAR2(20),
    EXECUTOR_FAIL_RETRY_COUNT NUMBER(11) default '0' not null
        constraint SYS_C0010307
            check ("EXECUTOR_FAIL_RETRY_COUNT" IS NOT NULL)
        constraint SYS_C0014855
            check ("EXECUTOR_FAIL_RETRY_COUNT" IS NOT NULL)
        constraint SYS_C00152288
            check ("EXECUTOR_FAIL_RETRY_COUNT" IS NOT NULL),
    TRIGGER_TIME              TIMESTAMP(6),
    TRIGGER_CODE              NUMBER(11)             not null
        constraint SYS_C0010308
            check ("TRIGGER_CODE" IS NOT NULL)
        constraint SYS_C0014856
            check ("TRIGGER_CODE" IS NOT NULL)
        constraint SYS_C00152289
            check ("TRIGGER_CODE" IS NOT NULL),
    TRIGGER_MSG               CLOB,
    HANDLE_TIME               TIMESTAMP(6),
    HANDLE_CODE               NUMBER(11)             not null
        constraint SYS_C0010309
            check ("HANDLE_CODE" IS NOT NULL)
        constraint SYS_C0014857
            check ("HANDLE_CODE" IS NOT NULL)
        constraint SYS_C00152290
            check ("HANDLE_CODE" IS NOT NULL),
    HANDLE_MSG                CLOB,
    ALARM_STATUS              NUMBER(4)  default '0' not null
        constraint SYS_C0010310
            check ("ALARM_STATUS" IS NOT NULL)
        constraint SYS_C0014858
            check ("ALARM_STATUS" IS NOT NULL)
        constraint SYS_C00152291
            check ("ALARM_STATUS" IS NOT NULL)
)
    ;

comment on table XXL_JOB_LOG is '调度日志表'
;

comment on column XXL_JOB_LOG.JOB_GROUP is '执行器主键ID'
;

comment on column XXL_JOB_LOG.JOB_ID is '任务，主键ID'
;

comment on column XXL_JOB_LOG.EXECUTOR_ADDRESS is '执行器地址，本次执行的地址'
;

comment on column XXL_JOB_LOG.EXECUTOR_HANDLER is '执行器任务handler'
;

comment on column XXL_JOB_LOG.EXECUTOR_PARAM is '执行器任务参数'
;

comment on column XXL_JOB_LOG.EXECUTOR_SHARDING_PARAM is '执行器任务分片参数，格式如 1;2'
;

comment on column XXL_JOB_LOG.EXECUTOR_FAIL_RETRY_COUNT is '失败重试次数'
;

comment on column XXL_JOB_LOG.TRIGGER_TIME is '调度-时间'
;

comment on column XXL_JOB_LOG.TRIGGER_CODE is '调度-结果'
;

comment on column XXL_JOB_LOG.TRIGGER_MSG is '调度-日志'
;

comment on column XXL_JOB_LOG.HANDLE_TIME is '执行-时间'
;

comment on column XXL_JOB_LOG.HANDLE_CODE is '执行-状态'
;

comment on column XXL_JOB_LOG.HANDLE_MSG is '执行-日志'
;

comment on column XXL_JOB_LOG.ALARM_STATUS is '告警状态：0-默认、1-无需告警、2-告警成功、3-告警失败'
;

create table XXL_JOB_LOCK
(
    LOCK_NAME VARCHAR2(50) not null
        constraint SYS_C009472
            primary key
        constraint SYS_C0014851
            check ("LOCK_NAME" IS NOT NULL)
        constraint SYS_C00152317
            check ("LOCK_NAME" IS NOT NULL)
        constraint SYS_C009471
            check ("LOCK_NAME" IS NOT NULL)
)
    ;

comment on table XXL_JOB_LOCK is '任务调度锁表'
;

comment on column XXL_JOB_LOCK.LOCK_NAME is '锁名称'
;

create table XXL_JOB_INFO
(
    ID                        NUMBER(11)                        not null
        constraint SYS_C009470
            primary key
        constraint SYS_C0014839
            check ("ID" IS NOT NULL)
        constraint SYS_C00152273
            check ("ID" IS NOT NULL)
        constraint SYS_C009458
            check ("ID" IS NOT NULL),
    JOB_GROUP                 NUMBER(11)                        not null
        constraint SYS_C0014840
            check ("JOB_GROUP" IS NOT NULL)
        constraint SYS_C00152274
            check ("JOB_GROUP" IS NOT NULL)
        constraint SYS_C009459
            check ("JOB_GROUP" IS NOT NULL),
    JOB_DESC                  VARCHAR2(255)                     not null
        constraint SYS_C0014841
            check ("JOB_DESC" IS NOT NULL)
        constraint SYS_C00152275
            check ("JOB_DESC" IS NOT NULL)
        constraint SYS_C009460
            check ("JOB_DESC" IS NOT NULL),
    ADD_TIME                  TIMESTAMP(6),
    UPDATE_TIME               TIMESTAMP(6),
    AUTHOR                    VARCHAR2(64),
    ALARM_EMAIL               VARCHAR2(255),
    SCHEDULE_TYPE             VARCHAR2(50) default 'NONE'       not null
        constraint SYS_C0014842
            check ("SCHEDULE_TYPE" IS NOT NULL)
        constraint SYS_C00152276
            check ("SCHEDULE_TYPE" IS NOT NULL)
        constraint SYS_C009461
            check ("SCHEDULE_TYPE" IS NOT NULL),
    SCHEDULE_CONF             VARCHAR2(128),
    MISFIRE_STRATEGY          VARCHAR2(50) default 'DO_NOTHING' not null
        constraint SYS_C0014843
            check ("MISFIRE_STRATEGY" IS NOT NULL)
        constraint SYS_C00152277
            check ("MISFIRE_STRATEGY" IS NOT NULL)
        constraint SYS_C009462
            check ("MISFIRE_STRATEGY" IS NOT NULL),
    EXECUTOR_ROUTE_STRATEGY   VARCHAR2(50),
    EXECUTOR_HANDLER          VARCHAR2(255),
    EXECUTOR_PARAM            VARCHAR2(512),
    EXECUTOR_BLOCK_STRATEGY   VARCHAR2(50),
    EXECUTOR_TIMEOUT          NUMBER(11)   default '0'          not null
        constraint SYS_C0014844
            check ("EXECUTOR_TIMEOUT" IS NOT NULL)
        constraint SYS_C00152278
            check ("EXECUTOR_TIMEOUT" IS NOT NULL)
        constraint SYS_C009463
            check ("EXECUTOR_TIMEOUT" IS NOT NULL),
    EXECUTOR_FAIL_RETRY_COUNT NUMBER(11)   default '0'          not null
        constraint SYS_C0014845
            check ("EXECUTOR_FAIL_RETRY_COUNT" IS NOT NULL)
        constraint SYS_C00152279
            check ("EXECUTOR_FAIL_RETRY_COUNT" IS NOT NULL)
        constraint SYS_C009464
            check ("EXECUTOR_FAIL_RETRY_COUNT" IS NOT NULL),
    GLUE_TYPE                 VARCHAR2(50)                      not null
        constraint SYS_C0014846
            check ("GLUE_TYPE" IS NOT NULL)
        constraint SYS_C00152280
            check ("GLUE_TYPE" IS NOT NULL)
        constraint SYS_C009465
            check ("GLUE_TYPE" IS NOT NULL),
    GLUE_SOURCE               CLOB,
    GLUE_REMARK               VARCHAR2(128),
    GLUE_UPDATETIME           TIMESTAMP(6),
    CHILD_JOBID               VARCHAR2(255),
    TRIGGER_STATUS            NUMBER(4)    default '0'          not null
        constraint SYS_C0014847
            check ("TRIGGER_STATUS" IS NOT NULL)
        constraint SYS_C00152281
            check ("TRIGGER_STATUS" IS NOT NULL)
        constraint SYS_C009466
            check ("TRIGGER_STATUS" IS NOT NULL),
    TRIGGER_LAST_TIME         NUMBER(13)   default '0'          not null
        constraint SYS_C0014848
            check ("TRIGGER_LAST_TIME" IS NOT NULL)
        constraint SYS_C00152282
            check ("TRIGGER_LAST_TIME" IS NOT NULL)
        constraint SYS_C009467
            check ("TRIGGER_LAST_TIME" IS NOT NULL),
    TRIGGER_NEXT_TIME         NUMBER(13)   default '0'          not null
        constraint SYS_C0014849
            check ("TRIGGER_NEXT_TIME" IS NOT NULL)
        constraint SYS_C00152283
            check ("TRIGGER_NEXT_TIME" IS NOT NULL)
        constraint SYS_C009468
            check ("TRIGGER_NEXT_TIME" IS NOT NULL),
    JOB_CRON                  VARCHAR2(128)                     not null
        constraint SYS_C0014850
            check ("JOB_CRON" IS NOT NULL)
        constraint SYS_C00152321
            check ("JOB_CRON" IS NOT NULL)
        constraint SYS_C009469
            check ("JOB_CRON" IS NOT NULL)
)
    ;

comment on table XXL_JOB_INFO is '调度扩展信息表'
;

comment on column XXL_JOB_INFO.JOB_GROUP is '执行器主键ID'
;

comment on column XXL_JOB_INFO.AUTHOR is '作者'
;

comment on column XXL_JOB_INFO.ALARM_EMAIL is '报警邮件'
;

comment on column XXL_JOB_INFO.SCHEDULE_TYPE is '调度类型'
;

comment on column XXL_JOB_INFO.SCHEDULE_CONF is '调度配置，值含义取决于调度类型'
;

comment on column XXL_JOB_INFO.MISFIRE_STRATEGY is '调度过期策略'
;

comment on column XXL_JOB_INFO.EXECUTOR_ROUTE_STRATEGY is '执行器路由策略'
;

comment on column XXL_JOB_INFO.EXECUTOR_HANDLER is '执行器任务handler'
;

comment on column XXL_JOB_INFO.EXECUTOR_PARAM is '执行器任务参数'
;

comment on column XXL_JOB_INFO.EXECUTOR_BLOCK_STRATEGY is '阻塞处理策略'
;

comment on column XXL_JOB_INFO.EXECUTOR_TIMEOUT is '任务执行超时时间，单位秒'
;

comment on column XXL_JOB_INFO.EXECUTOR_FAIL_RETRY_COUNT is '失败重试次数'
;

comment on column XXL_JOB_INFO.GLUE_TYPE is 'GLUE类型'
;

comment on column XXL_JOB_INFO.GLUE_SOURCE is 'GLUE源代码'
;

comment on column XXL_JOB_INFO.GLUE_REMARK is 'GLUE备注'
;

comment on column XXL_JOB_INFO.GLUE_UPDATETIME is 'GLUE更新时间'
;

comment on column XXL_JOB_INFO.CHILD_JOBID is '子任务ID，多个逗号分隔'
;

comment on column XXL_JOB_INFO.TRIGGER_STATUS is '调度状态：0-停止，1-运行'
;

comment on column XXL_JOB_INFO.TRIGGER_LAST_TIME is '上次调度时间'
;

comment on column XXL_JOB_INFO.TRIGGER_NEXT_TIME is '下次调度时间'
;

comment on column XXL_JOB_INFO.JOB_CRON is '任务执行CRON'
;

create table XXL_JOB_GROUP
(
    ID           NUMBER(11)            not null
        constraint SYS_C009457
            primary key
        constraint SYS_C0014835
            check ("ID" IS NOT NULL)
        constraint SYS_C00152322
            check ("ID" IS NOT NULL)
        constraint SYS_C009453
            check ("ID" IS NOT NULL),
    APP_NAME     VARCHAR2(64)          not null
        constraint SYS_C0014836
            check ("APP_NAME" IS NOT NULL)
        constraint SYS_C00152323
            check ("APP_NAME" IS NOT NULL)
        constraint SYS_C009454
            check ("APP_NAME" IS NOT NULL),
    TITLE        VARCHAR2(30)          not null
        constraint SYS_C0014837
            check ("TITLE" IS NOT NULL)
        constraint SYS_C00152324
            check ("TITLE" IS NOT NULL)
        constraint SYS_C009455
            check ("TITLE" IS NOT NULL),
    ADDRESS_TYPE NUMBER(4) default '0' not null
        constraint SYS_C0014838
            check ("ADDRESS_TYPE" IS NOT NULL)
        constraint SYS_C00152325
            check ("ADDRESS_TYPE" IS NOT NULL)
        constraint SYS_C009456
            check ("ADDRESS_TYPE" IS NOT NULL),
    ADDRESS_LIST VARCHAR2(100),
    UPDATE_TIME  TIMESTAMP(6),
    SORT         NUMBER(4)
)
    ;

comment on table XXL_JOB_GROUP is '执行器信息表'
;

comment on column XXL_JOB_GROUP.APP_NAME is '执行器AppName'
;

comment on column XXL_JOB_GROUP.TITLE is '执行器名称'
;

comment on column XXL_JOB_GROUP.ADDRESS_TYPE is '执行器地址类型：0=自动注册、1=手动录入'
;

comment on column XXL_JOB_GROUP.ADDRESS_LIST is '执行器地址列表，多地址逗号分隔'
;


create table TB_SYNC_USER_HISTORY
(
    ID        VARCHAR2(50) not null
        constraint SYS_C009382
            unique
        constraint SYS_C0014819
            check ("ID" IS NOT NULL)
        constraint SYS_C00166531
            check ("ID" IS NOT NULL)
        constraint SYS_C009381
            check ("ID" IS NOT NULL),
    APP_ID    VARCHAR2(50),
    APP_CODE  VARCHAR2(100),
    APP_NAME  VARCHAR2(100),
    SYNC_TIME TIMESTAMP(6),
    REMARK    VARCHAR2(100),
    APP_ADMIN VARCHAR2(100)
)
    ;

comment on table TB_SYNC_USER_HISTORY is '应用同步用户记录表'
;

comment on column TB_SYNC_USER_HISTORY.APP_ID is '应用id'
;

comment on column TB_SYNC_USER_HISTORY.APP_CODE is '应用英文名'
;

comment on column TB_SYNC_USER_HISTORY.APP_NAME is '应用中文名'
;

comment on column TB_SYNC_USER_HISTORY.SYNC_TIME is '同步时间'
;

comment on column TB_SYNC_USER_HISTORY.REMARK is '备注'
;

comment on column TB_SYNC_USER_HISTORY.APP_ADMIN is '应用管理员'
;

create table TB_DATASOURCE_CONF
(
    ID                 NUMBER(20) not null
        constraint SYS_C009325
            primary key
        constraint SYS_C0014778
            check ("ID" IS NOT NULL)
        constraint SYS_C00155912
            check ("ID" IS NOT NULL)
        constraint SYS_C0020267
            check ("ID" IS NOT NULL)
        constraint SYS_C009323
            check ("ID" IS NOT NULL),
    SERVICE_TYPE       VARCHAR2(30),
    SERVICE_ID         VARCHAR2(64),
    DEFAULT_SERVICE_ID VARCHAR2(64),
    CONFIG_NAME        VARCHAR2(50),
    CONFIG_DESC        VARCHAR2(255),
    SOURCE_TYPE        NUMBER(1),
    SORT_NO            NUMBER(11),
    APP_ENV            VARCHAR2(500),
    REC_CREATOR        VARCHAR2(50),
    REC_CREATE_TIME    DATE,
    REC_REVISOR        VARCHAR2(50),
    REC_REVISE_TIME    DATE,
    ARCHIVE_FLAG       NUMBER(11),
    CREATE_USER        VARCHAR2(50),
    CREATE_DEPT        VARCHAR2(50),
    CREATE_TIME        DATE,
    UPDATE_USER        VARCHAR2(50),
    UPDATE_TIME        DATE,
    STATUS             NUMBER(1),
    IS_DELETED         NUMBER(1)  not null
        constraint SYS_C0014779
            check ("IS_DELETED" IS NOT NULL)
        constraint SYS_C00155913
            check ("IS_DELETED" IS NOT NULL)
        constraint SYS_C0020270
            check ("IS_DELETED" IS NOT NULL)
        constraint SYS_C009324
            check ("IS_DELETED" IS NOT NULL)
)
    ;

comment on column TB_DATASOURCE_CONF.ID is '配置标识'
;

comment on column TB_DATASOURCE_CONF.SERVICE_TYPE is '服务类型'
;

comment on column TB_DATASOURCE_CONF.SERVICE_ID is '服务标识'
;

comment on column TB_DATASOURCE_CONF.DEFAULT_SERVICE_ID is '默认服务标识'
;

comment on column TB_DATASOURCE_CONF.CONFIG_NAME is '配置名称'
;

comment on column TB_DATASOURCE_CONF.CONFIG_DESC is '配置描述'
;

comment on column TB_DATASOURCE_CONF.SOURCE_TYPE is '来源类型1：信息资源2：数典'
;

comment on column TB_DATASOURCE_CONF.SORT_NO is '排序字段'
;

comment on column TB_DATASOURCE_CONF.APP_ENV is '应用环境'
;

comment on column TB_DATASOURCE_CONF.REC_CREATOR is '记录创建人'
;

comment on column TB_DATASOURCE_CONF.REC_CREATE_TIME is '记录创建时间'
;

comment on column TB_DATASOURCE_CONF.REC_REVISOR is '记录修改人'
;

comment on column TB_DATASOURCE_CONF.REC_REVISE_TIME is '记录修改时间'
;

comment on column TB_DATASOURCE_CONF.ARCHIVE_FLAG is '归档标识'
;


create table TB_CONFIG_ADMIN
(
    ID             VARCHAR2(50),
    CONFIG_NAME    VARCHAR2(100),
    CONFIG_TYPE    NUMBER,
    CONFIG_DESC    VARCHAR2(100),
    SERVICE_TYPE   VARCHAR2(100),
    CONFIG_CONTENT VARCHAR2(100),
    STEP_NAME      VARCHAR2(100),
    CONFIG_STATE   NUMBER,
    CREATE_NAME    VARCHAR2(50) not null
        constraint SYS_C0014777
            check ("CREATE_NAME" IS NOT NULL)
        constraint SYS_C00157491
            check ("CREATE_NAME" IS NOT NULL)
        constraint SYS_C009322
            check ("CREATE_NAME" IS NOT NULL),
    CREATE_TIME    DATE,
    UPDATE_NAME    VARCHAR2(50),
    UPDATE_TIME    DATE
)
    ;

comment on table TB_CONFIG_ADMIN is '配置管理表'
;

comment on column TB_CONFIG_ADMIN.ID is 'id'
;

comment on column TB_CONFIG_ADMIN.CONFIG_NAME is '配置名称'
;

comment on column TB_CONFIG_ADMIN.CONFIG_TYPE is '配置类型:普通类型0,开关类型1'
;

comment on column TB_CONFIG_ADMIN.CONFIG_DESC is '配置描述'
;

comment on column TB_CONFIG_ADMIN.SERVICE_TYPE is '服务类型'
;

comment on column TB_CONFIG_ADMIN.CONFIG_CONTENT is '配置内容'
;

comment on column TB_CONFIG_ADMIN.STEP_NAME is '步骤名称'
;

comment on column TB_CONFIG_ADMIN.CONFIG_STATE is '配置状态:0正常1删除'
;

comment on column TB_CONFIG_ADMIN.CREATE_NAME is '记录创建人'
;

comment on column TB_CONFIG_ADMIN.CREATE_TIME is '记录创建时间'
;

comment on column TB_CONFIG_ADMIN.UPDATE_NAME is '记录修改人'
;

comment on column TB_CONFIG_ADMIN.UPDATE_TIME is '记录修改时间'
;

create table TB_AUTHENTICATION_RECORD
(
    ID             NUMBER(20)          not null
        constraint SYS_C009321
            primary key
        constraint SYS_C0014771
            check ("ID" IS NOT NULL)
        constraint SYS_C00149962
            check ("ID" IS NOT NULL)
        constraint SYS_C009315
            check ("ID" IS NOT NULL),
    APPLY_APP_USER VARCHAR2(20)        not null
        constraint SYS_C0014772
            check ("APPLY_APP_USER" IS NOT NULL)
        constraint SYS_C00149966
            check ("APPLY_APP_USER" IS NOT NULL)
        constraint SYS_C009316
            check ("APPLY_APP_USER" IS NOT NULL),
    APPLY_APP_ID   NUMBER(20)          not null
        constraint SYS_C0014773
            check ("APPLY_APP_ID" IS NOT NULL)
        constraint SYS_C00149967
            check ("APPLY_APP_ID" IS NOT NULL)
        constraint SYS_C009317
            check ("APPLY_APP_ID" IS NOT NULL),
    APPLY_TIME     DATE                not null
        constraint SYS_C0014774
            check ("APPLY_TIME" IS NOT NULL)
        constraint SYS_C00149968
            check ("APPLY_TIME" IS NOT NULL)
        constraint SYS_C009318
            check ("APPLY_TIME" IS NOT NULL),
    SERVICE_ID     NUMBER(20)          not null
        constraint SYS_C0014775
            check ("SERVICE_ID" IS NOT NULL)
        constraint SYS_C00149969
            check ("SERVICE_ID" IS NOT NULL)
        constraint SYS_C009319
            check ("SERVICE_ID" IS NOT NULL),
    AUDIT_USER     VARCHAR2(20),
    AUDIT_TIME     DATE,
    AUDIT_OPINION  NVARCHAR2(500),
    STATUS         NUMBER(1) default 0 not null
        constraint SYS_C0014776
            check ("STATUS" IS NOT NULL)
        constraint SYS_C00149970
            check ("STATUS" IS NOT NULL)
        constraint SYS_C009320
            check ("STATUS" IS NOT NULL),
    CREATE_TIME    DATE,
    UPDATE_TIME    DATE,
    IS_DELETED     NUMBER(1) default 0,
    APPLY_REASON   VARCHAR2(255),
    FOLDER_ID      NUMBER,
    IS_PASS        NUMBER(1)
)
    ;

comment on table TB_AUTHENTICATION_RECORD is '鉴权记录表'
;

comment on column TB_AUTHENTICATION_RECORD.ID is '主键'
;

comment on column TB_AUTHENTICATION_RECORD.APPLY_APP_USER is '申请人'
;

comment on column TB_AUTHENTICATION_RECORD.APPLY_APP_ID is '申请方应用id'
;

comment on column TB_AUTHENTICATION_RECORD.APPLY_TIME is '申请时间'
;

comment on column TB_AUTHENTICATION_RECORD.SERVICE_ID is '服务id'
;

comment on column TB_AUTHENTICATION_RECORD.AUDIT_USER is '审批人'
;

comment on column TB_AUTHENTICATION_RECORD.AUDIT_TIME is '审批时间'
;

comment on column TB_AUTHENTICATION_RECORD.AUDIT_OPINION is '审批意见'
;

comment on column TB_AUTHENTICATION_RECORD.STATUS is '是否审批(0 未审批,1 已审批)'
;

comment on column TB_AUTHENTICATION_RECORD.CREATE_TIME is '创建时间'
;

comment on column TB_AUTHENTICATION_RECORD.UPDATE_TIME is '修改时间'
;

comment on column TB_AUTHENTICATION_RECORD.IS_DELETED is '逻辑删除：0-未删除；1-已删除'
;

comment on column TB_AUTHENTICATION_RECORD.APPLY_REASON is '申请原因'
;

comment on column TB_AUTHENTICATION_RECORD.FOLDER_ID is '文件夹id'
;

comment on column TB_AUTHENTICATION_RECORD.IS_PASS is '是否通过(0 通过 1 拒绝 )'
;

create table T_WORKFLOW_TIMEOUT_NOTICE
(
    ID                  NUMBER(20)       not null
        constraint T_WORKFLOW_TIMEOUT_NOTICE_PK
            primary key
        constraint SYS_C0013559
            check ("ID" IS NOT NULL)
        constraint SYS_C0014747
            check ("ID" IS NOT NULL),
    PROCESS_INSTANCE_ID VARCHAR2(100),
    TASK_ID             VARCHAR2(100),
    DURATION            NUMBER(20),
    CREATE_TIME         TIMESTAMP(6),
    NOTICE_TIME         TIMESTAMP(6),
    NOTICE_USER         VARCHAR2(5000),
    TENANT_ID           NVARCHAR2(255),
    NOTICE_COUNT        NUMBER default 0 not null
        constraint SYS_C0013614
            check ("NOTICE_COUNT" IS NOT NULL)
        constraint SYS_C0014748
            check ("NOTICE_COUNT" IS NOT NULL)
)
    ;

comment on table T_WORKFLOW_TIMEOUT_NOTICE is '工作流超时提醒表'
;

comment on column T_WORKFLOW_TIMEOUT_NOTICE.PROCESS_INSTANCE_ID is '流程实例id'
;

comment on column T_WORKFLOW_TIMEOUT_NOTICE.TASK_ID is '任务id'
;

comment on column T_WORKFLOW_TIMEOUT_NOTICE.DURATION is '过多久提醒（毫秒）'
;

comment on column T_WORKFLOW_TIMEOUT_NOTICE.CREATE_TIME is '创建时间'
;

comment on column T_WORKFLOW_TIMEOUT_NOTICE.NOTICE_TIME is '提醒触发时间点'
;

comment on column T_WORKFLOW_TIMEOUT_NOTICE.NOTICE_USER is '通知人，存用户id，多个逗号分割'
;

comment on column T_WORKFLOW_TIMEOUT_NOTICE.NOTICE_COUNT is '已发送通知次数'
;

create table T_WF_PROCESS_PUBLISH
(
    ID             NUMBER(20) not null
        constraint SYS_C0010820
            primary key
        constraint SYS_C0010819
            check ("ID" IS NOT NULL)
        constraint SYS_C0014746
            check ("ID" IS NOT NULL),
    APPLY_TYPE     VARCHAR2(200),
    SYSTEM_NAME    VARCHAR2(200),
    PROCESS_INS_ID VARCHAR2(64),
    PROCESS_DEF_ID VARCHAR2(64),
    STATUS         NUMBER(11),
    CURRENT_NODE   VARCHAR2(64),
    CREATE_USER    NUMBER(20),
    IS_DELETED     VARCHAR2(200),
    CREATE_TIME    DATE
)
    ;

comment on table T_WF_PROCESS_PUBLISH is '应用发布申请管理'
;

comment on column T_WF_PROCESS_PUBLISH.ID is 'ID'
;

comment on column T_WF_PROCESS_PUBLISH.APPLY_TYPE is '类型'
;

comment on column T_WF_PROCESS_PUBLISH.SYSTEM_NAME is '应用发布标题'
;

comment on column T_WF_PROCESS_PUBLISH.PROCESS_INS_ID is '流程实例ID'
;

comment on column T_WF_PROCESS_PUBLISH.PROCESS_DEF_ID is '流程定义id'
;

comment on column T_WF_PROCESS_PUBLISH.STATUS is '状态'
;

comment on column T_WF_PROCESS_PUBLISH.CURRENT_NODE is '当前节点'
;

comment on column T_WF_PROCESS_PUBLISH.CREATE_USER is '创建人'
;

comment on column T_WF_PROCESS_PUBLISH.IS_DELETED is '是否已删除'
;

comment on column T_WF_PROCESS_PUBLISH.CREATE_TIME is '创建时间'
;


create table T_UNIFIES_TODO
(
    ID            NUMBER(20) not null
        constraint SYS_C0013969
            primary key
        constraint SYS_C0013968
            check ("ID" IS NOT NULL)
        constraint SYS_C0014744
            check ("ID" IS NOT NULL),
    TITLE         VARCHAR2(255),
    START_TIME    DATE,
    START_NAME    VARCHAR2(20),
    EXAMINE_NAME  VARCHAR2(20),
    TYPE          NUMBER(1),
    IS_SKIP       NUMBER(1),
    SKIP_URL      VARCHAR2(255),
    TODO_START    NUMBER(1),
    FLOWABLE_ID   VARCHAR2(255),
    TASK_ID       VARCHAR2(100),
    TASK_NAME     VARCHAR2(50),
    TODO_TAG      VARCHAR2(100),
    APP_SOURCE    VARCHAR2(50),
    END_DATE      DATE,
    APPROVERS     VARCHAR2(1000),
    PRIORITY      NUMBER(1),
    EXAMINE_TIME  DATE,
    START_USER    VARCHAR2(20),
    SERIAL_NUMBER VARCHAR2(100)
)
    ;

comment on column T_UNIFIES_TODO.ID is '主键'
;

comment on column T_UNIFIES_TODO.TITLE is '待办标题'
;

comment on column T_UNIFIES_TODO.START_TIME is '发起时间'
;

comment on column T_UNIFIES_TODO.START_NAME is '发起人工号'
;

comment on column T_UNIFIES_TODO.EXAMINE_NAME is '授理人工号'
;

comment on column T_UNIFIES_TODO.TYPE is '待办类型(0:应用登记审核，1:项目登记审核,2:服务上架审批3第三方应用)'
;

comment on column T_UNIFIES_TODO.IS_SKIP is '是否需要跳转0:false,1:true'
;

comment on column T_UNIFIES_TODO.SKIP_URL is '跳转链接'
;

comment on column T_UNIFIES_TODO.TODO_START is '待办状态1已办，2未办，3撤销'
;

comment on column T_UNIFIES_TODO.FLOWABLE_ID is '工作流id'
;

comment on column T_UNIFIES_TODO.TASK_ID is '任务id'
;

comment on column T_UNIFIES_TODO.TASK_NAME is '节点名称'
;

comment on column T_UNIFIES_TODO.TODO_TAG is '待办标识'
;

comment on column T_UNIFIES_TODO.APP_SOURCE is '来源应用'
;

comment on column T_UNIFIES_TODO.END_DATE is '办结期限'
;

comment on column T_UNIFIES_TODO.APPROVERS is '审批人工号列表'
;

comment on column T_UNIFIES_TODO.PRIORITY is '优先级1高，2中，3低'
;

comment on column T_UNIFIES_TODO.EXAMINE_TIME is '办理时间'
;

comment on column T_UNIFIES_TODO.START_USER is '发起人姓名'
;

comment on column T_UNIFIES_TODO.SERIAL_NUMBER is '流水号'
;

create table T_TOP_MENU
(
    ID          NUMBER(20) not null
        constraint SYS_C009442
            primary key
        constraint SYS_C00150020
            check ("ID" IS NOT NULL)
        constraint SYS_C009441
            check ("ID" IS NOT NULL),
    CODE        NVARCHAR2(255),
    NAME        NVARCHAR2(255),
    SOURCE      NVARCHAR2(255),
    SORT        NUMBER(11),
    IS_DEFAULT  NUMBER(11) default 0,
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NUMBER(11),
    IS_DELETED  NUMBER(11) default 0
)
    ;

comment on table T_TOP_MENU is '顶部菜单表'
;

comment on column T_TOP_MENU.ID is '主键'
;

comment on column T_TOP_MENU.CODE is '顶部菜单编号'
;

comment on column T_TOP_MENU.NAME is '顶部菜单名'
;

comment on column T_TOP_MENU.SOURCE is '顶部菜单资源'
;

comment on column T_TOP_MENU.SORT is '顶部菜单排序'
;

comment on column T_TOP_MENU.IS_DEFAULT is '默认菜单'
;

comment on column T_TOP_MENU.CREATE_USER is '创建人'
;

comment on column T_TOP_MENU.CREATE_DEPT is '创建部门'
;

comment on column T_TOP_MENU.CREATE_TIME is '创建时间'
;

comment on column T_TOP_MENU.UPDATE_USER is '修改人'
;

comment on column T_TOP_MENU.UPDATE_TIME is '修改时间'
;

comment on column T_TOP_MENU.STATUS is '状态'
;

comment on column T_TOP_MENU.IS_DELETED is '是否已删除'
;

create table T_TENANT
(
    ID             NUMBER(19)        not null
        constraint SYS_C0013364
            primary key
        constraint SYS_C0013362
            check ("ID" IS NOT NULL)
        constraint SYS_C0014741
            check ("ID" IS NOT NULL)
        constraint SYS_C008755
            check ("ID" IS NOT NULL)
        constraint SYS_C008763
            check ("ID" IS NOT NULL),
    TENANT_ID      VARCHAR2(12 char) default '000000',
    TENANT_NAME    VARCHAR2(50 char) not null
        constraint SYS_C0013363
            check ("TENANT_NAME" IS NOT NULL)
        constraint SYS_C0014742
            check ("TENANT_NAME" IS NOT NULL)
        constraint SYS_C008756
            check ("TENANT_NAME" IS NOT NULL)
        constraint SYS_C008764
            check ("TENANT_NAME" IS NOT NULL),
    DOMAIN_URL     VARCHAR2(255 char),
    BACKGROUND_URL VARCHAR2(1000 char),
    LINKMAN        VARCHAR2(20 char),
    CONTACT_NUMBER VARCHAR2(20 char),
    ADDRESS        VARCHAR2(255 char),
    ACCOUNT_NUMBER NUMBER            default -1,
    EXPIRE_TIME    TIMESTAMP(6),
    PACKAGE_ID     NUMBER(19),
    DATASOURCE_ID  NUMBER(19),
    LICENSE_KEY    VARCHAR2(1000 char),
    CREATE_USER    NUMBER(19),
    CREATE_DEPT    NUMBER(19),
    CREATE_TIME    TIMESTAMP(6),
    UPDATE_USER    NUMBER(19),
    UPDATE_TIME    TIMESTAMP(6),
    STATUS         NUMBER,
    IS_DELETED     NUMBER            default 0
)
    ;

comment on table T_TENANT is '租户表'
;

comment on column T_TENANT.ID is '主键'
;

comment on column T_TENANT.TENANT_ID is '租户ID'
;

comment on column T_TENANT.TENANT_NAME is '租户名称'
;

comment on column T_TENANT.DOMAIN_URL is '域名地址'
;

comment on column T_TENANT.BACKGROUND_URL is '系统背景'
;

comment on column T_TENANT.LINKMAN is '联系人'
;

comment on column T_TENANT.CONTACT_NUMBER is '联系电话'
;

comment on column T_TENANT.ADDRESS is '联系地址'
;

comment on column T_TENANT.ACCOUNT_NUMBER is '账号额度'
;

comment on column T_TENANT.EXPIRE_TIME is '过期时间'
;

comment on column T_TENANT.PACKAGE_ID is '产品包ID'
;

comment on column T_TENANT.DATASOURCE_ID is '数据源ID'
;

comment on column T_TENANT.LICENSE_KEY is '授权码'
;

comment on column T_TENANT.CREATE_USER is '创建人'
;

comment on column T_TENANT.CREATE_DEPT is '创建部门'
;

comment on column T_TENANT.CREATE_TIME is '创建时间'
;

comment on column T_TENANT.UPDATE_USER is '修改人'
;

comment on column T_TENANT.UPDATE_TIME is '修改时间'
;

comment on column T_TENANT.STATUS is '状态'
;

comment on column T_TENANT.IS_DELETED is '是否已删除'
;

create table T_TAG
(
    ID         NUMBER(20) not null
        constraint SYS_C009440
            primary key
        constraint SYS_C0014740
            check ("ID" IS NOT NULL)
        constraint SYS_C00155538
            check ("ID" IS NOT NULL)
        constraint SYS_C009439
            check ("ID" IS NOT NULL),
    PARENT_ID  NUMBER(20),
    TAG_NAME   NVARCHAR2(100),
    CUR_NODE   NVARCHAR2(100),
    TAG_DESC   NVARCHAR2(200),
    TAG_GRAIN  NUMBER,
    IS_ACTIVE  NUMBER,
    UPDATED_AT DATE,
    CREATED_AT DATE,
    ROOT_ID    NUMBER(20),
    IS_DELETED NUMBER(1) default 0
)
    ;

comment on table T_TAG is '标签表'
;

comment on column T_TAG.ID is 'id'
;

comment on column T_TAG.PARENT_ID is '父级id'
;

comment on column T_TAG.TAG_NAME is '标签名称'
;

comment on column T_TAG.CUR_NODE is '编码-等级'
;

comment on column T_TAG.TAG_DESC is '标签描述'
;

comment on column T_TAG.TAG_GRAIN is '等级'
;

comment on column T_TAG.IS_ACTIVE is '状态：0-正常，1-禁用'
;

comment on column T_TAG.UPDATED_AT is '更新时间'
;

comment on column T_TAG.CREATED_AT is '创建时间'
;

comment on column T_TAG.ROOT_ID is '根节点id'
;

comment on column T_TAG.IS_DELETED is '逻辑删除：0-未删除；1-已删除'
;

create table T_SYSTEM_SUGGESTION
(
    FILE_URL       VARCHAR2(500),
    CONTACT_NUMBER NUMBER,
    STATUS         NUMBER default 0,
    ID             VARCHAR2(255) not null
        constraint SYS_C0010865
            check ("ID" IS NOT NULL)
        constraint SYS_C0014736
            check ("ID" IS NOT NULL),
    CREATE_TIME    VARCHAR2(255),
    SUGGESTION     NCLOB
)
    ;

comment on table T_SYSTEM_SUGGESTION is '系统建议表'
;

comment on column T_SYSTEM_SUGGESTION.FILE_URL is '文件路径'
;

comment on column T_SYSTEM_SUGGESTION.CONTACT_NUMBER is '联系电话'
;

comment on column T_SYSTEM_SUGGESTION.STATUS is '处理状态0未处理;1已处理'
;

comment on column T_SYSTEM_SUGGESTION.CREATE_TIME is '创建时间'
;

comment on column T_SYSTEM_SUGGESTION.SUGGESTION is '问题及建议'
;

create table T_SYS_USER
(
    ID                   NUMBER                    not null
        constraint SYS_C00158424
            check ("ID" IS NOT NULL)
        constraint SYS_C009437
            check ("ID" IS NOT NULL),
    DEPT_ID              NUMBER(20),
    USERNAME             NVARCHAR2(100),
    PASSWORD             NVARCHAR2(100),
    NAME                 NVARCHAR2(100),
    MOBILE               NVARCHAR2(100),
    EMAIL                NVARCHAR2(100),
    AVATAR               NVARCHAR2(200),
    ADDRESS              NVARCHAR2(200),
    STATE                NUMBER(11)                not null
        constraint SYS_C00158425
            check ("STATE" IS NOT NULL)
        constraint SYS_C009438
            check ("STATE" IS NOT NULL),
    TYPE                 NUMBER(11),
    CODE                 NVARCHAR2(100),
    COMPANY              NVARCHAR2(100),
    PROVINCE             NVARCHAR2(100),
    CITY                 NVARCHAR2(100),
    EXT_TYPE             NVARCHAR2(100),
    EXT_DEPT             NVARCHAR2(100),
    EXT_CODE             NVARCHAR2(100),
    EXT_CODE_HS          NVARCHAR2(100),
    EXT_CODE_GH          NVARCHAR2(100),
    EXT_CODE_GJ          NVARCHAR2(100),
    EXT_CODE_GK          NVARCHAR2(100),
    EXT_DDBB             NVARCHAR2(100),
    UPDATED_AT           DATE,
    CREATED_AT           DATE,
    PASSWORD_WRONG_TIMES NUMBER(11),
    LAST_LOGIN_DATE      DATE,
    EXT_UNIT_ID          NUMBER(11),
    EXT_MEMO             NCLOB,
    JOB                  NVARCHAR2(40),
    IS_QDPORT_USER       VARCHAR2(10) default '99' not null,
    LAST_UPDATE_PWD_DATE DATE
)
    ;

comment on table T_SYS_USER is '系统管理-用户表'
;

comment on column T_SYS_USER.ID is 'id'
;

comment on column T_SYS_USER.DEPT_ID is '所属部门表id'
;

comment on column T_SYS_USER.USERNAME is '用户名'
;

comment on column T_SYS_USER.PASSWORD is '密码'
;

comment on column T_SYS_USER.NAME is '姓名'
;

comment on column T_SYS_USER.MOBILE is '手机号'
;

comment on column T_SYS_USER.EMAIL is '邮箱'
;

comment on column T_SYS_USER.AVATAR is '头像地址'
;

comment on column T_SYS_USER.ADDRESS is '地址'
;

comment on column T_SYS_USER.STATE is '状态：0-正常，1-禁用'
;

comment on column T_SYS_USER.TYPE is '用户类型'
;

comment on column T_SYS_USER.CODE is '用户代码'
;

comment on column T_SYS_USER.COMPANY is '用户单位'
;

comment on column T_SYS_USER.PROVINCE is '省份'
;

comment on column T_SYS_USER.CITY is '城市'
;

comment on column T_SYS_USER.EXT_TYPE is '用户类型（cz 场站,cd 车队,mt 码头,pt 平台,ys演示,zh综合）'
;

comment on column T_SYS_USER.EXT_DEPT is '业务部门(申报员证书编号)'
;

comment on column T_SYS_USER.EXT_CODE is '特殊代码'
;

comment on column T_SYS_USER.EXT_CODE_HS is '海事特殊代码'
;

comment on column T_SYS_USER.EXT_CODE_GH is '港航特殊代码'
;

comment on column T_SYS_USER.EXT_CODE_GJ is '国检特殊代码'
;

comment on column T_SYS_USER.EXT_CODE_GK is '港口特殊代码'
;

comment on column T_SYS_USER.EXT_DDBB is '四班调度班别'
;

comment on column T_SYS_USER.UPDATED_AT is '更新时间'
;

comment on column T_SYS_USER.CREATED_AT is '创建时间'
;

comment on column T_SYS_USER.PASSWORD_WRONG_TIMES is '密码错误次数'
;

comment on column T_SYS_USER.LAST_LOGIN_DATE is '最后登录时间'
;

comment on column T_SYS_USER.EXT_UNIT_ID is '单位代码'
;

comment on column T_SYS_USER.EXT_MEMO is '用户印章(base64)'
;

comment on column T_SYS_USER.JOB is '岗位'
;

comment on column T_SYS_USER.IS_QDPORT_USER is '是否青岛港人员 (0：板块人员，2：青岛港人员，99：其他)'
;

comment on column T_SYS_USER.LAST_UPDATE_PWD_DATE is '密码最后修改时间'
;

create table T_SYS_ROLE
(
    ID          NUMBER(20) not null
        constraint SYS_C009436
            primary key
        constraint SYS_C00149877
            check ("ID" IS NOT NULL)
        constraint SYS_C009435
            check ("ID" IS NOT NULL),
    NAME        NVARCHAR2(100),
    CODE        NVARCHAR2(100),
    DESCRIPTION NVARCHAR2(100),
    SORT        NUMBER(11),
    STATE       NUMBER(11),
    UPDATED_AT  DATE,
    CREATED_AT  DATE,
    IS_SHOW     NUMBER(11)
)
    ;

comment on table T_SYS_ROLE is '系统管理-角色表'
;

comment on column T_SYS_ROLE.ID is 'id'
;

comment on column T_SYS_ROLE.NAME is '角色名称'
;

comment on column T_SYS_ROLE.CODE is '角色代码'
;

comment on column T_SYS_ROLE.DESCRIPTION is '角色描述'
;

comment on column T_SYS_ROLE.SORT is '排序'
;

comment on column T_SYS_ROLE.STATE is '状态：0-正常，1-禁用'
;

comment on column T_SYS_ROLE.UPDATED_AT is '更新时间'
;

comment on column T_SYS_ROLE.CREATED_AT is '创建时间'
;

comment on column T_SYS_ROLE.IS_SHOW is '是否显示，0：不显示，1：显示'
;

create table T_SYS_PORT_AREA
(
    ID             VARCHAR2(20)  not null
        constraint SYS_C0014155
            primary key
        constraint SYS_C0014734
            check ("ID" IS NOT NULL),
    PORT_AREA_CODE VARCHAR2(255) not null
        constraint SYS_C0014154
            check ("PORT_AREA_CODE" IS NOT NULL)
        constraint SYS_C0014735
            check ("PORT_AREA_CODE" IS NOT NULL),
    PORT_AREA_NAME VARCHAR2(255)
)
    ;

comment on table T_SYS_PORT_AREA is '港区表'
;

comment on column T_SYS_PORT_AREA.ID is '主键'
;

comment on column T_SYS_PORT_AREA.PORT_AREA_CODE is '港区代码'
;

comment on column T_SYS_PORT_AREA.PORT_AREA_NAME is '港区名称'
;

create table T_SYS_PART_JOB
(
    USER_ID NUMBER(20),
    DEPT_ID NUMBER(20)
)
    ;

comment on table T_SYS_PART_JOB is '兼职表'
;

comment on column T_SYS_PART_JOB.USER_ID is '用户id'
;

comment on column T_SYS_PART_JOB.DEPT_ID is '部门id'
;

create table T_SYS_MENU
(
    ID          NUMBER(20) not null
        constraint SYS_C009434
            primary key
        constraint SYS_C00150999
            check ("ID" IS NOT NULL)
        constraint SYS_C009433
            check ("ID" IS NOT NULL),
    PARENT_ID   NUMBER(20),
    NAME        NVARCHAR2(100),
    CODE        NVARCHAR2(100),
    ICON        NVARCHAR2(100),
    PATH        NVARCHAR2(100),
    DESCRIPTION NVARCHAR2(100),
    TYPE        NUMBER(11),
    SORT        NUMBER(11),
    SYSTEM_CODE NVARCHAR2(255),
    STATE       NUMBER(11),
    UPDATED_AT  DATE,
    CREATED_AT  DATE,
    MENU_TYPE   NUMBER(11)
)
    ;

comment on table T_SYS_MENU is '系统管理-功能菜单表'
;

comment on column T_SYS_MENU.ID is 'id'
;

comment on column T_SYS_MENU.PARENT_ID is '所属菜单id'
;

comment on column T_SYS_MENU.NAME is '菜单名称'
;

comment on column T_SYS_MENU.CODE is '菜单代码'
;

comment on column T_SYS_MENU.ICON is '菜单图标'
;

comment on column T_SYS_MENU.PATH is '菜单路径'
;

comment on column T_SYS_MENU.DESCRIPTION is '菜单描述'
;

comment on column T_SYS_MENU.TYPE is '菜单类型：1-菜单，2-按钮'
;

comment on column T_SYS_MENU.SORT is '排序'
;

comment on column T_SYS_MENU.SYSTEM_CODE is '系统编号'
;

comment on column T_SYS_MENU.STATE is '状态：0-正常，1-禁用'
;

comment on column T_SYS_MENU.UPDATED_AT is '更新时间'
;

comment on column T_SYS_MENU.CREATED_AT is '创建时间'
;

comment on column T_SYS_MENU.MENU_TYPE is '菜单类型：1-网页菜单，2-APP菜单'
;

create table T_SYS_DEPT
(
    ID          NUMBER(20)       not null
        constraint SYS_C009430
            primary key
        constraint SYS_C00149873
            check ("ID" IS NOT NULL)
        constraint SYS_C009429
            check ("ID" IS NOT NULL),
    PARENT_ID   NUMBER(20),
    NAME        NVARCHAR2(100),
    CODE        NVARCHAR2(100),
    DESCRIPTION NVARCHAR2(200),
    SORT        NUMBER,
    STATE       NUMBER,
    UPDATED_AT  DATE,
    CREATED_AT  DATE,
    ANCESTORS   VARCHAR2(255),
    DEPT_TYPE   NUMBER default 0 not null
        constraint SYS_C0010719
            check ("DEPT_TYPE" IS NOT NULL),
    EX_WECHAT   VARCHAR2(100),
    EX_PORTRAIT VARCHAR2(100),
    EX_GENDER   VARCHAR2(100),
    EX_REGION   VARCHAR2(100),
    EX_PROVINCE VARCHAR2(100)
)
    ;

comment on table T_SYS_DEPT is '系统管理-部门表'
;

comment on column T_SYS_DEPT.ID is 'id'
;

comment on column T_SYS_DEPT.PARENT_ID is '所属部门id'
;

comment on column T_SYS_DEPT.NAME is '部门名称'
;

comment on column T_SYS_DEPT.CODE is '部门代码'
;

comment on column T_SYS_DEPT.DESCRIPTION is '部门描述'
;

comment on column T_SYS_DEPT.SORT is '排序'
;

comment on column T_SYS_DEPT.STATE is '状态：0-正常，1-禁用'
;

comment on column T_SYS_DEPT.UPDATED_AT is '更新时间'
;

comment on column T_SYS_DEPT.CREATED_AT is '创建时间'
;

comment on column T_SYS_DEPT.ANCESTORS is '祖籍'
;

comment on column T_SYS_DEPT.DEPT_TYPE is '部门类型 0部门 1公司'
;

comment on column T_SYS_DEPT.EX_WECHAT is '预留字段5'
;

comment on column T_SYS_DEPT.EX_PORTRAIT is '预留字段4'
;

comment on column T_SYS_DEPT.EX_GENDER is '预留字段3'
;

comment on column T_SYS_DEPT.EX_REGION is '预留字段2'
;

comment on column T_SYS_DEPT.EX_PROVINCE is '预留字段1'
;

create table T_SYNC_USER_CHANGE_HISTORY
(
    ID          VARCHAR2(50)     not null
        constraint SYS_C0010258
            unique
        constraint SYS_C0010255
            check ("ID" IS NOT NULL)
        constraint SYS_C0014728
            check ("ID" IS NOT NULL),
    CHANGE_TYPE NUMBER default 0 not null
        constraint SYS_C0010256
            check ("CHANGE_TYPE" IS NOT NULL)
        constraint SYS_C0014729
            check ("CHANGE_TYPE" IS NOT NULL),
    USERNAME    VARCHAR2(50)     not null
        constraint SYS_C0010257
            check ("USERNAME" IS NOT NULL)
        constraint SYS_C0014730
            check ("USERNAME" IS NOT NULL),
    NAME        VARCHAR2(50),
    CHANGE_TIME TIMESTAMP(6),
    SYNC_TIME   TIMESTAMP(6),
    REMARK      VARCHAR2(500)
)
    ;

comment on table T_SYNC_USER_CHANGE_HISTORY is '同步用户变动表'
;

comment on column T_SYNC_USER_CHANGE_HISTORY.CHANGE_TYPE is '变更类型 0新增 1锁定 2其他变动'
;

comment on column T_SYNC_USER_CHANGE_HISTORY.USERNAME is '用户工号'
;

comment on column T_SYNC_USER_CHANGE_HISTORY.NAME is '姓名'
;

comment on column T_SYNC_USER_CHANGE_HISTORY.CHANGE_TIME is '改变时间'
;

comment on column T_SYNC_USER_CHANGE_HISTORY.SYNC_TIME is '同步时间'
;

comment on column T_SYNC_USER_CHANGE_HISTORY.REMARK is '备注'
;

create table T_SMS
(
    ID          NUMBER(20) not null
        constraint SYS_C0014727
            check ("ID" IS NOT NULL)
        constraint SYS_C00149805
            check ("ID" IS NOT NULL)
        constraint SYS_C0020140
            check ("ID" IS NOT NULL)
        constraint SYS_C009428
            check ("ID" IS NOT NULL),
    TENANT_ID   NVARCHAR2(12),
    CATEGORY    NUMBER(11),
    SMS_CODE    VARCHAR2(12),
    TEMPLATE_ID VARCHAR2(64),
    ACCESS_KEY  NVARCHAR2(255),
    SECRET_KEY  NVARCHAR2(255),
    REGION_ID   NVARCHAR2(255),
    SIGN_NAME   VARCHAR2(64),
    REMARK      NVARCHAR2(255),
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NUMBER(11),
    IS_DELETED  NUMBER(11)
)
    ;

comment on table T_SMS is '短信配置表'
;

comment on column T_SMS.ID is '主键'
;

comment on column T_SMS.TENANT_ID is '租户ID'
;

comment on column T_SMS.CATEGORY is '分类'
;

comment on column T_SMS.SMS_CODE is '资源编号'
;

comment on column T_SMS.TEMPLATE_ID is '模板ID'
;

comment on column T_SMS.ACCESS_KEY is 'accessKey'
;

comment on column T_SMS.SECRET_KEY is 'secretKey'
;

comment on column T_SMS.REGION_ID is 'regionId'
;

comment on column T_SMS.SIGN_NAME is '短信签名'
;

comment on column T_SMS.REMARK is '备注'
;

comment on column T_SMS.CREATE_USER is '创建人'
;

comment on column T_SMS.CREATE_DEPT is '创建部门'
;

comment on column T_SMS.CREATE_TIME is '创建时间'
;

comment on column T_SMS.UPDATE_USER is '修改人'
;

comment on column T_SMS.UPDATE_TIME is '修改时间'
;

comment on column T_SMS.STATUS is '状态'
;

comment on column T_SMS.IS_DELETED is '是否已删除'
;

-- auto-generated definition
create table T_SCOPE_DATA
(
    ID            NUMBER(20) not null
        constraint SYS_C0011059
            primary key
        constraint SYS_C00167861
            check ("ID" IS NOT NULL)
        constraint SYS_C009427
            check ("ID" IS NOT NULL),
    MENU_ID       NUMBER(20),
    RESOURCE_CODE NVARCHAR2(255),
    SCOPE_NAME    NVARCHAR2(255),
    SCOPE_FIELD   NVARCHAR2(255),
    SCOPE_CLASS   NVARCHAR2(500),
    SCOPE_COLUMN  NVARCHAR2(255),
    SCOPE_TYPE    NUMBER(11),
    SCOPE_VALUE   NCLOB,
    REMARK        NVARCHAR2(255),
    CREATE_USER   NUMBER(20),
    CREATE_DEPT   NUMBER(20),
    CREATE_TIME   DATE,
    UPDATE_USER   NUMBER(20),
    UPDATE_TIME   DATE,
    STATUS        NUMBER(11),
    IS_DELETED    NUMBER(11),
    SORT          NUMBER(1)
)
    ;

comment on table T_SCOPE_DATA is '数据权限表'
;

comment on column T_SCOPE_DATA.ID is '主键'
;

comment on column T_SCOPE_DATA.MENU_ID is '菜单主键'
;

comment on column T_SCOPE_DATA.RESOURCE_CODE is '资源编号'
;

comment on column T_SCOPE_DATA.SCOPE_NAME is '数据权限名称'
;

comment on column T_SCOPE_DATA.SCOPE_FIELD is '数据权限字段'
;

comment on column T_SCOPE_DATA.SCOPE_CLASS is '数据权限类名'
;

comment on column T_SCOPE_DATA.SCOPE_COLUMN is '数据权限字段'
;

comment on column T_SCOPE_DATA.SCOPE_TYPE is '数据权限类型(1 全部可见,2 本人可见,3所在机构可见, 4所在机构及子级可见,5自定义)'
;

comment on column T_SCOPE_DATA.SCOPE_VALUE is '数据权限值域'
;

comment on column T_SCOPE_DATA.REMARK is '数据权限备注'
;

comment on column T_SCOPE_DATA.CREATE_USER is '创建人'
;

comment on column T_SCOPE_DATA.CREATE_DEPT is '创建部门'
;

comment on column T_SCOPE_DATA.CREATE_TIME is '创建时间'
;

comment on column T_SCOPE_DATA.UPDATE_USER is '修改人'
;

comment on column T_SCOPE_DATA.UPDATE_TIME is '修改时间'
;

comment on column T_SCOPE_DATA.STATUS is '状态'
;

comment on column T_SCOPE_DATA.IS_DELETED is '是否已删除'
;

comment on column T_SCOPE_DATA.SORT is '排序'
;

create table T_SCOPE_API
(
    ID            NUMBER(20),
    MENU_ID       NUMBER(20),
    SCOPE_NAME    NVARCHAR2(500),
    RESOURCE_CODE NVARCHAR2(500),
    SCOPE_PATH    NVARCHAR2(500),
    SCOPE_TYPE    NUMBER(11),
    REMARK        NVARCHAR2(2000),
    CREATE_USER   NUMBER(20),
    CREATE_DEPT   NUMBER(20),
    CREATE_TIME   DATE,
    UPDATE_TIME   DATE,
    UPDATE_USER   NUMBER(20),
    IS_DELETED    NUMBER(11)
)
    ;

comment on table T_SCOPE_API is '接口权限表'
;

comment on column T_SCOPE_API.ID is '主键'
;

comment on column T_SCOPE_API.MENU_ID is '菜单Id'
;

comment on column T_SCOPE_API.SCOPE_NAME is '权限名称'
;

comment on column T_SCOPE_API.RESOURCE_CODE is '权限编号'
;

comment on column T_SCOPE_API.SCOPE_PATH is '权限路径'
;

comment on column T_SCOPE_API.SCOPE_TYPE is '接口类型(0.业务接口, 1.系统接口)'
;

comment on column T_SCOPE_API.REMARK is '权限备注'
;

comment on column T_SCOPE_API.CREATE_USER is '创建人'
;

comment on column T_SCOPE_API.CREATE_DEPT is '创建部门'
;

comment on column T_SCOPE_API.CREATE_TIME is '创建时间'
;

comment on column T_SCOPE_API.UPDATE_TIME is '修改时间'
;

comment on column T_SCOPE_API.UPDATE_USER is '修改人'
;

comment on column T_SCOPE_API.IS_DELETED is '删除标识'
;

create table T_ROLE_SCOPE
(
    ID             NUMBER(20) not null
        constraint SYS_C00167862
            check ("ID" IS NOT NULL)
        constraint SYS_C009426
            check ("ID" IS NOT NULL),
    SCOPE_CATEGORY NUMBER(11),
    SCOPE_ID       NUMBER(20),
    ROLE_ID        NUMBER(20)
)
    ;

comment on table T_ROLE_SCOPE is '角色数据权限关联表'
;

comment on column T_ROLE_SCOPE.ID is '主键'
;

comment on column T_ROLE_SCOPE.SCOPE_CATEGORY is '权限类型(1:数据权限、2:接口权限)'
;

comment on column T_ROLE_SCOPE.SCOPE_ID is '权限ID'
;

comment on column T_ROLE_SCOPE.ROLE_ID is '角色ID'
;

create table T_POST
(
    ID          NUMBER(20) not null
        constraint SYS_C0014724
            check ("ID" IS NOT NULL)
        constraint SYS_C00163722
            check ("ID" IS NOT NULL)
        constraint SYS_C009425
            check ("ID" IS NOT NULL),
    TENANT_ID   NVARCHAR2(12),
    CATEGORY    NUMBER(11),
    POST_CODE   VARCHAR2(12),
    POST_NAME   VARCHAR2(64),
    SORT        NUMBER(11),
    REMARK      NVARCHAR2(255),
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NUMBER(11),
    IS_DELETED  NUMBER(11)
)
    ;

comment on table T_POST is '岗位表'
;

comment on column T_POST.ID is '主键'
;

comment on column T_POST.TENANT_ID is '租户ID'
;

comment on column T_POST.CATEGORY is '岗位类型'
;

comment on column T_POST.POST_CODE is '岗位编号'
;

comment on column T_POST.POST_NAME is '岗位名称'
;

comment on column T_POST.SORT is '岗位排序'
;

comment on column T_POST.REMARK is '岗位描述'
;

comment on column T_POST.CREATE_USER is '创建人'
;

comment on column T_POST.CREATE_DEPT is '创建部门'
;

comment on column T_POST.CREATE_TIME is '创建时间'
;

comment on column T_POST.UPDATE_USER is '修改人'
;

comment on column T_POST.UPDATE_TIME is '修改时间'
;

comment on column T_POST.STATUS is '状态'
;

comment on column T_POST.IS_DELETED is '是否已删除'
;

create table T_PARAM
(
    ID          NUMBER(20) not null
        constraint SYS_C009420
            primary key
        constraint SYS_C00152319
            check ("ID" IS NOT NULL)
        constraint SYS_C009419
            check ("ID" IS NOT NULL),
    PARAM_NAME  NVARCHAR2(255),
    PARAM_KEY   NVARCHAR2(255),
    PARAM_VALUE NVARCHAR2(255),
    REMARK      NVARCHAR2(255),
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NUMBER(11),
    IS_DELETED  NUMBER(11)
)
    ;

comment on table T_PARAM is '参数表'
;

comment on column T_PARAM.ID is '主键'
;

comment on column T_PARAM.PARAM_NAME is '参数名'
;

comment on column T_PARAM.PARAM_KEY is '参数键'
;

comment on column T_PARAM.PARAM_VALUE is '参数值'
;

comment on column T_PARAM.REMARK is '备注'
;

comment on column T_PARAM.CREATE_USER is '创建人'
;

comment on column T_PARAM.CREATE_DEPT is '创建部门'
;

comment on column T_PARAM.CREATE_TIME is '创建时间'
;

comment on column T_PARAM.UPDATE_USER is '修改人'
;

comment on column T_PARAM.UPDATE_TIME is '修改时间'
;

comment on column T_PARAM.STATUS is '状态'
;

comment on column T_PARAM.IS_DELETED is '是否已删除'
;

create table T_PAGE_VIEW
(
    MENU_ID   NUMBER(20),
    USER_NAME VARCHAR2(50)
)
    ;

create table T_OSS
(
    ID          NUMBER(20) not null
        constraint SYS_C00149807
            check ("ID" IS NOT NULL)
        constraint SYS_C0020124
            check ("ID" IS NOT NULL)
        constraint SYS_C009418
            check ("ID" IS NOT NULL),
    TENANT_ID   NVARCHAR2(12),
    CATEGORY    NUMBER(11),
    OSS_CODE    NVARCHAR2(32),
    ENDPOINT    NVARCHAR2(255),
    ACCESS_KEY  NVARCHAR2(255),
    SECRET_KEY  NVARCHAR2(255),
    BUCKET_NAME NVARCHAR2(255),
    APP_ID      NVARCHAR2(255),
    REGION      NVARCHAR2(255),
    REMARK      NVARCHAR2(255),
    CREATE_USER VARCHAR2(50),
    CREATE_DEPT VARCHAR2(50),
    CREATE_TIME DATE,
    UPDATE_USER VARCHAR2(50),
    UPDATE_TIME DATE,
    STATUS      NUMBER(11),
    IS_DELETED  NUMBER(11)
)
    ;

comment on table T_OSS is '对象存储表'
;

comment on column T_OSS.ID is '主键'
;

comment on column T_OSS.TENANT_ID is '租户ID'
;

comment on column T_OSS.CATEGORY is '分类'
;

comment on column T_OSS.OSS_CODE is '资源编号'
;

comment on column T_OSS.ENDPOINT is '资源地址'
;

comment on column T_OSS.ACCESS_KEY is 'accessKey'
;

comment on column T_OSS.SECRET_KEY is 'secretKey'
;

comment on column T_OSS.BUCKET_NAME is '空间名'
;

comment on column T_OSS.APP_ID is '应用ID'
;

comment on column T_OSS.REGION is '地域简称'
;

comment on column T_OSS.REMARK is '备注'
;

comment on column T_OSS.CREATE_USER is '创建人'
;

comment on column T_OSS.CREATE_DEPT is '创建部门'
;

comment on column T_OSS.CREATE_TIME is '创建时间'
;

comment on column T_OSS.UPDATE_USER is '修改人'
;

comment on column T_OSS.UPDATE_TIME is '修改时间'
;

comment on column T_OSS.STATUS is '状态'
;

comment on column T_OSS.IS_DELETED is '是否已删除'
;

create table T_NOTICE_IS_READ
(
    ID        VARCHAR2(20) not null
        constraint SYS_C0014180
            primary key
        constraint SYS_C0014179
            check ("ID" IS NOT NULL)
        constraint SYS_C0014719
            check ("ID" IS NOT NULL),
    NOTICE_ID VARCHAR2(20),
    USER_NAME VARCHAR2(50)
)
    ;

comment on column T_NOTICE_IS_READ.ID is '主键'
;

comment on column T_NOTICE_IS_READ.NOTICE_ID is '公告id'
;

comment on column T_NOTICE_IS_READ.USER_NAME is '用户工号'
;

create table T_NOTICE
(
    ID             NUMBER(20) not null
        constraint SYS_C00149809
            check ("ID" IS NOT NULL)
        constraint SYS_C0020123
            check ("ID" IS NOT NULL)
        constraint SYS_C009417
            check ("ID" IS NOT NULL),
    TENANT_ID      NVARCHAR2(12),
    TITLE          NVARCHAR2(255),
    CATEGORY       NUMBER(11),
    CONTENT        NVARCHAR2(2000),
    CREATE_USER    VARCHAR2(100),
    CREATE_DEPT    VARCHAR2(100),
    CREATE_TIME    DATE,
    UPDATE_USER    VARCHAR2(100),
    UPDATE_TIME    DATE,
    STATUS         NUMBER(11),
    IS_DELETED     NUMBER(11),
    IS_MUSTREAD    NUMBER default 0,
    PUBLISH_STATUS NUMBER default 0,
    EXPIRE_TIME    DATE,
    PUBLISH_TIME   DATE,
    INTRODUCE      VARCHAR2(255),
    IS_POPUP       NUMBER,
    IS_SHOW        NUMBER,
    SEND_SCOPE     NUMBER
)
    ;

comment on table T_NOTICE is '通知公告表'
;

comment on column T_NOTICE.ID is '主键'
;

comment on column T_NOTICE.TENANT_ID is '租户ID'
;

comment on column T_NOTICE.TITLE is '标题'
;

comment on column T_NOTICE.CATEGORY is '类型1默认，2新闻，3系统公告'
;

comment on column T_NOTICE.CONTENT is '内容'
;

comment on column T_NOTICE.CREATE_USER is '创建人'
;

comment on column T_NOTICE.CREATE_DEPT is '创建部门'
;

comment on column T_NOTICE.CREATE_TIME is '创建时间'
;

comment on column T_NOTICE.UPDATE_USER is '修改人'
;

comment on column T_NOTICE.UPDATE_TIME is '修改时间'
;

comment on column T_NOTICE.STATUS is '状态'
;

comment on column T_NOTICE.IS_DELETED is '是否已删除'
;

comment on column T_NOTICE.IS_MUSTREAD is '是否必读：0：false  1：true'
;

comment on column T_NOTICE.PUBLISH_STATUS is '是否发布：0：未发布   1：已发布'
;

comment on column T_NOTICE.EXPIRE_TIME is '过期时间'
;

comment on column T_NOTICE.PUBLISH_TIME is '发布时间'
;

comment on column T_NOTICE.INTRODUCE is '简介'
;

comment on column T_NOTICE.IS_POPUP is '是否重复弹出1弹出 ;2不弹出'
;

comment on column T_NOTICE.IS_SHOW is '是否展示1展示;2不展示'
;

comment on column T_NOTICE.SEND_SCOPE is '发送范围'
;

create table T_MESSAGE_CONTENT
(
    MESSAGE_ID      VARCHAR2(100) not null
        constraint SYS_C0010666
            primary key,
    MESSAGE_TITLE   VARCHAR2(255),
    RECEIVE_CODE    VARCHAR2(255),
    STATE           NUMBER,
    SEND_USER_CODE  VARCHAR2(50),
    SEND_USER_NAME  VARCHAR2(50),
    SEND_TIME       VARCHAR2(50),
    DELETE_RECORDS  NUMBER,
    MESSAGE_CONTENT NCLOB,
    MES_TYPE        NUMBER,
    MES_ID          VARCHAR2(100),
    APP_SOURCE      VARCHAR2(50),
    IS_SKIP         NUMBER(1),
    SKIP_URL        VARCHAR2(255),
    TASK_ID         VARCHAR2(100),
    SERIAL_NUMBER   VARCHAR2(100)
)
    ;

comment on table T_MESSAGE_CONTENT is '站内信内容表'
;

comment on column T_MESSAGE_CONTENT.MESSAGE_ID is '关联站内信id'
;

comment on column T_MESSAGE_CONTENT.MESSAGE_TITLE is '站内信标题'
;

comment on column T_MESSAGE_CONTENT.RECEIVE_CODE is '收件人列表'
;

comment on column T_MESSAGE_CONTENT.STATE is '状态;0已读;1未读'
;

comment on column T_MESSAGE_CONTENT.SEND_USER_CODE is '发送人工号'
;

comment on column T_MESSAGE_CONTENT.SEND_USER_NAME is '发送人姓名'
;

comment on column T_MESSAGE_CONTENT.SEND_TIME is '发送时间'
;

comment on column T_MESSAGE_CONTENT.DELETE_RECORDS is '发送记录状态0未删除;1删除'
;

comment on column T_MESSAGE_CONTENT.MESSAGE_CONTENT is '站内信内容'
;

comment on column T_MESSAGE_CONTENT.MES_TYPE is '1通知;2代办'
;

comment on column T_MESSAGE_CONTENT.MES_ID is '信使消息主键'
;

comment on column T_MESSAGE_CONTENT.APP_SOURCE is '来源应用'
;

comment on column T_MESSAGE_CONTENT.IS_SKIP is '是否需要跳转0:false,1:true'
;

comment on column T_MESSAGE_CONTENT.SKIP_URL is '跳转链接'
;

comment on column T_MESSAGE_CONTENT.TASK_ID is '任务id'
;

comment on column T_MESSAGE_CONTENT.SERIAL_NUMBER is '流水号'
;

create table T_MES_LOG
(
    ID          VARCHAR2(50) not null
        constraint SYS_C0013036
            primary key
        constraint SYS_C0013035
            check ("ID" IS NOT NULL)
        constraint SYS_C0014717
            check ("ID" IS NOT NULL),
    SEND_USER   VARCHAR2(100),
    INCEPT_USER VARCHAR2(100),
    SEND_TIME   VARCHAR2(100),
    TITLE       VARCHAR2(255),
    TYPE        NUMBER(1),
    PHONE       NUMBER(11),
    CONTENT     NCLOB
)
    ;

comment on column T_MES_LOG.ID is '主键'
;

comment on column T_MES_LOG.SEND_USER is '发送人'
;

comment on column T_MES_LOG.INCEPT_USER is '接收人'
;

comment on column T_MES_LOG.SEND_TIME is '发送时间'
;

comment on column T_MES_LOG.TITLE is '标题'
;

comment on column T_MES_LOG.TYPE is '类型1短信;2邮件;3站内信'
;

comment on column T_MES_LOG.PHONE is '手机号'
;

comment on column T_MES_LOG.CONTENT is '内容'
;

create table T_MAIL
(
    ID       VARCHAR2(100) not null
        constraint SYS_C0011068
            primary key
        constraint SYS_C0011067
            check ("ID" IS NOT NULL)
        constraint SYS_C0011069
            check ("ID" IS NOT NULL)
        constraint SYS_C0014715
            check ("ID" IS NOT NULL),
    HOST     VARCHAR2(100),
    PASSWORD VARCHAR2(100),
    USERNAME VARCHAR2(100),
    STATE    VARCHAR2(100),
    CODE     VARCHAR2(100)
)
    ;

comment on column T_MAIL.ID is '主键'
;

comment on column T_MAIL.HOST is '端口'
;

comment on column T_MAIL.PASSWORD is '密码'
;

comment on column T_MAIL.USERNAME is '用户名'
;

comment on column T_MAIL.STATE is '状态'
;

comment on column T_MAIL.CODE is 'code'
;

create table T_LABEL
(
    ID          VARCHAR2(100)      not null
        constraint SYS_C0014188
            primary key
        constraint SYS_C0014708
            check ("ID" IS NOT NULL),
    TITLE       VARCHAR2(255 char) not null
        constraint SYS_C0014187
            check ("TITLE" IS NOT NULL)
        constraint SYS_C0014709
            check ("TITLE" IS NOT NULL),
    CREATE_TIME TIMESTAMP(6) default SYSDATE
)
    ;

create table T_INSIDE_MESSAGE
(
    ID         NUMBER(20) not null
        constraint SYS_C009410
            primary key
        constraint SYS_C0014707
            check ("ID" IS NOT NULL)
        constraint SYS_C00151079
            check ("ID" IS NOT NULL)
        constraint SYS_C0020163
            check ("ID" IS NOT NULL)
        constraint SYS_C009409
            check ("ID" IS NOT NULL),
    TITLE      NVARCHAR2(100),
    CONTENT    NVARCHAR2(255),
    SEND_TIME  DATE,
    SENDER     NVARCHAR2(50),
    RECIPIENT  NVARCHAR2(50),
    RANGE_TYPE NVARCHAR2(255),
    TYPE       NVARCHAR2(50),
    IS_SKIP    NUMBER default 0,
    SKIP_URL   VARCHAR2(100)
)
    ;

comment on table T_INSIDE_MESSAGE is '站内消息表'
;

comment on column T_INSIDE_MESSAGE.ID is '主键'
;

comment on column T_INSIDE_MESSAGE.TITLE is '标题'
;

comment on column T_INSIDE_MESSAGE.CONTENT is '内容'
;

comment on column T_INSIDE_MESSAGE.SEND_TIME is '发送时间'
;

comment on column T_INSIDE_MESSAGE.SENDER is '发送人工号'
;

comment on column T_INSIDE_MESSAGE.RECIPIENT is '接受人工号'
;

comment on column T_INSIDE_MESSAGE.RANGE_TYPE is '范围类型(个人，部门，全体)'
;

comment on column T_INSIDE_MESSAGE.TYPE is '消息类型(0短信;1邮件;2应用登记审核;3项目登记审核)'
;

comment on column T_INSIDE_MESSAGE.IS_SKIP is '是否需要跳转0:false,1:true'
;

comment on column T_INSIDE_MESSAGE.SKIP_URL is '跳转链接'
;

create table T_EMAIL_LOG
(
    USERNAME    NVARCHAR2(100),
    RECEIVE_STR NVARCHAR2(100),
    SUBJECT     NVARCHAR2(100),
    CONTENT     NVARCHAR2(100),
    TYPE        NVARCHAR2(50),
    SEND_TIME   DATE,
    IS_READ     NUMBER,
    ID          VARCHAR2(60)
)
    ;

comment on table T_EMAIL_LOG is '邮件短信发送记录表'
;

comment on column T_EMAIL_LOG.USERNAME is '发送人'
;

comment on column T_EMAIL_LOG.RECEIVE_STR is '接收人'
;

comment on column T_EMAIL_LOG.SUBJECT is '主题'
;

comment on column T_EMAIL_LOG.CONTENT is '内容'
;

comment on column T_EMAIL_LOG.TYPE is '类型'
;

comment on column T_EMAIL_LOG.SEND_TIME is '发送时间'
;

comment on column T_EMAIL_LOG.IS_READ is '是否必读'
;

comment on column T_EMAIL_LOG.ID is 'id'
;


create table T_DICT_BIZ
(
    ID         NUMBER(20) not null
        constraint SYS_C00149811
            check ("ID" IS NOT NULL)
        constraint SYS_C0020116
            check ("ID" IS NOT NULL)
        constraint SYS_C009406
            check ("ID" IS NOT NULL),
    TENANT_ID  NVARCHAR2(12),
    PARENT_ID  NUMBER(20),
    CODE       NVARCHAR2(255),
    DICT_KEY   NVARCHAR2(255),
    DICT_VALUE NVARCHAR2(255),
    SORT       NUMBER(11),
    REMARK     NVARCHAR2(255),
    IS_SEALED  NUMBER(11),
    IS_DELETED NUMBER(11)
)
    ;

comment on table T_DICT_BIZ is '数据源配置表'
;

comment on column T_DICT_BIZ.ID is '主键'
;

comment on column T_DICT_BIZ.TENANT_ID is '租户ID'
;

comment on column T_DICT_BIZ.PARENT_ID is '父主键'
;

comment on column T_DICT_BIZ.CODE is '字典码'
;

comment on column T_DICT_BIZ.DICT_KEY is '字典值'
;

comment on column T_DICT_BIZ.DICT_VALUE is '字典名称'
;

comment on column T_DICT_BIZ.SORT is '排序'
;

comment on column T_DICT_BIZ.REMARK is '字典备注'
;

comment on column T_DICT_BIZ.IS_SEALED is '是否已封存'
;

comment on column T_DICT_BIZ.IS_DELETED is '是否已删除'
;

create table T_DICT
(
    ID         NUMBER(20) not null
        constraint SYS_C00149813
            check ("ID" IS NOT NULL)
        constraint SYS_C0020115
            check ("ID" IS NOT NULL)
        constraint SYS_C009405
            check ("ID" IS NOT NULL),
    PARENT_ID  NUMBER(20),
    CODE       NVARCHAR2(255),
    DICT_KEY   NVARCHAR2(255),
    DICT_VALUE NVARCHAR2(255),
    SORT       NUMBER(11),
    REMARK     NVARCHAR2(255),
    IS_SEALED  NUMBER(11),
    IS_DELETED NUMBER(11)
)
    ;

comment on table T_DICT is '字典表'
;

comment on column T_DICT.ID is '主键'
;

comment on column T_DICT.PARENT_ID is '父主键'
;

comment on column T_DICT.CODE is '字典码'
;

comment on column T_DICT.DICT_KEY is '字典值'
;

comment on column T_DICT.DICT_VALUE is '字典名称'
;

comment on column T_DICT.SORT is '排序'
;

comment on column T_DICT.REMARK is '字典备注'
;

comment on column T_DICT.IS_SEALED is '是否已封存'
;

comment on column T_DICT.IS_DELETED is '是否已删除'
;
create table T_DESK_MENU
(
    ID          NUMBER(20) not null
        constraint SYS_C009404
            primary key
        constraint SYS_C009403
            check ("ID" IS NOT NULL),
    MENU_ID     VARCHAR2(50),
    USER_NAME   VARCHAR2(50),
    CREATE_TIME DATE,
    IS_DELETED  NUMBER(1)
)
    ;

comment on column T_DESK_MENU.MENU_ID is '菜单ID'
;

comment on column T_DESK_MENU.USER_NAME is '创建者用户名'
;

comment on column T_DESK_MENU.CREATE_TIME is '创建时间'
;

comment on column T_DESK_MENU.IS_DELETED is '删除标识'
;


create table T_CUSTOMIZE_MENU
(
    ID         NUMBER(20) not null
        constraint SYS_C009400
            primary key
        constraint SYS_C009399
            check ("ID" IS NOT NULL),
    MENU_NAME  VARCHAR2(50),
    MENU_URL   VARCHAR2(500),
    IS_DELETED NUMBER(1)
)
    ;

comment on column T_CUSTOMIZE_MENU.MENU_NAME is '菜单名称'
;

comment on column T_CUSTOMIZE_MENU.MENU_URL is '菜单路径'
;

comment on column T_CUSTOMIZE_MENU.IS_DELETED is '删除标识'
;

create table T_COMPANY_USER
(
    ID         NUMBER     not null
        constraint SYS_C0013492
            primary key
        constraint SYS_C0013490
            check ("ID" IS NOT NULL)
        constraint SYS_C0014688
            check ("ID" IS NOT NULL),
    COMPANY_ID NUMBER(20),
    GH         NVARCHAR2(100),
    NAME       NVARCHAR2(100),
    MOBILE     NVARCHAR2(100),
    UPDATED_AT DATE,
    CREATED_AT DATE,
    STATE      NUMBER(11) not null
        constraint SYS_C0013493
            check ("STATE" IS NOT NULL)
        constraint SYS_C0014689
            check ("STATE" IS NOT NULL),
    USER_ID    NUMBER(20)
)
    ;

comment on column T_COMPANY_USER.ID is 'id'
;

comment on column T_COMPANY_USER.COMPANY_ID is '所属公司id'
;

comment on column T_COMPANY_USER.GH is '工号'
;

comment on column T_COMPANY_USER.NAME is '姓名'
;

comment on column T_COMPANY_USER.MOBILE is '电话'
;

comment on column T_COMPANY_USER.UPDATED_AT is '更新时间'
;

comment on column T_COMPANY_USER.CREATED_AT is '创建时间'
;

comment on column T_COMPANY_USER.STATE is '状态：0-正常，1-禁用'
;

comment on column T_COMPANY_USER.USER_ID is '用户id'
;

create table T_COMPANY
(
    ID          NUMBER(20)     not null
        constraint SYS_C0013479
            primary key
        constraint SYS_C0013477
            check ("ID" IS NOT NULL)
        constraint SYS_C0014686
            check ("ID" IS NOT NULL),
    NAME        NVARCHAR2(100) not null
        constraint SYS_C0013478
            check ("NAME" IS NOT NULL)
        constraint SYS_C0014687
            check ("NAME" IS NOT NULL),
    DESCRIPTION NVARCHAR2(200),
    SORT        NUMBER,
    STATE       NUMBER,
    UPDATED_AT  DATE,
    CREATED_AT  DATE
)
    ;

comment on column T_COMPANY.ID is 'id'
;

comment on column T_COMPANY.NAME is '公司名称'
;

comment on column T_COMPANY.DESCRIPTION is '公司描述'
;

comment on column T_COMPANY.SORT is '排序'
;

comment on column T_COMPANY.STATE is '状态：0-正常，1-禁用'
;

comment on column T_COMPANY.UPDATED_AT is '更新时间'
;

comment on column T_COMPANY.CREATED_AT is '创建时间'
;

create table T_CLIENT
(
    ID                      NUMBER(20)     not null
        constraint SYS_C00149815
            check ("ID" IS NOT NULL)
        constraint SYS_C0020103
            check ("ID" IS NOT NULL)
        constraint SYS_C009390
            check ("ID" IS NOT NULL),
    CLIENT_ID               NVARCHAR2(48)  not null
        constraint SYS_C00149816
            check ("CLIENT_ID" IS NOT NULL)
        constraint SYS_C0020104
            check ("CLIENT_ID" IS NOT NULL)
        constraint SYS_C009391
            check ("CLIENT_ID" IS NOT NULL),
    CLIENT_SECRET           NVARCHAR2(256) not null
        constraint SYS_C00149817
            check ("CLIENT_SECRET" IS NOT NULL)
        constraint SYS_C0020105
            check ("CLIENT_SECRET" IS NOT NULL)
        constraint SYS_C009392
            check ("CLIENT_SECRET" IS NOT NULL),
    RESOURCE_IDS            NVARCHAR2(256),
    SCOPE                   NVARCHAR2(256) not null
        constraint SYS_C00149818
            check ("SCOPE" IS NOT NULL)
        constraint SYS_C0020106
            check ("SCOPE" IS NOT NULL)
        constraint SYS_C009393
            check ("SCOPE" IS NOT NULL),
    AUTHORIZED_GRANT_TYPES  NVARCHAR2(256) not null
        constraint SYS_C00149819
            check ("AUTHORIZED_GRANT_TYPES" IS NOT NULL)
        constraint SYS_C0020107
            check ("AUTHORIZED_GRANT_TYPES" IS NOT NULL)
        constraint SYS_C009394
            check ("AUTHORIZED_GRANT_TYPES" IS NOT NULL),
    WEB_SERVER_REDIRECT_URI NVARCHAR2(256),
    AUTHORITIES             NVARCHAR2(256),
    ACCESS_TOKEN_VALIDITY   NUMBER(11)     not null
        constraint SYS_C00149820
            check ("ACCESS_TOKEN_VALIDITY" IS NOT NULL)
        constraint SYS_C0020108
            check ("ACCESS_TOKEN_VALIDITY" IS NOT NULL)
        constraint SYS_C009395
            check ("ACCESS_TOKEN_VALIDITY" IS NOT NULL),
    REFRESH_TOKEN_VALIDITY  NUMBER(11)     not null
        constraint SYS_C00149821
            check ("REFRESH_TOKEN_VALIDITY" IS NOT NULL)
        constraint SYS_C0020109
            check ("REFRESH_TOKEN_VALIDITY" IS NOT NULL)
        constraint SYS_C009396
            check ("REFRESH_TOKEN_VALIDITY" IS NOT NULL),
    ADDITIONAL_INFORMATION  NCLOB,
    AUTOAPPROVE             NVARCHAR2(256),
    CREATE_USER             NUMBER(20),
    CREATE_DEPT             NUMBER(20),
    CREATE_TIME             DATE,
    UPDATE_USER             NUMBER(20),
    UPDATE_TIME             DATE,
    STATUS                  NUMBER(11)     not null
        constraint SYS_C00149822
            check ("STATUS" IS NOT NULL)
        constraint SYS_C0020110
            check ("STATUS" IS NOT NULL)
        constraint SYS_C009397
            check ("STATUS" IS NOT NULL),
    IS_DELETED              NUMBER(11)     not null
        constraint SYS_C00149823
            check ("IS_DELETED" IS NOT NULL)
        constraint SYS_C0020111
            check ("IS_DELETED" IS NOT NULL)
        constraint SYS_C009398
            check ("IS_DELETED" IS NOT NULL),
    CLIENT_NAME             NVARCHAR2(50),
    TWO_FACTOR_AUTH         NVARCHAR2(100),
    LOGOUT_ADDRESS          NVARCHAR2(500),
    IS_LOGON_CONF           NUMBER(1),
    MODIFY_USER             NVARCHAR2(50)
)
    ;

comment on table T_CLIENT is '客户端表'
;

comment on column T_CLIENT.ID is '主键'
;

comment on column T_CLIENT.CLIENT_ID is '客户端ID'
;

comment on column T_CLIENT.CLIENT_SECRET is '客户端密钥'
;

comment on column T_CLIENT.RESOURCE_IDS is '资源集合'
;

comment on column T_CLIENT.SCOPE is '授权范围'
;

comment on column T_CLIENT.AUTHORIZED_GRANT_TYPES is '授权类型'
;

comment on column T_CLIENT.WEB_SERVER_REDIRECT_URI is '回调地址'
;

comment on column T_CLIENT.AUTHORITIES is '权限'
;

comment on column T_CLIENT.ACCESS_TOKEN_VALIDITY is '令牌过期秒数'
;

comment on column T_CLIENT.REFRESH_TOKEN_VALIDITY is '刷新令牌过期秒数'
;

comment on column T_CLIENT.ADDITIONAL_INFORMATION is '附加说明'
;

comment on column T_CLIENT.AUTOAPPROVE is '自动授权'
;

comment on column T_CLIENT.CREATE_USER is '创建人'
;

comment on column T_CLIENT.CREATE_DEPT is '创建部门'
;

comment on column T_CLIENT.CREATE_TIME is '创建时间'
;

comment on column T_CLIENT.UPDATE_USER is '修改人'
;

comment on column T_CLIENT.UPDATE_TIME is '修改时间'
;

comment on column T_CLIENT.STATUS is '状态'
;

comment on column T_CLIENT.IS_DELETED is '是否已删除'
;

comment on column T_CLIENT.CLIENT_NAME is '应用名称'
;

comment on column T_CLIENT.TWO_FACTOR_AUTH is '双因素认证'
;

comment on column T_CLIENT.LOGOUT_ADDRESS is '登出地址'
;

comment on column T_CLIENT.IS_LOGON_CONF is '登陆可配置 默认0：否   1：是'
;

comment on column T_CLIENT.MODIFY_USER is '修改人中文'
;

create table T_ATTACH
(
    ID            NUMBER(20) not null
        constraint SYS_C00149833
            check ("ID" IS NOT NULL)
        constraint SYS_C0020102
            check ("ID" IS NOT NULL)
        constraint SYS_C009389
            check ("ID" IS NOT NULL),
    TENANT_ID     NVARCHAR2(12),
    LINK          VARCHAR2(1000),
    DOMAIN_URL    VARCHAR2(500),
    NAME          VARCHAR2(500),
    ORIGINAL_NAME VARCHAR2(500),
    EXTENSION     VARCHAR2(12),
    ATTACH_SIZE   NUMBER(20),
    CREATE_USER   NUMBER(20),
    CREATE_DEPT   NUMBER(20),
    CREATE_TIME   DATE,
    UPDATE_USER   NUMBER(20),
    UPDATE_TIME   DATE,
    STATUS        NUMBER(11),
    IS_DELETED    NUMBER(11)
)
    ;

comment on table T_ATTACH is '附件表'
;

comment on column T_ATTACH.ID is '主键'
;

comment on column T_ATTACH.TENANT_ID is '租户ID'
;

comment on column T_ATTACH.LINK is '附件地址'
;

comment on column T_ATTACH.DOMAIN_URL is '附件域名'
;

comment on column T_ATTACH.NAME is '附件名称'
;

comment on column T_ATTACH.ORIGINAL_NAME is '附件原名'
;

comment on column T_ATTACH.EXTENSION is '附件拓展名'
;

comment on column T_ATTACH.ATTACH_SIZE is '附件大小'
;

comment on column T_ATTACH.CREATE_USER is '创建人'
;

comment on column T_ATTACH.CREATE_DEPT is '创建部门'
;

comment on column T_ATTACH.CREATE_TIME is '创建时间'
;

comment on column T_ATTACH.UPDATE_USER is '修改人'
;

comment on column T_ATTACH.UPDATE_TIME is '修改时间'
;

comment on column T_ATTACH.STATUS is '状态'
;

comment on column T_ATTACH.IS_DELETED is '是否已删除'
;

create table T_APP_VERSION
(
    ID              NVARCHAR2(50) not null
        constraint SYS_C00158682
            check ("ID" IS NOT NULL)
        constraint SYS_C0020379
            check ("ID" IS NOT NULL)
        constraint SYS_C009387
            check ("ID" IS NOT NULL),
    TYPE            NUMBER(1),
    LATEST_VERSION  NVARCHAR2(255),
    LATEST_APK      NVARCHAR2(255),
    UP_INSTRUCTIONS NVARCHAR2(255),
    REVISE_DATE     DATE,
    COMMENTS        NVARCHAR2(255),
    APP_ID          NVARCHAR2(50),
    CREATE_USER     NVARCHAR2(50),
    CREATE_TIME     DATE,
    UPDATE_USER     NVARCHAR2(50),
    UPDATE_TIME     DATE,
    CREATE_DEPT     NVARCHAR2(50),
    STATUS          NUMBER(1),
    IS_DELETED      NUMBER(1)     not null
        constraint SYS_C00158683
            check ("IS_DELETED" IS NOT NULL)
        constraint SYS_C0020382
            check ("IS_DELETED" IS NOT NULL)
        constraint SYS_C009388
            check ("IS_DELETED" IS NOT NULL)
)
    ;

comment on column T_APP_VERSION.TYPE is '0：安卓1：IOS'
;

comment on column T_APP_VERSION.LATEST_VERSION is 'app版本'
;

comment on column T_APP_VERSION.LATEST_APK is 'app版本地址'
;

comment on column T_APP_VERSION.UP_INSTRUCTIONS is '更新版本说明'
;

comment on column T_APP_VERSION.REVISE_DATE is '更新时间'
;

comment on column T_APP_VERSION.COMMENTS is '备注'
;

comment on column T_APP_VERSION.APP_ID is '应用Id'
;

comment on column T_APP_VERSION.CREATE_USER is '创建用户'
;

comment on column T_APP_VERSION.CREATE_TIME is '创建时间'
;

comment on column T_APP_VERSION.UPDATE_USER is '更新用户'
;

comment on column T_APP_VERSION.UPDATE_TIME is '更新时间'
;

comment on column T_APP_VERSION.CREATE_DEPT is '创建部门'
;

comment on column T_APP_VERSION.STATUS is '业务状态'
;

comment on column T_APP_VERSION.IS_DELETED is '删除标识'
;


create table T_AGENT
(
    ID            VARCHAR2(100),
    TITLE         VARCHAR2(200),
    START_TIME    DATE,
    START_NAME    VARCHAR2(100),
    EXAMINE_NAME  VARCHAR2(100),
    TYPE          VARCHAR2(100),
    IS_SKIP       NUMBER,
    SKIP_URL      VARCHAR2(200),
    AGENT_START   NUMBER,
    FLOWABLE_ID   VARCHAR2(200),
    START_USER    VARCHAR2(50),
    EXAMINE_USER  VARCHAR2(50),
    TASK_ID       VARCHAR2(100),
    TASK_NAME     VARCHAR2(100),
    SERIAL_NUMBER VARCHAR2(100)
)
    ;

comment on table T_AGENT is '代办事项表'
;

comment on column T_AGENT.ID is '主键id'
;

comment on column T_AGENT.TITLE is '标题'
;

comment on column T_AGENT.START_TIME is '发起时间'
;

comment on column T_AGENT.START_NAME is '发起人工号'
;

comment on column T_AGENT.EXAMINE_NAME is '审批人工号'
;

comment on column T_AGENT.TYPE is '代办类型(0:应用登记审核，1:项目登记审核,2:服务上架审批)'
;

comment on column T_AGENT.IS_SKIP is '是否需要跳转0:false,1:true'
;

comment on column T_AGENT.SKIP_URL is '跳转链接'
;

comment on column T_AGENT.AGENT_START is '代办状态(0:未处理，1:已处理)'
;

comment on column T_AGENT.FLOWABLE_ID is '工作流id'
;

comment on column T_AGENT.START_USER is '发起人姓名'
;

comment on column T_AGENT.EXAMINE_USER is '审批人姓名'
;

comment on column T_AGENT.TASK_ID is '任务id'
;

comment on column T_AGENT.TASK_NAME is '节点名称'
;

comment on column T_AGENT.SERIAL_NUMBER is '流水号'
;

create table SYS_TASK_FORM
(
    ID      NUMBER(20) not null
        constraint SYS_C009306
            primary key
        constraint SYS_C0014670
            check ("ID" IS NOT NULL)
        constraint SYS_C00155935
            check ("ID" IS NOT NULL)
        constraint SYS_C009305
            check ("ID" IS NOT NULL),
    FORM_ID NUMBER(20),
    TASK_ID NVARCHAR2(50)
)
    ;

comment on table SYS_TASK_FORM is '流程任务关联表单'
;

comment on column SYS_TASK_FORM.ID is '主键'
;

comment on column SYS_TASK_FORM.FORM_ID is '表单主键'
;

comment on column SYS_TASK_FORM.TASK_ID is '所属任务'
;
create table SYS_LISTENER
(
    ID          NUMBER(20) not null
        constraint SYS_C009304
            primary key
        constraint SYS_C0014669
            check ("ID" IS NOT NULL)
        constraint SYS_C00155932
            check ("ID" IS NOT NULL)
        constraint SYS_C009303
            check ("ID" IS NOT NULL),
    NAME        NVARCHAR2(128),
    TYPE        NVARCHAR2(32),
    EVENT_TYPE  NVARCHAR2(32),
    VALUE_TYPE  NVARCHAR2(32),
    VALUE       NVARCHAR2(255),
    CREATE_TIME DATE,
    UPDATE_TIME DATE,
    CREATE_USER NUMBER(20),
    UPDATE_USER NUMBER(20),
    STATUS      NUMBER(4),
    REMARK      NVARCHAR2(255)
)
    ;

comment on table SYS_LISTENER is '流程监听'
;

comment on column SYS_LISTENER.ID is '表单主键'
;

comment on column SYS_LISTENER.NAME is '名称'
;

comment on column SYS_LISTENER.TYPE is '监听类型'
;

comment on column SYS_LISTENER.EVENT_TYPE is '事件类型'
;

comment on column SYS_LISTENER.VALUE_TYPE is '值类型'
;

comment on column SYS_LISTENER.VALUE is '执行内容'
;

comment on column SYS_LISTENER.CREATE_TIME is '创建时间'
;

comment on column SYS_LISTENER.UPDATE_TIME is '更新时间'
;

comment on column SYS_LISTENER.CREATE_USER is '创建人员'
;

comment on column SYS_LISTENER.UPDATE_USER is '更新人员'
;

comment on column SYS_LISTENER.STATUS is '状态'
;

comment on column SYS_LISTENER.REMARK is '备注'
;

create table SYS_FORM
(
    FORM_ID      NUMBER(20) not null
        constraint SYS_C009302
            primary key
        constraint SYS_C0014668
            check ("FORM_ID" IS NOT NULL)
        constraint SYS_C00155934
            check ("FORM_ID" IS NOT NULL)
        constraint SYS_C009301
            check ("FORM_ID" IS NOT NULL),
    FORM_NAME    NVARCHAR2(50),
    FORM_CONTENT NCLOB,
    CREATE_TIME  DATE,
    UPDATE_TIME  DATE,
    CREATE_USER  NUMBER(20),
    UPDATE_USER  NUMBER(20),
    REMARK       NVARCHAR2(255)
)
    ;

comment on table SYS_FORM is '流程表单'
;

comment on column SYS_FORM.FORM_ID is '表单主键'
;

comment on column SYS_FORM.FORM_NAME is '表单名称'
;

comment on column SYS_FORM.FORM_CONTENT is '表单内容'
;

comment on column SYS_FORM.CREATE_TIME is '创建时间'
;

comment on column SYS_FORM.UPDATE_TIME is '更新时间'
;

comment on column SYS_FORM.CREATE_USER is '创建人员'
;

comment on column SYS_FORM.UPDATE_USER is '更新人员'
;

comment on column SYS_FORM.REMARK is '备注'
;

create table SYS_EXPRESSION
(
    ID          NUMBER(20) not null
        constraint SYS_C009300
            primary key
        constraint SYS_C0014667
            check ("ID" IS NOT NULL)
        constraint SYS_C00155931
            check ("ID" IS NOT NULL)
        constraint SYS_C009299
            check ("ID" IS NOT NULL),
    NAME        NVARCHAR2(50),
    EXPRESSION  NVARCHAR2(255),
    CREATE_TIME DATE,
    UPDATE_TIME DATE,
    CREATE_USER NUMBER(20),
    UPDATE_USER NUMBER(20),
    STATUS      NUMBER(4),
    REMARK      NVARCHAR2(255)
)
    ;

comment on table SYS_EXPRESSION is '流程表达式'
;

comment on column SYS_EXPRESSION.ID is '表单主键'
;

comment on column SYS_EXPRESSION.NAME is '表达式名称'
;

comment on column SYS_EXPRESSION.EXPRESSION is '表达式内容'
;

comment on column SYS_EXPRESSION.CREATE_TIME is '创建时间'
;

comment on column SYS_EXPRESSION.UPDATE_TIME is '更新时间'
;

comment on column SYS_EXPRESSION.CREATE_USER is '创建人员'
;

comment on column SYS_EXPRESSION.UPDATE_USER is '更新人员'
;

comment on column SYS_EXPRESSION.STATUS is '状态'
;

comment on column SYS_EXPRESSION.REMARK is '备注'
;


create table SYS_DEPLOY_FORM
(
    ID        NUMBER(20) not null
        constraint SYS_C009294
            primary key
        constraint SYS_C0014661
            check ("ID" IS NOT NULL)
        constraint SYS_C00155933
            check ("ID" IS NOT NULL)
        constraint SYS_C009293
            check ("ID" IS NOT NULL),
    FORM_ID   NUMBER(20),
    DEPLOY_ID NVARCHAR2(50)
)
    ;

comment on table SYS_DEPLOY_FORM is '流程实例关联表单'
;

comment on column SYS_DEPLOY_FORM.ID is '主键'
;

comment on column SYS_DEPLOY_FORM.FORM_ID is '表单主键'
;

comment on column SYS_DEPLOY_FORM.DEPLOY_ID is '流程实例主键'
;


create table R_SYS_USER_ROLE
(
    USER_ID NUMBER,
    ROLE_ID NUMBER
)
    ;

comment on table R_SYS_USER_ROLE is '系统管理-用户角色关联表'
;

comment on column R_SYS_USER_ROLE.USER_ID is '用户表id'
;

comment on column R_SYS_USER_ROLE.ROLE_ID is '角色表id'
;

create table R_SYS_USER_INDIVIDUAL
(
    ID             NUMBER not null
        constraint SYS_C009292
            primary key
        constraint SYS_C0014601
            check ("ID" IS NOT NULL)
        constraint SYS_C009291
            check ("ID" IS NOT NULL),
    USER_ID        NUMBER,
    PATH           VARCHAR2(255),
    INDIVIDUA_NAME VARCHAR2(255)
)
    ;

comment on column R_SYS_USER_INDIVIDUAL.ID is '主键'
;

comment on column R_SYS_USER_INDIVIDUAL.USER_ID is '用户id'
;

comment on column R_SYS_USER_INDIVIDUAL.PATH is '路径'
;

comment on column R_SYS_USER_INDIVIDUAL.INDIVIDUA_NAME is '名称'
;

create table R_SYS_USER_APP
(
    USER_ID NUMBER,
    APP_ID  NUMBER
)
    ;

comment on table R_SYS_USER_APP is '用户应用关联表'
;

comment on column R_SYS_USER_APP.USER_ID is '用户Id'
;

comment on column R_SYS_USER_APP.APP_ID is '应用Id'
;

create table R_SYS_ROLE_MENU
(
    ROLE_ID NUMBER(20),
    MENU_ID NUMBER(20)
)
    ;

comment on table R_SYS_ROLE_MENU is '系统管理-角色菜单关联表'
;

comment on column R_SYS_ROLE_MENU.ROLE_ID is '角色表id'
;

comment on column R_SYS_ROLE_MENU.MENU_ID is '菜单表id'
;

create table R_SYS_DEPT_ROLE
(
    DEPT_ID NUMBER,
    ROLE_ID NUMBER
)
    ;

comment on table R_SYS_DEPT_ROLE is '系统管理-部门角色关联表'
;

comment on column R_SYS_DEPT_ROLE.DEPT_ID is '部门表id'
;

comment on column R_SYS_DEPT_ROLE.ROLE_ID is '角色表id'
;

create table R_SYS_DEPT_PORT_AREA
(
    DEPT_ID      NVARCHAR2(20) not null
        constraint SYS_C0014156
            check ("DEPT_ID" IS NOT NULL)
        constraint SYS_C0014598
            check ("DEPT_ID" IS NOT NULL),
    PORT_AREA_ID NVARCHAR2(20) not null
        constraint SYS_C0014157
            check ("PORT_AREA_ID" IS NOT NULL)
        constraint SYS_C0014599
            check ("PORT_AREA_ID" IS NOT NULL)
)
    ;

comment on column R_SYS_DEPT_PORT_AREA.DEPT_ID is '部门ID'
;

comment on column R_SYS_DEPT_PORT_AREA.PORT_AREA_ID is '港区ID'
;


create table QDPORT_WF_SERIAL
(
    ID               NUMBER(20) not null
        constraint SYS_C0012685
            check ("ID" IS NOT NULL)
        constraint SYS_C0015812
            check ("ID" IS NOT NULL),
    DEPLOYMENT_ID    NVARCHAR2(255),
    NAME             NVARCHAR2(255),
    PREFIX           NVARCHAR2(255),
    DATE_FORMAT      NVARCHAR2(255),
    SUFFIX_LENGTH    NUMBER(11),
    START_SEQUENCE   NUMBER(11),
    CONNECTOR        NVARCHAR2(255),
    CURRENT_SEQUENCE NUMBER(11),
    CYCLE            NVARCHAR2(255),
    CREATE_USER      NUMBER(20),
    CREATE_DEPT      NUMBER(20),
    CREATE_TIME      DATE,
    UPDATE_USER      NUMBER(20),
    UPDATE_TIME      DATE,
    STATUS           NVARCHAR2(255),
    IS_DELETED       NUMBER(11)
)
    ;

comment on table QDPORT_WF_SERIAL is '流程流水号'
;

comment on column QDPORT_WF_SERIAL.DEPLOYMENT_ID is '部署id'
;

comment on column QDPORT_WF_SERIAL.NAME is '名称'
;

comment on column QDPORT_WF_SERIAL.PREFIX is '前缀'
;

comment on column QDPORT_WF_SERIAL.DATE_FORMAT is '日期格式化'
;

comment on column QDPORT_WF_SERIAL.SUFFIX_LENGTH is '后缀位数'
;

comment on column QDPORT_WF_SERIAL.START_SEQUENCE is '初始数值'
;

comment on column QDPORT_WF_SERIAL.CONNECTOR is '连接符'
;

comment on column QDPORT_WF_SERIAL.CURRENT_SEQUENCE is '当前序列'
;

comment on column QDPORT_WF_SERIAL.CYCLE is '重置周期 none不重置 day天 week周 month月 year年'
;

comment on column QDPORT_WF_SERIAL.CREATE_USER is '创建人'
;

comment on column QDPORT_WF_SERIAL.CREATE_DEPT is '创建部门'
;

comment on column QDPORT_WF_SERIAL.CREATE_TIME is '创建时间'
;

comment on column QDPORT_WF_SERIAL.UPDATE_USER is '修改人'
;

comment on column QDPORT_WF_SERIAL.UPDATE_TIME is '修改时间'
;

comment on column QDPORT_WF_SERIAL.STATUS is '状态'
;

comment on column QDPORT_WF_SERIAL.IS_DELETED is '是否已删除'
;

create table QDPORT_WF_PROXY
(
    ID              NUMBER(20) not null
        constraint SYS_C0012684
            check ("ID" IS NOT NULL)
        constraint SYS_C0015810
            check ("ID" IS NOT NULL),
    USER_ID         NUMBER(20),
    PROXY_USER_ID   NUMBER(20),
    PROCESS_DEF_KEY NVARCHAR2(750),
    TYPE            NVARCHAR2(255),
    START_TIME      DATE,
    END_TIME        DATE,
    STATUS          NUMBER(11)
)
    ;

comment on table QDPORT_WF_PROXY is '流程代理'
;

comment on column QDPORT_WF_PROXY.USER_ID is '委托人'
;

comment on column QDPORT_WF_PROXY.PROXY_USER_ID is '代理人'
;

comment on column QDPORT_WF_PROXY.PROCESS_DEF_KEY is '流程定义key'
;

comment on column QDPORT_WF_PROXY.TYPE is '1永久 2定时'
;

comment on column QDPORT_WF_PROXY.START_TIME is '开始时间'
;

comment on column QDPORT_WF_PROXY.END_TIME is '结束时间'
;

comment on column QDPORT_WF_PROXY.STATUS is '状态'
;

create table QDPORT_WF_PROCESS_LEAVE
(
    ID             NUMBER(20) not null
        constraint SYS_C0012682
            check ("ID" IS NOT NULL)
        constraint SYS_C0015806
            check ("ID" IS NOT NULL),
    PROCESS_INS_ID NVARCHAR2(64),
    PROCESS_DEF_ID NVARCHAR2(64),
    CURRENT_NODE   NVARCHAR2(64),
    DATETIME       NVARCHAR2(64),
    DAYS           NUMBER(11),
    REASON         NCLOB,
    ATTACHMENT     NCLOB,
    CREATE_USER    NUMBER(20),
    CREATE_DEPT    NUMBER(20),
    CREATE_TIME    DATE       not null
        constraint SYS_C0012683
            check ("CREATE_TIME" IS NOT NULL)
        constraint SYS_C0015807
            check ("CREATE_TIME" IS NOT NULL),
    UPDATE_USER    NUMBER(20),
    UPDATE_TIME    DATE,
    STATUS         NUMBER(11),
    IS_DELETED     NUMBER(11) default 0,
    FORM_KEY       VARCHAR2(255),
    FORM_URL       VARCHAR2(255)
)
    ;

comment on table QDPORT_WF_PROCESS_LEAVE is '请假流程业务示例'
;

comment on column QDPORT_WF_PROCESS_LEAVE.PROCESS_INS_ID is '流程实例id'
;

comment on column QDPORT_WF_PROCESS_LEAVE.PROCESS_DEF_ID is '流程定义id'
;

comment on column QDPORT_WF_PROCESS_LEAVE.CURRENT_NODE is '当前节点'
;

comment on column QDPORT_WF_PROCESS_LEAVE.DATETIME is '时间范围'
;

comment on column QDPORT_WF_PROCESS_LEAVE.DAYS is '请假天数'
;

comment on column QDPORT_WF_PROCESS_LEAVE.REASON is '请假理由'
;

comment on column QDPORT_WF_PROCESS_LEAVE.ATTACHMENT is '附件'
;

comment on column QDPORT_WF_PROCESS_LEAVE.CREATE_USER is '创建人'
;

comment on column QDPORT_WF_PROCESS_LEAVE.CREATE_DEPT is '创建部门'
;

comment on column QDPORT_WF_PROCESS_LEAVE.CREATE_TIME is '创建时间'
;

comment on column QDPORT_WF_PROCESS_LEAVE.UPDATE_USER is '修改人'
;

comment on column QDPORT_WF_PROCESS_LEAVE.UPDATE_TIME is '修改时间'
;

comment on column QDPORT_WF_PROCESS_LEAVE.STATUS is '状态'
;

comment on column QDPORT_WF_PROCESS_LEAVE.IS_DELETED is '是否已删除'
;

comment on column QDPORT_WF_PROCESS_LEAVE.FORM_KEY is '外置表单key'
;

comment on column QDPORT_WF_PROCESS_LEAVE.FORM_URL is '外置表单url'
;

create table QDPORT_WF_MODEL_SCOPE
(
    ID        NUMBER(20) not null
        constraint SYS_C0012681
            check ("ID" IS NOT NULL)
        constraint SYS_C0015804
            check ("ID" IS NOT NULL),
    MODEL_ID  NVARCHAR2(255),
    MODEL_KEY NVARCHAR2(255),
    TYPE      NVARCHAR2(255),
    VAL       NVARCHAR2(255),
    TEXT      NVARCHAR2(255)
)
    ;

comment on table QDPORT_WF_MODEL_SCOPE is '流程模型权限'
;

comment on column QDPORT_WF_MODEL_SCOPE.MODEL_ID is '模型id'
;

comment on column QDPORT_WF_MODEL_SCOPE.MODEL_KEY is '模型key'
;

comment on column QDPORT_WF_MODEL_SCOPE.TYPE is '类型 user用户 role角色 dept部门 post职位'
;

comment on column QDPORT_WF_MODEL_SCOPE.VAL is '用户;角色;部门;职位 id集合'
;

comment on column QDPORT_WF_MODEL_SCOPE.TEXT is '用户;角色;部门;职位 name集合'
;

create table QDPORT_WF_FORM_HISTORY
(
    ID          NUMBER(20) not null
        constraint SYS_C0012680
            check ("ID" IS NOT NULL)
        constraint SYS_C0015802
            check ("ID" IS NOT NULL),
    FORM_ID     NUMBER(20),
    FORM_KEY    NVARCHAR2(255),
    NAME        NVARCHAR2(255),
    CONTENT     NCLOB,
    APP_CONTENT NCLOB,
    VERSION     NUMBER(11),
    CATEGORY_ID NUMBER(20),
    REMARK      NVARCHAR2(255),
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NUMBER(11),
    IS_DELETED  NUMBER(11)
)
    ;

comment on table QDPORT_WF_FORM_HISTORY is '流程表单'
;

comment on column QDPORT_WF_FORM_HISTORY.FORM_ID is '表单id'
;

comment on column QDPORT_WF_FORM_HISTORY.FORM_KEY is '表单key'
;

comment on column QDPORT_WF_FORM_HISTORY.NAME is '表单名称'
;

comment on column QDPORT_WF_FORM_HISTORY.CONTENT is '表单内容'
;

comment on column QDPORT_WF_FORM_HISTORY.APP_CONTENT is 'app表单内容'
;

comment on column QDPORT_WF_FORM_HISTORY.VERSION is '版本'
;

comment on column QDPORT_WF_FORM_HISTORY.CATEGORY_ID is '分类id'
;

comment on column QDPORT_WF_FORM_HISTORY.REMARK is '备注'
;

comment on column QDPORT_WF_FORM_HISTORY.CREATE_USER is '创建人'
;

comment on column QDPORT_WF_FORM_HISTORY.CREATE_DEPT is '创建部门'
;

comment on column QDPORT_WF_FORM_HISTORY.CREATE_TIME is '创建时间'
;

comment on column QDPORT_WF_FORM_HISTORY.UPDATE_USER is '修改人'
;

comment on column QDPORT_WF_FORM_HISTORY.UPDATE_TIME is '修改时间'
;

comment on column QDPORT_WF_FORM_HISTORY.STATUS is '状态'
;

comment on column QDPORT_WF_FORM_HISTORY.IS_DELETED is '是否已删除'
;

create table QDPORT_WF_FORM_DEFAULT_VALUES
(
    ID          NUMBER(20) not null
        constraint SYS_C0012679
            check ("ID" IS NOT NULL)
        constraint SYS_C0015800
            check ("ID" IS NOT NULL),
    NAME        NVARCHAR2(255),
    CONTENT     NVARCHAR2(255),
    FIELD_TYPE  NVARCHAR2(255),
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NVARCHAR2(255),
    IS_DELETED  NUMBER(11),
    TENANT_ID   NVARCHAR2(12)
)
    ;

comment on table QDPORT_WF_FORM_DEFAULT_VALUES is '流程表单字段默认值'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.NAME is '名称'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.CONTENT is '内容'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.FIELD_TYPE is '字段类型'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.CREATE_USER is '创建人'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.CREATE_DEPT is '创建部门'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.CREATE_TIME is '创建时间'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.UPDATE_USER is '修改人'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.UPDATE_TIME is '修改时间'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.STATUS is '状态'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.IS_DELETED is '是否已删除'
;

comment on column QDPORT_WF_FORM_DEFAULT_VALUES.TENANT_ID is '租户ID'
;

create table QDPORT_WF_FORM
(
    ID          NUMBER(20) not null
        constraint SYS_C0012678
            check ("ID" IS NOT NULL)
        constraint SYS_C0015798
            check ("ID" IS NOT NULL),
    FORM_KEY    NVARCHAR2(255),
    NAME        NVARCHAR2(255),
    CONTENT     NCLOB,
    APP_CONTENT NCLOB,
    VERSION     NUMBER(11),
    CATEGORY_ID NUMBER(20),
    REMARK      NVARCHAR2(255),
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NUMBER(11),
    IS_DELETED  NUMBER(11),
    TENANT_ID   NVARCHAR2(12)
)
    ;

comment on table QDPORT_WF_FORM is '流程表单'
;

comment on column QDPORT_WF_FORM.FORM_KEY is '表单key'
;

comment on column QDPORT_WF_FORM.NAME is '表单名称'
;

comment on column QDPORT_WF_FORM.CONTENT is '表单内容'
;

comment on column QDPORT_WF_FORM.APP_CONTENT is 'app表单内容'
;

comment on column QDPORT_WF_FORM.VERSION is '版本'
;

comment on column QDPORT_WF_FORM.CATEGORY_ID is '分类id'
;

comment on column QDPORT_WF_FORM.REMARK is '备注'
;

comment on column QDPORT_WF_FORM.CREATE_USER is '创建人'
;

comment on column QDPORT_WF_FORM.CREATE_DEPT is '创建部门'
;

comment on column QDPORT_WF_FORM.CREATE_TIME is '创建时间'
;

comment on column QDPORT_WF_FORM.UPDATE_USER is '修改人'
;

comment on column QDPORT_WF_FORM.UPDATE_TIME is '修改时间'
;

comment on column QDPORT_WF_FORM.STATUS is '状态'
;

comment on column QDPORT_WF_FORM.IS_DELETED is '是否已删除'
;

comment on column QDPORT_WF_FORM.TENANT_ID is '租户ID'
;

create table QDPORT_WF_DRAFT
(
    ID             NUMBER(20) not null
        constraint SYS_C0012677
            check ("ID" IS NOT NULL)
        constraint SYS_C0015796
            check ("ID" IS NOT NULL),
    USER_ID        NUMBER(20),
    FORM_KEY       NVARCHAR2(255),
    PROCESS_DEF_ID NVARCHAR2(255),
    VARIABLES      NCLOB,
    PLATFORM       NVARCHAR2(255)
)
    ;

comment on table QDPORT_WF_DRAFT is '流程草稿箱'
;

comment on column QDPORT_WF_DRAFT.USER_ID is '用户id'
;

comment on column QDPORT_WF_DRAFT.FORM_KEY is '表单key'
;

comment on column QDPORT_WF_DRAFT.PROCESS_DEF_ID is '流程定义id'
;

comment on column QDPORT_WF_DRAFT.VARIABLES is '表单变量'
;

comment on column QDPORT_WF_DRAFT.PLATFORM is '平台 pc;app'
;

create table QDPORT_WF_DEPLOYMENT_FORM
(
    ID            NUMBER(20) not null
        constraint SYS_C0012676
            check ("ID" IS NOT NULL)
        constraint SYS_C0015794
            check ("ID" IS NOT NULL),
    DEPLOYMENT_ID NVARCHAR2(255),
    FORM_KEY      NVARCHAR2(255),
    CONTENT       NCLOB,
    APP_CONTENT   NCLOB,
    TASK_KEY      NVARCHAR2(255),
    TASK_NAME     NVARCHAR2(255),
    CREATE_USER   NUMBER(20),
    CREATE_DEPT   NUMBER(20),
    CREATE_TIME   DATE,
    UPDATE_USER   NUMBER(20),
    UPDATE_TIME   DATE,
    STATUS        NVARCHAR2(255),
    IS_DELETED    NUMBER(11) default 0
)
    ;

comment on table QDPORT_WF_DEPLOYMENT_FORM is '流程部署 - 表单'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.DEPLOYMENT_ID is '流程部署id'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.FORM_KEY is '表单key'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.CONTENT is '表单内容'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.APP_CONTENT is 'app表单内容'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.TASK_KEY is '节点key'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.TASK_NAME is '节点名称'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.CREATE_USER is '创建人'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.CREATE_DEPT is '创建部门'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.CREATE_TIME is '创建时间'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.UPDATE_USER is '修改人'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.UPDATE_TIME is '修改时间'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.STATUS is '状态'
;

comment on column QDPORT_WF_DEPLOYMENT_FORM.IS_DELETED is '是否已删除'
;

create table QDPORT_WF_COPY
(
    ID          NUMBER(20) not null
        constraint SYS_C0012675
            check ("ID" IS NOT NULL)
        constraint SYS_C0015792
            check ("ID" IS NOT NULL),
    USER_ID     NUMBER(20),
    TITLE       NVARCHAR2(255),
    INITIATOR   NVARCHAR2(255),
    TASK_ID     NVARCHAR2(255),
    PROCESS_ID  NVARCHAR2(255),
    FORM_KEY    NVARCHAR2(255),
    FORM_URL    NVARCHAR2(255),
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NVARCHAR2(255),
    IS_DELETED  NUMBER(11)
)
    ;

comment on table QDPORT_WF_COPY is '流程抄送'
;

comment on column QDPORT_WF_COPY.USER_ID is '用户id'
;

comment on column QDPORT_WF_COPY.TITLE is '标题'
;

comment on column QDPORT_WF_COPY.INITIATOR is '发起者'
;

comment on column QDPORT_WF_COPY.TASK_ID is '任务id'
;

comment on column QDPORT_WF_COPY.PROCESS_ID is '流程实例id'
;

comment on column QDPORT_WF_COPY.FORM_KEY is '外置表单key'
;

comment on column QDPORT_WF_COPY.FORM_URL is '外置表单url'
;

comment on column QDPORT_WF_COPY.CREATE_USER is '创建人'
;

comment on column QDPORT_WF_COPY.CREATE_DEPT is '创建部门'
;

comment on column QDPORT_WF_COPY.CREATE_TIME is '创建时间'
;

comment on column QDPORT_WF_COPY.UPDATE_USER is '修改人'
;

comment on column QDPORT_WF_COPY.UPDATE_TIME is '修改时间'
;

comment on column QDPORT_WF_COPY.STATUS is '状态'
;

comment on column QDPORT_WF_COPY.IS_DELETED is '是否已删除'
;

create table QDPORT_WF_CONDITION
(
    ID          NUMBER(20) not null
        constraint SYS_C0012674
            check ("ID" IS NOT NULL)
        constraint SYS_C0015790
            check ("ID" IS NOT NULL),
    NAME        NVARCHAR2(255),
    EXPRESSION  NVARCHAR2(255),
    TYPE        NVARCHAR2(255),
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NVARCHAR2(255),
    IS_DELETED  NUMBER(11),
    TENANT_ID   NVARCHAR2(12)
)
    ;

comment on table QDPORT_WF_CONDITION is '流程表达式'
;

comment on column QDPORT_WF_CONDITION.NAME is '名称'
;

comment on column QDPORT_WF_CONDITION.EXPRESSION is '表达式'
;

comment on column QDPORT_WF_CONDITION.TYPE is '类型'
;

comment on column QDPORT_WF_CONDITION.CREATE_USER is '创建人'
;

comment on column QDPORT_WF_CONDITION.CREATE_DEPT is '创建部门'
;

comment on column QDPORT_WF_CONDITION.CREATE_TIME is '创建时间'
;

comment on column QDPORT_WF_CONDITION.UPDATE_USER is '修改人'
;

comment on column QDPORT_WF_CONDITION.UPDATE_TIME is '修改时间'
;

comment on column QDPORT_WF_CONDITION.STATUS is '状态'
;

comment on column QDPORT_WF_CONDITION.IS_DELETED is '是否已删除'
;

comment on column QDPORT_WF_CONDITION.TENANT_ID is '租户ID'
;

create table QDPORT_WF_CATEGORY
(
    ID          NUMBER(20) not null
        constraint SYS_C0012673
            check ("ID" IS NOT NULL)
        constraint SYS_C0015788
            check ("ID" IS NOT NULL),
    NAME        NVARCHAR2(255),
    PID         NUMBER(20) default 0,
    SORT        NUMBER(11),
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NVARCHAR2(255),
    IS_DELETED  NUMBER(11),
    TENANT_ID   NVARCHAR2(12)
)
    ;

comment on table QDPORT_WF_CATEGORY is '流程分类'
;

comment on column QDPORT_WF_CATEGORY.NAME is '分类名称'
;

comment on column QDPORT_WF_CATEGORY.PID is '上级id'
;

comment on column QDPORT_WF_CATEGORY.SORT is '排序'
;

comment on column QDPORT_WF_CATEGORY.CREATE_USER is '创建人'
;

comment on column QDPORT_WF_CATEGORY.CREATE_DEPT is '创建部门'
;

comment on column QDPORT_WF_CATEGORY.CREATE_TIME is '创建时间'
;

comment on column QDPORT_WF_CATEGORY.UPDATE_USER is '修改人'
;

comment on column QDPORT_WF_CATEGORY.UPDATE_TIME is '修改时间'
;

comment on column QDPORT_WF_CATEGORY.STATUS is '状态'
;

comment on column QDPORT_WF_CATEGORY.IS_DELETED is '是否已删除'
;

comment on column QDPORT_WF_CATEGORY.TENANT_ID is '租户ID'
;

create table QDPORT_WF_BUTTON
(
    ID          NUMBER(20) not null
        constraint SYS_C0012672
            check ("ID" IS NOT NULL)
        constraint SYS_C0015786
            check ("ID" IS NOT NULL),
    BUTTON_KEY  NVARCHAR2(255),
    NAME        NVARCHAR2(255),
    DISPLAY     NUMBER(4),
    SORT        NUMBER(11),
    CREATE_USER NUMBER(20),
    CREATE_DEPT NUMBER(20),
    CREATE_TIME DATE,
    UPDATE_USER NUMBER(20),
    UPDATE_TIME DATE,
    STATUS      NVARCHAR2(255),
    IS_DELETED  NUMBER(11)    default 0,
    TENANT_ID   NVARCHAR2(12) default '000000'
)
    ;

comment on table QDPORT_WF_BUTTON is '流程按钮'
;

comment on column QDPORT_WF_BUTTON.BUTTON_KEY is '按钮key'
;

comment on column QDPORT_WF_BUTTON.NAME is '名称'
;

comment on column QDPORT_WF_BUTTON.DISPLAY is '默认是否显示'
;

comment on column QDPORT_WF_BUTTON.SORT is '排序'
;

comment on column QDPORT_WF_BUTTON.CREATE_USER is '创建人'
;

comment on column QDPORT_WF_BUTTON.CREATE_DEPT is '创建部门'
;

comment on column QDPORT_WF_BUTTON.CREATE_TIME is '创建时间'
;

comment on column QDPORT_WF_BUTTON.UPDATE_USER is '修改人'
;

comment on column QDPORT_WF_BUTTON.UPDATE_TIME is '修改时间'
;

comment on column QDPORT_WF_BUTTON.STATUS is '状态'
;

comment on column QDPORT_WF_BUTTON.IS_DELETED is '是否已删除'
;

comment on column QDPORT_WF_BUTTON.TENANT_ID is '租户ID'
;


create table GRID_INFO
(
    ID               NUMBER(20) not null
        primary key,
    ROUTING_ADDRESS  VARCHAR2(100),
    PRIORITY         NUMBER(10),
    REMARK           VARCHAR2(50) default NULL,
    CREATE_TIME      TIMESTAMP(6) default NULL,
    CREATE_USER_ID   VARCHAR2(50) default NULL,
    CREATE_USER_NAME VARCHAR2(50) default NULL,
    UPDATE_TIME      TIMESTAMP(6) default NULL,
    UPDATE_USER_ID   VARCHAR2(50) default NULL,
    UPDATE_USER_NAME VARCHAR2(50) default NULL
)
    ;

comment on table GRID_INFO is 'GRID基础信息'
;

comment on column GRID_INFO.ID is '表单主键'
;

comment on column GRID_INFO.ROUTING_ADDRESS is '路由地址'
;

comment on column GRID_INFO.PRIORITY is '优先级（根据等级选择1用户0管理员）'
;

comment on column GRID_INFO.REMARK is '备注'
;

comment on column GRID_INFO.CREATE_TIME is '创建时间'
;

comment on column GRID_INFO.CREATE_USER_ID is '创建人'
;

comment on column GRID_INFO.CREATE_USER_NAME is '创建人'
;

comment on column GRID_INFO.UPDATE_TIME is '修改时间'
;

comment on column GRID_INFO.UPDATE_USER_ID is '修改人id'
;

comment on column GRID_INFO.UPDATE_USER_NAME is '修改人姓名'
;

create table GRID_FOUNDATION
(
    ID               NUMBER(20) not null
        primary key,
    GRID_ID          NUMBER(20),
    FIELD_PROPERTIES VARCHAR2(50),
    FIELD_NAME       VARCHAR2(50),
    FIELD_SORT       CHAR(2),
    FIELD_HIDE       CHAR(2),
    FIELD_FREEZE     CHAR(2),
    FIELD_WIDTH      NUMBER,
    FIELD_ORDER      NUMBER,
    REMARK           VARCHAR2(50) default NULL,
    CREATE_TIME      TIMESTAMP(6) default NULL,
    CREATE_USER_ID   VARCHAR2(50) default NULL,
    CREATE_USER_NAME VARCHAR2(50) default NULL,
    UPDATE_TIME      TIMESTAMP(6) default NULL,
    UPDATE_USER_ID   VARCHAR2(50) default NULL,
    UPDATE_USER_NAME VARCHAR2(50) default NULL
)
    ;

comment on table GRID_FOUNDATION is 'GRID详细信息'
;

comment on column GRID_FOUNDATION.ID is '表单主键'
;

comment on column GRID_FOUNDATION.GRID_ID is '外键'
;

comment on column GRID_FOUNDATION.FIELD_PROPERTIES is '字段属性'
;

comment on column GRID_FOUNDATION.FIELD_NAME is '字段名称'
;

comment on column GRID_FOUNDATION.FIELD_SORT is '排序（1是0否）'
;

comment on column GRID_FOUNDATION.FIELD_HIDE is '隐藏（1是0否）'
;

comment on column GRID_FOUNDATION.FIELD_FREEZE is '冻结（1是0否）'
;

comment on column GRID_FOUNDATION.FIELD_WIDTH is '宽度'
;

comment on column GRID_FOUNDATION.FIELD_ORDER is '顺序'
;

comment on column GRID_FOUNDATION.REMARK is '备注'
;

comment on column GRID_FOUNDATION.CREATE_TIME is '创建时间'
;

comment on column GRID_FOUNDATION.CREATE_USER_ID is '创建人'
;

comment on column GRID_FOUNDATION.CREATE_USER_NAME is '创建人'
;

comment on column GRID_FOUNDATION.UPDATE_TIME is '修改时间'
;

comment on column GRID_FOUNDATION.UPDATE_USER_ID is '修改人id'
;

comment on column GRID_FOUNDATION.UPDATE_USER_NAME is '修改人姓名'
;


create table GEN_TABLE_FIELD
(
    ID              NUMBER(20) default "GEN_TABLE_FIELD_SEQ"."NEXTVAL" not null
        constraint SYS_C0010995
            primary key
        constraint SYS_C0010994
            check ("ID" IS NOT NULL)
        constraint SYS_C0014527
            check ("ID" IS NOT NULL),
    TABLE_ID        NUMBER(20),
    FIELD_NAME      VARCHAR2(200),
    FIELD_TYPE      VARCHAR2(200),
    FIELD_COMMENT   VARCHAR2(200),
    ATTR_NAME       VARCHAR2(200),
    ATTR_TYPE       VARCHAR2(200),
    PACKAGE_NAME    VARCHAR2(200),
    SORT            NUMBER(10),
    AUTO_FILL       VARCHAR2(20),
    PRIMARY_PK      NUMBER(2),
    BASE_FIELD      NUMBER(2),
    FORM_ITEM       NUMBER(2),
    FORM_REQUIRED   NUMBER(2),
    FORM_TYPE       VARCHAR2(200),
    FORM_DICT       VARCHAR2(200),
    FORM_VALIDATOR  VARCHAR2(200),
    GRID_ITEM       NUMBER(2),
    GRID_SORT       NUMBER(2),
    QUERY_ITEM      NUMBER(2),
    QUERY_TYPE      VARCHAR2(200),
    QUERY_FORM_TYPE VARCHAR2(200)
)
    ;

comment on table GEN_TABLE_FIELD is '代码生成表字段'
;

comment on column GEN_TABLE_FIELD.ID is 'id'
;

comment on column GEN_TABLE_FIELD.TABLE_ID is '表ID'
;

comment on column GEN_TABLE_FIELD.FIELD_NAME is '字段名称'
;

comment on column GEN_TABLE_FIELD.FIELD_TYPE is '字段类型'
;

comment on column GEN_TABLE_FIELD.FIELD_COMMENT is '字段说明'
;

comment on column GEN_TABLE_FIELD.ATTR_NAME is '属性名'
;

comment on column GEN_TABLE_FIELD.ATTR_TYPE is '属性类型'
;

comment on column GEN_TABLE_FIELD.PACKAGE_NAME is '属性包名'
;

comment on column GEN_TABLE_FIELD.SORT is '排序'
;

comment on column GEN_TABLE_FIELD.AUTO_FILL is '自动填充  DEFAULT、INSERT、UPDATE、INSERT_UPDATE'
;

comment on column GEN_TABLE_FIELD.PRIMARY_PK is '主键 0：否  1：是'
;

comment on column GEN_TABLE_FIELD.BASE_FIELD is '基类字段 0：否  1：是'
;

comment on column GEN_TABLE_FIELD.FORM_ITEM is '表单项 0：否  1：是'
;

comment on column GEN_TABLE_FIELD.FORM_REQUIRED is '表单必填 0：否  1：是'
;

comment on column GEN_TABLE_FIELD.FORM_TYPE is '表单类型'
;

comment on column GEN_TABLE_FIELD.FORM_DICT is '表单字典类型'
;

comment on column GEN_TABLE_FIELD.FORM_VALIDATOR is '表单效验'
;

comment on column GEN_TABLE_FIELD.GRID_ITEM is '列表项 0：否  1：是'
;

comment on column GEN_TABLE_FIELD.GRID_SORT is '列表排序 0：否  1：是'
;

comment on column GEN_TABLE_FIELD.QUERY_ITEM is '查询项 0：否  1：是'
;

comment on column GEN_TABLE_FIELD.QUERY_TYPE is '查询方式'
;

comment on column GEN_TABLE_FIELD.QUERY_FORM_TYPE is '查询表单类型'
;

create table GEN_TABLE
(
    ID             NUMBER(20) default "GEN_TABLE_SEQ"."NEXTVAL" not null
        constraint SYS_C0010993
            primary key
        constraint SYS_C0010992
            check ("ID" IS NOT NULL)
        constraint SYS_C0014526
            check ("ID" IS NOT NULL),
    TABLE_NAME     VARCHAR2(200),
    CLASS_NAME     VARCHAR2(200),
    TABLE_COMMENT  VARCHAR2(200),
    AUTHOR         VARCHAR2(200),
    EMAIL          VARCHAR2(200),
    PACKAGE_NAME   VARCHAR2(200),
    VERSION        VARCHAR2(200),
    GENERATOR_TYPE NUMBER(2),
    BACKEND_PATH   VARCHAR2(500),
    FRONTEND_PATH  VARCHAR2(500),
    MODULE_NAME    VARCHAR2(200),
    FUNCTION_NAME  VARCHAR2(200),
    FORM_LAYOUT    NUMBER(2),
    DATASOURCE_ID  NUMBER(20),
    BASECLASS_ID   NUMBER(20),
    CREATE_TIME    DATE
)
    ;

comment on table GEN_TABLE is '代码生成表'
;

comment on column GEN_TABLE.ID is 'id'
;

comment on column GEN_TABLE.TABLE_NAME is '表名'
;

comment on column GEN_TABLE.CLASS_NAME is '类名'
;

comment on column GEN_TABLE.TABLE_COMMENT is '说明'
;

comment on column GEN_TABLE.AUTHOR is '作者'
;

comment on column GEN_TABLE.EMAIL is '邮箱'
;

comment on column GEN_TABLE.PACKAGE_NAME is '项目包名'
;

comment on column GEN_TABLE.VERSION is '项目版本号'
;

comment on column GEN_TABLE.GENERATOR_TYPE is '生成方式  0：zip压缩包   1：自定义目录'
;

comment on column GEN_TABLE.BACKEND_PATH is '后端生成路径'
;

comment on column GEN_TABLE.FRONTEND_PATH is '前端生成路径'
;

comment on column GEN_TABLE.MODULE_NAME is '模块名'
;

comment on column GEN_TABLE.FUNCTION_NAME is '功能名'
;

comment on column GEN_TABLE.FORM_LAYOUT is '表单布局  1：一列   2：两列'
;

comment on column GEN_TABLE.DATASOURCE_ID is '数据源ID'
;

comment on column GEN_TABLE.BASECLASS_ID is '基类ID'
;

comment on column GEN_TABLE.CREATE_TIME is '创建时间'
;

create unique index GEN_TABLE_NAME
    on GEN_TABLE (TABLE_NAME)
    ;

create table GEN_PROJECT_MODIFY
(
    ID                     NUMBER(20) default "GEN_PROJECT_MODIFY_SEQ"."NEXTVAL" not null
        constraint SYS_C0010997
            primary key
        constraint SYS_C0010996
            check ("ID" IS NOT NULL)
        constraint SYS_C0014525
            check ("ID" IS NOT NULL),
    PROJECT_NAME           VARCHAR2(100),
    PROJECT_CODE           VARCHAR2(100),
    PROJECT_PACKAGE        VARCHAR2(100),
    PROJECT_PATH           VARCHAR2(200),
    MODIFY_PROJECT_NAME    VARCHAR2(100),
    MODIFY_PROJECT_CODE    VARCHAR2(100),
    MODIFY_PROJECT_PACKAGE VARCHAR2(100),
    EXCLUSIONS             VARCHAR2(200),
    MODIFY_SUFFIX          VARCHAR2(200),
    MODIFY_TMP_PATH        VARCHAR2(100),
    CREATE_TIME            DATE
)
    ;

comment on table GEN_PROJECT_MODIFY is '项目名变更'
;

comment on column GEN_PROJECT_MODIFY.ID is 'id'
;

comment on column GEN_PROJECT_MODIFY.PROJECT_NAME is '项目名'
;

comment on column GEN_PROJECT_MODIFY.PROJECT_CODE is '项目标识'
;

comment on column GEN_PROJECT_MODIFY.PROJECT_PACKAGE is '项目包名'
;

comment on column GEN_PROJECT_MODIFY.PROJECT_PATH is '项目路径'
;

comment on column GEN_PROJECT_MODIFY.MODIFY_PROJECT_NAME is '变更项目名'
;

comment on column GEN_PROJECT_MODIFY.MODIFY_PROJECT_CODE is '变更标识'
;

comment on column GEN_PROJECT_MODIFY.MODIFY_PROJECT_PACKAGE is '变更包名'
;

comment on column GEN_PROJECT_MODIFY.EXCLUSIONS is '排除文件'
;

comment on column GEN_PROJECT_MODIFY.MODIFY_SUFFIX is '变更文件'
;

comment on column GEN_PROJECT_MODIFY.MODIFY_TMP_PATH is '变更临时路径'
;

comment on column GEN_PROJECT_MODIFY.CREATE_TIME is '创建时间'
;

create table GEN_FIELD_TYPE
(
    ID           NUMBER(20) default "GEN_FIELD_TYPE_SEQ"."NEXTVAL" not null
        constraint SYS_C0010989
            primary key
        constraint SYS_C0010988
            check ("ID" IS NOT NULL)
        constraint SYS_C0014524
            check ("ID" IS NOT NULL),
    COLUMN_TYPE  VARCHAR2(200),
    ATTR_TYPE    VARCHAR2(200),
    PACKAGE_NAME VARCHAR2(200),
    CREATE_TIME  DATE
)
    ;

comment on table GEN_FIELD_TYPE is '字段类型管理'
;

comment on column GEN_FIELD_TYPE.ID is 'id'
;

comment on column GEN_FIELD_TYPE.COLUMN_TYPE is '字段类型'
;

comment on column GEN_FIELD_TYPE.ATTR_TYPE is '属性类型'
;

comment on column GEN_FIELD_TYPE.PACKAGE_NAME is '属性包名'
;

comment on column GEN_FIELD_TYPE.CREATE_TIME is '创建时间'
;

create unique index GEN_COLUMN_TYPE
    on GEN_FIELD_TYPE (COLUMN_TYPE)
    ;

create table GEN_DATASOURCE
(
    ID          NUMBER(20) default "GEN_DATASOURCE_SEQ"."NEXTVAL" not null
        constraint SYS_C0010987
            primary key
        constraint SYS_C0010986
            check ("ID" IS NOT NULL)
        constraint SYS_C0014523
            check ("ID" IS NOT NULL),
    DB_TYPE     VARCHAR2(200),
    CONN_NAME   VARCHAR2(200),
    CONN_URL    VARCHAR2(500),
    USERNAME    VARCHAR2(200),
    PASSWORD    VARCHAR2(200),
    CREATE_TIME DATE
)
    ;

comment on table GEN_DATASOURCE is '数据源管理'
;

comment on column GEN_DATASOURCE.ID is 'id'
;

comment on column GEN_DATASOURCE.DB_TYPE is '数据库类型'
;

comment on column GEN_DATASOURCE.CONN_NAME is '连接名'
;

comment on column GEN_DATASOURCE.CONN_URL is 'URL'
;

comment on column GEN_DATASOURCE.USERNAME is '用户名'
;

comment on column GEN_DATASOURCE.PASSWORD is '密码'
;

comment on column GEN_DATASOURCE.CREATE_TIME is '创建时间'
;

create table GEN_BASE_CLASS
(
    ID           NUMBER(20) default "GEN_BASE_CLASS_SEQ"."NEXTVAL" not null
        constraint SYS_C0010991
            primary key
        constraint SYS_C0010990
            check ("ID" IS NOT NULL)
        constraint SYS_C0014522
            check ("ID" IS NOT NULL),
    PACKAGE_NAME VARCHAR2(200),
    CODE         VARCHAR2(200),
    FIELDS       VARCHAR2(500),
    REMARK       VARCHAR2(200),
    CREATE_TIME  DATE
)
    ;

comment on table GEN_BASE_CLASS is '基类管理'
;

comment on column GEN_BASE_CLASS.ID is 'id'
;

comment on column GEN_BASE_CLASS.PACKAGE_NAME is '基类包名'
;

comment on column GEN_BASE_CLASS.CODE is '基类编码'
;

comment on column GEN_BASE_CLASS.FIELDS is '基类字段，多个用英文逗号分隔'
;

comment on column GEN_BASE_CLASS.REMARK is '备注'
;

comment on column GEN_BASE_CLASS.CREATE_TIME is '创建时间'
;



create table ACT_DE_MODEL
(
    ID                      NVARCHAR2(255)         not null
        constraint SYS_C0012501
            check ("ID" IS NOT NULL)
        constraint SYS_C0012506
            check ("ID" IS NOT NULL),
    NAME                    NVARCHAR2(400)         not null
        constraint SYS_C0012502
            check ("NAME" IS NOT NULL)
        constraint SYS_C0012507
            check ("NAME" IS NOT NULL),
    MODEL_KEY               NVARCHAR2(400)         not null
        constraint SYS_C0012503
            check ("MODEL_KEY" IS NOT NULL)
        constraint SYS_C0012508
            check ("MODEL_KEY" IS NOT NULL),
    FORM_KEY                NVARCHAR2(255),
    CATEGORY_ID             NUMBER(20),
    DESCRIPTION             NCLOB,
    MODEL_COMMENT           NCLOB,
    CREATED                 DATE,
    CREATED_BY              NVARCHAR2(255),
    LAST_UPDATED            DATE,
    LAST_UPDATED_BY         NVARCHAR2(255),
    VERSION                 NUMBER(11),
    XML                     NCLOB,
    MODEL_EDITOR_JSON       NCLOB,
    THUMBNAIL               BLOB,
    MODEL_TYPE              NUMBER(11),
    TENANT_ID               NVARCHAR2(255),
    ICON                    NVARCHAR2(255),
    SEND_NOTICE             NUMBER(1)    default 0 not null,
    TIMEOUT_NOTICE_DURATION NUMBER(8, 2) default 0 not null
)
    ;

comment on table ACT_DE_MODEL is '流程 - 定义 - 模型'
;

comment on column ACT_DE_MODEL.NAME is '名称'
;

comment on column ACT_DE_MODEL.MODEL_KEY is '模型标识'
;

comment on column ACT_DE_MODEL.FORM_KEY is '表单标识'
;

comment on column ACT_DE_MODEL.CATEGORY_ID is '分类id'
;

comment on column ACT_DE_MODEL.DESCRIPTION is '描述'
;

comment on column ACT_DE_MODEL.MODEL_COMMENT is '评论'
;

comment on column ACT_DE_MODEL.CREATED is '创建时间'
;

comment on column ACT_DE_MODEL.CREATED_BY is '创建人'
;

comment on column ACT_DE_MODEL.LAST_UPDATED is '最后更新时间'
;

comment on column ACT_DE_MODEL.LAST_UPDATED_BY is '最后更新人'
;

comment on column ACT_DE_MODEL.VERSION is '版本'
;

comment on column ACT_DE_MODEL.XML is 'xml'
;

comment on column ACT_DE_MODEL.MODEL_EDITOR_JSON is 'flowable-ui编辑器json'
;

comment on column ACT_DE_MODEL.THUMBNAIL is '缩略图'
;

comment on column ACT_DE_MODEL.MODEL_TYPE is '类型'
;

comment on column ACT_DE_MODEL.TENANT_ID is '租户id'
;

comment on column ACT_DE_MODEL.ICON is '图标'
;

comment on column ACT_DE_MODEL.SEND_NOTICE is '是否通知审批人 0通知 1不通知'
;

comment on column ACT_DE_MODEL.TIMEOUT_NOTICE_DURATION is '审批超时提醒时长 （小时）0为不通知'
;

create table ACT_DE_MODEL_HISTORY
(
    ID                NVARCHAR2(255) not null
        constraint SYS_C0012382
            primary key
        constraint SYS_C0012364
            check ("ID" IS NOT NULL)
        constraint SYS_C0012509
            check ("ID" IS NOT NULL),
    NAME              NVARCHAR2(400) not null
        constraint SYS_C0012365
            check ("NAME" IS NOT NULL)
        constraint SYS_C0012510
            check ("NAME" IS NOT NULL),
    MODEL_KEY         NVARCHAR2(400) not null
        constraint SYS_C0012366
            check ("MODEL_KEY" IS NOT NULL)
        constraint SYS_C0012511
            check ("MODEL_KEY" IS NOT NULL),
    FORM_KEY          NVARCHAR2(255),
    CATEGORY_ID       NUMBER(20),
    DESCRIPTION       NCLOB,
    MODEL_COMMENT     NCLOB,
    CREATED           DATE,
    CREATED_BY        NVARCHAR2(255),
    LAST_UPDATED      DATE,
    LAST_UPDATED_BY   NVARCHAR2(255),
    REMOVAL_DATE      DATE,
    VERSION           NUMBER(11),
    XML               NCLOB,
    MODEL_EDITOR_JSON NCLOB,
    MODEL_ID          NVARCHAR2(255) not null
        constraint SYS_C0012367
            check ("MODEL_ID" IS NOT NULL)
        constraint SYS_C0012512
            check ("MODEL_ID" IS NOT NULL),
    MODEL_TYPE        NUMBER(11),
    TENANT_ID         NVARCHAR2(255),
    ICON              NVARCHAR2(255)
)
    ;

comment on table ACT_DE_MODEL_HISTORY is '流程 - 定义 - 模型历史'
;

comment on column ACT_DE_MODEL_HISTORY.NAME is '名称'
;

comment on column ACT_DE_MODEL_HISTORY.MODEL_KEY is '模型标识'
;

comment on column ACT_DE_MODEL_HISTORY.FORM_KEY is '表单标识'
;

comment on column ACT_DE_MODEL_HISTORY.CATEGORY_ID is '分类id'
;

comment on column ACT_DE_MODEL_HISTORY.DESCRIPTION is '描述'
;

comment on column ACT_DE_MODEL_HISTORY.MODEL_COMMENT is '注释'
;

comment on column ACT_DE_MODEL_HISTORY.CREATED is '创建时间'
;

comment on column ACT_DE_MODEL_HISTORY.CREATED_BY is '创建人'
;

comment on column ACT_DE_MODEL_HISTORY.LAST_UPDATED is '最后更新时间'
;

comment on column ACT_DE_MODEL_HISTORY.LAST_UPDATED_BY is '最后更新人'
;

comment on column ACT_DE_MODEL_HISTORY.REMOVAL_DATE is '移除时间'
;

comment on column ACT_DE_MODEL_HISTORY.VERSION is '版本'
;

comment on column ACT_DE_MODEL_HISTORY.XML is 'xml'
;

comment on column ACT_DE_MODEL_HISTORY.MODEL_EDITOR_JSON is 'flowable-ui编辑器json'
;

comment on column ACT_DE_MODEL_HISTORY.MODEL_ID is 'modelId'
;

comment on column ACT_DE_MODEL_HISTORY.MODEL_TYPE is '类型'
;

comment on column ACT_DE_MODEL_HISTORY.TENANT_ID is '租户id'
;

comment on column ACT_DE_MODEL_HISTORY.ICON is '图标'
;

