-- JCL_ORG_SCHEME
CREATE TABLE JCL_ORG_SCHEME (
    ID NUMBER NOT NULL,
    SCHEME_NO NVARCHAR2(100) NULL,
    SCHEME_NAME NVARCHAR2(100) NULL,
    SCHEME_DESCRIPTION NVARCHAR2(1000) NULL,
    FORBIDDEN_TAG NUMBER NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_SCHEME_PK PRIMARY KEY (ID)
);
-- JCL_ORG_LEVEL
CREATE TABLE JCL_ORG_LEVEL (
    ID NUMBER NOT NULL,
    LEVEL_NO NVARCHAR2(100) NULL,
    LEVEL_NAME NVARCHAR2(100) NULL,
    DESCRIPTION NVARCHAR2(1000) NULL,
    SCHEME_ID NUMBER NULL,
    FORBIDDEN_TAG NUMBER NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_LEVEL_PK PRIMARY KEY (ID)
);

-- JCL_ORG_GRADE
CREATE TABLE JCL_ORG_GRADE (
    ID NUMBER NOT NULL,
    GRADE_NO NVARCHAR2(100) NULL,
    GRADE_NAME NVARCHAR2(100) NULL,
    DESCRIPTION NVARCHAR2(1000) NULL,
    SCHEME_ID NUMBER NULL,
    LEVEL_ID NVARCHAR2(100) NULL,
    FORBIDDEN_TAG NUMBER NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_GRADE_PK PRIMARY KEY (ID)
);


-- JCL_ORG_SEQUENCE
CREATE TABLE JCL_ORG_SEQUENCE (
    ID NUMBER NOT NULL,
    SEQUENCE_NO NVARCHAR2(100) NULL,
    SEQUENCE_NAME NVARCHAR2(100) NULL,
    DESCRIPTION NVARCHAR2(1000) NULL,
    SCHEME_ID NUMBER NULL,
    FORBIDDEN_TAG NUMBER NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_SEQUENCE_PK PRIMARY KEY (ID)
);

-- JCL_ORG_POST
CREATE TABLE JCL_ORG_POST (
    ID NUMBER NOT NULL,
    POST_NO NVARCHAR2(100) NULL,
    POST_NAME NVARCHAR2(100) NULL,
    DESCRIPTION NVARCHAR2(1000) NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_POST_PK PRIMARY KEY (ID)
);

-- JCL_ORG_POST_INFO
CREATE TABLE JCL_ORG_POST_INFO (
    ID NUMBER NOT NULL,
    POST_INFO_NO NVARCHAR2(100) NULL,
    POST_INFO_NAME NVARCHAR2(100) NULL,
    POST_INFO_AUTHORITY NVARCHAR2(1000) NULL,
    POST_INFO_DUTY NVARCHAR2(1000) NULL,
    POST_INFO_QUALIFICATION NVARCHAR2(1000) NULL,
    POST_ID NUMBER NULL,
    DESCRIPTION NVARCHAR2(1000) NULL,
    FORBIDDEN_TAG NUMBER NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_POST_INFO_PK PRIMARY KEY (ID)
);

-- JCL_ORG_COMP
CREATE TABLE JCL_ORG_COMP (
    ID NUMBER NOT NULL,
    COMP_NO NVARCHAR2(100) NULL,
    COMP_NAME NVARCHAR2(100) NULL,
    COMP_NAME_SHORT NVARCHAR2(100) NULL,
    PARENT_COMPANY NUMBER NULL,
    ORG_CODE NVARCHAR2(100) NULL,
    INDUSTRY NUMBER NULL,
    COMP_PRINCIPAL NUMBER NULL,
    DESCRIPTION NVARCHAR2(1000) NULL,
    FORBIDDEN_TAG NUMBER NULL,
    SHOW_ORDER NUMBER NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    UUID NVARCHAR2(100) NULL,
    CONSTRAINT JCL_ORG_COMP_PK PRIMARY KEY (ID)
);

-- JCL_FIELD_EXTENDGROUP
CREATE TABLE JCL_FIELD_EXTENDGROUP (
    ID NUMBER NOT NULL,
    PID NUMBER NULL,
    EXTEND_TYPE NUMBER NULL,
    GROUP_NAME NVARCHAR2(100) NULL,
    SHOW_ORDER NUMBER null,
    IS_SHOW NVARCHAR2(100) NULL,
    IS_SYSTEM_DEFAULT NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_FIELD_EXTENDGROUP_PK PRIMARY KEY (ID)
);

-- JCL_FIELD_EXTENDTITLE
CREATE TABLE JCL_FIELD_EXTENDTITLE (
    ID NUMBER NOT NULL,
    GROUP_ID NUMBER NULL,
    TITLE VARCHAR(100) NULL,
    SHOW_ORDER NUMBER NULL,
    IS_SHOW NUMBER NULL,
    IS_SYSTEM_DEFAULT NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_FIELD_EXTENDTITLE_PK PRIMARY KEY (ID)
);

-- JCL_FIELD_EXTENDINFO
CREATE TABLE JCL_FIELD_EXTENDINFO (
    ID NUMBER NOT NULL,
    EXTEND_TYPE NUMBER NULL,
    TABLE_NAME NVARCHAR2(100) NULL,
    FIELD_NAME NVARCHAR2(100) NULL,
    FIELD_NAME_DESC NVARCHAR2(100) NULL,
    FIELD_TYPE NVARCHAR2(1000) NULL,
    CONTROL_TYPE NUMBER NULL,
    CUSTOM_VALUE NVARCHAR2(1000) NULL,
    BROWSER_TYPE  NVARCHAR2(100) NULL,
    EXTEND_GROUP_ID NUMBER NULL,
    ISENABLE NUMBER NULL,
    ISREQUIRED NUMBER NULL,
    LIST_SHOW NUMBER NULL,
    SEARCH_SHOW NUMBER NULL,
    EDIT_SHOW NUMBER NULL,
    ADD_SHOW NUMBER NULL,
    BROWSER_SHOW NUMBER NULL,
    SHOW_ORDER NUMBER NULL,
    IS_SYSTEM_DEFAULT NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_FIELD_EXTENDINFO_PK PRIMARY KEY (ID)
);

-- JCL_ORG_COMPEXT
CREATE TABLE JCL_ORG_COMPEXT (
    ID NUMBER NOT NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_COMPEXT_PK PRIMARY KEY (ID)
);

-- JCL_ORG_COMPEXT_DT1
CREATE TABLE JCL_ORG_COMPEXT_DT1 (
    ID NUMBER NOT NULL,
    MAINID NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_COMPEXT_DT1_PK PRIMARY KEY (ID)
);

-- JCL_ORG_DEPT
CREATE TABLE JCL_ORG_DEPT (
    ID NUMBER NOT NULL,
    DEPT_NO NVARCHAR2(100) NULL,
    DEPT_NAME NVARCHAR2(100) NULL,
    DEPT_NAME_SHORT NVARCHAR2(100) NULL,
    PARENT_COMP NUMBER NULL,
    PARENT_DEPT NUMBER NULL,
    DEPT_PRINCIPAL NUMBER NULL,
    SHOW_ORDER NUMBER NULL,
    DESCRIPTION NVARCHAR2(1000) NULL,
    FORBIDDEN_TAG NUMBER NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    UUID NVARCHAR2(100) NULL,
    CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (ID)
);

-- JCL_ORG_DEPTEXT
CREATE TABLE JCL_ORG_DEPTEXT (
    ID NUMBER NOT NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_DEPTEXT_PK PRIMARY KEY (ID)
);

-- JCL_ORG_DEPTEXT_DT1
CREATE TABLE JCL_ORG_DEPTEXT_DT1 (
    ID NUMBER NOT NULL,
    MAINID NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_DEPTEXT_DT1_PK PRIMARY KEY (ID)
);

-- JCL_ORG_JOB
CREATE TABLE JCL_ORG_JOB (
    ID NUMBER NOT NULL,
    JOB_NO NVARCHAR2(100) NULL,
    JOB_NAME NVARCHAR2(100) NULL,
    PARENT_COMP NUMBER NULL,
    EC_COMPANY NUMBER NULL,
    PARENT_DEPT NUMBER NULL,
    EC_DEPARTMENT NUMBER NULL,
    SEQUENCE_ID NUMBER NULL,
    SCHEME_ID NUMBER NULL,
    PARENT_JOB NUMBER NULL,
    IS_KEY NUMBER NULL,
    WORKPLACE NVARCHAR2(100) NULL,
    DESCRIPTION NVARCHAR2(1000) NULL,
    WORK_DUTY NVARCHAR2(1000) NULL,
    WORK_AUTHORITY NVARCHAR2(1000) NULL,
    FORBIDDEN_TAG NUMBER NULL,
    SHOW_ORDER NUMBER NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_JOB_PK PRIMARY KEY (ID)
);

-- JCL_ORG_JOBDT
CREATE TABLE JCL_ORG_JOBDT (
    ID NUMBER NOT NULL,
    MAINID NUMBER NULL,
    LEVEL_ID NVARCHAR2(100) NULL,
    GRADE_ID NVARCHAR2(100) NULL,
    LEVEL_ID_SPAN NVARCHAR2(1000) NULL,
    GRADE_ID_SPAN NVARCHAR2(1000) NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_JOBDT_PK PRIMARY KEY (ID)
);

-- JCL_ORG_JOBEXT
CREATE TABLE JCL_ORG_JOBEXT (
    ID NUMBER NOT NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_JOBEXT_PK PRIMARY KEY (ID)
);

-- JCL_ORG_JOBEXT_DT1
CREATE TABLE JCL_ORG_JOBEXT_DT1 (
    ID NUMBER NOT NULL,
    MAINID NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_JOBEXT_DT1_PK PRIMARY KEY (ID)
);

-- JCL_ORG_HRMRESOURCE
CREATE TABLE JCL_ORG_HRMRESOURCE (
    ID NUMBER NOT NULL,
    WORK_CODE NVARCHAR2(60) NULL,
    LOGIN_ID NVARCHAR2(60) NULL,
    LAST_NAME NVARCHAR2(60) NULL,
    SEX NUMBER NULL,
    ACCOUNT_TYPE NUMBER NULL,
    BELONG_TO NUMBER NULL,
    COMPANY_ID NUMBER NULL,
    DEPARTMENT_ID NUMBER NULL,
    JOB_ACTIVITY NUMBER NULL,
    JOB_TITLE NUMBER NULL,
    JOB_CALL NUMBER NULL,
    JOB_LEVEL NUMBER NULL,
    JOB_GROUP_ID NUMBER NULL,
    JOB_ACTIVITY_DESC NVARCHAR2(200) NULL,
    STATUS NUMBER NULL,
    SYSTEM_LANGUAGE NUMBER NULL,
    RESOURCE_IMAGE_ID NVARCHAR2(1000) NULL,
    MESSAGER_URL NVARCHAR2(1000) NULL,
    LOCATION_ID NUMBER NULL,
    MANAGER_ID NUMBER NULL,
    ASSISTANT_ID NUMBER NULL,
    MOBILE NVARCHAR2(60) NULL,
    TELEPHONE NVARCHAR2(60) NULL,
    MOBILE_CALL NVARCHAR2(60) NULL,
    FAX NVARCHAR2(60) NULL,
    EMAIL NVARCHAR2(60) NULL,
    WORKROOM NVARCHAR2(60) NULL,
    PASS_WORD NVARCHAR2(100) NULL,
    SEC_LEVEL NUMBER NULL,
    BIRTHDAY CHAR(10) NULL,
    FOLK NVARCHAR2(30) NULL,
    NATIVE_PLACE NVARCHAR2(100) NULL,
    REG_RESIDENT_PLACE NVARCHAR2(200) NULL,
    CERTIFICATE_NUM NVARCHAR2(60) NULL,
    MARITAL_STATUS CHAR(1) NULL,
    POLICY NVARCHAR2(30) NULL,
    BE_MEMBER_DATE CHAR(10) NULL,
    BE_PARTY_DATE CHAR(10) NULL,
    ISLABOUUNION CHAR(1) NULL,
    DEGREE NVARCHAR2(30) NULL,
    HEALTH_INFO CHAR(1) NULL,
    EDUCATION_LEVEL NUMBER NULL,
    HEIGHT NVARCHAR2(10) NULL,
    WEIGHT NUMBER NULL,
    USE_KIND NUMBER NULL,
    START_DATE CHAR(10) NULL,
    END_DATE CHAR(10) NULL,
    PROBATION_END_DATE CHAR(10) NULL,
    RESIDENT_PLACE NVARCHAR2(200) NULL,
    HOME_ADDRESS NVARCHAR2(100) NULL,
    TEMP_RESIDENT_NUMBER NVARCHAR2(60) NULL,
    COMPANY_START_DATE NVARCHAR2(10) NULL,
    WORK_START_DATE NVARCHAR2(10) NULL,
    ACCUM_FUND_ACCOUNT NVARCHAR2(30) NULL,
    ACCOUNT_NAME NVARCHAR2(200) NULL,
    BANK_ID NUMBER NULL,
    ACCOUNT_ID NVARCHAR2(100) NULL,
    SHOW_ORDER NUMBER NULL,
    CLASSIFICATION CHAR(1) NULL,
    COMPANY_WORK_YEAR DECIMAL(10,2) NULL,
    WORK_YEAR DECIMAL(10,2) NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_HRMRESOURCE_PK PRIMARY KEY (ID)
);

-- JCL_ORG_HRMRESOURCEEXT
CREATE TABLE JCL_ORG_HRMRESOURCEEXT (
       ID NUMBER NOT NULL,
       CREATOR NUMBER NULL,
       DELETE_TYPE NUMBER NULL,
       CREATE_TIME DATE NULL,
       UPDATE_TIME DATE NULL,
       CONSTRAINT JCL_ORG_HRMRESOURCEEXT_PK PRIMARY KEY (ID)
);

-- JCL_ORG_HRMRESOURCEEXT_DT1
CREATE TABLE JCL_ORG_HRMRESOURCEEXT_DT1 (
           ID NUMBER NOT NULL,
           MAINID NUMBER NULL,
           CREATOR NUMBER NULL,
           DELETE_TYPE NUMBER NULL,
           CREATE_TIME DATE NULL,
           UPDATE_TIME DATE NULL,
           CONSTRAINT JCL_ORG_HRMRESOURCEEXT_DT1_PK PRIMARY KEY (ID)
);

-- JCL_ORG_STAFFPLAN
CREATE TABLE JCL_ORG_STAFFPLAN (
    ID NUMBER NOT NULL,
    PLAN_NO NVARCHAR2(100) NULL,
    PLAN_NAME NVARCHAR2(100) NULL,
    PLAN_YEAR NVARCHAR2(100) NULL,
    TIME_START DATE NULL,
    TIME_END DATE NULL,
    COMPANY_ID NVARCHAR2(100) NULL,
    DESCRIPTION NVARCHAR2(1000) NULL,
    FORBIDDEN_TAG NUMBER NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_STAFFPLAN_PK PRIMARY KEY (ID)
);

-- JCL_ORG_STAFF
CREATE TABLE JCL_ORG_STAFF (
    ID NUMBER NOT NULL,
    PLAN_ID NUMBER NULL,
    COMP_ID NUMBER NULL,
    DEPT_ID NUMBER NULL,
    JOB_ID NUMBER NULL,
    STAFF_NUM NUMBER NULL,
    CONTROL_POLICY NUMBER NULL,
    PERMANENT_NUM NUMBER NULL,
    FREEZE_NUM NUMBER NULL,
    LACK_STATUS NUMBER NULL,
    STAFF_DESC NVARCHAR2(100) NULL,
    DESCRIPTION NVARCHAR2(1000) NULL,
    IS_USED NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_STAFF_PK PRIMARY KEY (ID)
);

-- JCL_ORG_STAFFS
CREATE TABLE JCL_ORG_STAFFS (
    ID NUMBER NOT NULL,
    STAFF_ID NUMBER NULL,
    BUSINESS_TYPE NUMBER NULL,
    CHANGE_NUM NUMBER NULL,
    BUSINESS_SOURCE NUMBER NULL,
    REQUESTID NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_STAFFS_PK PRIMARY KEY (ID)
);

CREATE TABLE HR_LOG (
    ID NUMBER NOT NULL,
    OPERATE_DESC NVARCHAR2(100) NULL,
    OPERATOR_ID NUMBER NULL,
    OPERATOR_NAME NVARCHAR2(100) NULL,
    CREATE_TIME DATE NULL,
    OPERATE_TYPE NUMBER NULL,
    PARAMS_STR NVARCHAR2(2000) NULL,
    CLIENT_IP NVARCHAR2(100) NULL,
    METHOD_NAME NVARCHAR2(100) NULL,
    DELETE_TYPE NUMBER NULL,
    CLASS_NAME NVARCHAR2(100) NULL,
    OPERATE_MODULE_NAME NVARCHAR2(100) NULL,
    OPERATE_MODULE NUMBER NULL,
    MESSAGE NVARCHAR2(2000) NULL,
    VALUE NVARCHAR2(100) NULL,
    CONSTRAINT HR_LOG_PK PRIMARY KEY (ID)
);

CREATE TABLE JCL_ORG_HRMRELATION (
    ID NUMBER NOT NULL,
    SCHEME_ID NUMBER NULL,
    LEVEL_ID NVARCHAR2(100) NULL,
    GRADE_ID NUMBER NULL,
    SEQUENCE_ID NUMBER NULL,
    POST_ID NUMBER NULL,
    POST_INFO_ID NUMBER NULL,
    COMPANY_ID NUMBER NULL,
    DEPARTMENT_ID NUMBER NULL,
    JOB_ID NUMBER NULL,
    CREATOR NUMBER NULL,
    DELETE_TYPE NUMBER NULL,
    CREATE_TIME DATE NULL,
    UPDATE_TIME DATE NULL,
    CONSTRAINT JCL_ORG_HRMRELATION_PK PRIMARY KEY (ID)
);
