-- 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,
	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,
	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,
	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,
	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,
	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,
	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,
	CREATOR NUMBER NULL,
	DELETE_TYPE NUMBER NULL,
	CREATE_TIME DATE NULL,
	UPDATE_TIME DATE NULL,
	CONSTRAINT JCL_ORG_COMP_PK PRIMARY KEY (ID)
);

-- JCL_FIELD_EXTENDGROUP
CREATE TABLE JCL_FIELD_EXTENDGROUP (
	ID NUMBER NOT NULL,
	EXTEND_TYPE NUMBER NULL,
	GROUP_NAME NVARCHAR2(100) 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_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,
	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,
	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,
	CREATOR NUMBER NULL,
	DELETE_TYPE NUMBER NULL,
	CREATE_TIME DATE NULL,
	UPDATE_TIME DATE NULL,
	CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (ID)
);

-- JCL_FIELD_EXTENDGROUP_DEPT
CREATE TABLE JCL_FIELD_EXTENDGROUP_DEPT (
	ID NUMBER NOT NULL,
	EXTEND_TYPE NUMBER NULL,
	GROUP_NAME NVARCHAR2(100) NULL,
	CREATOR NUMBER NULL,
	DELETE_TYPE NUMBER NULL,
	CREATE_TIME DATE NULL,
	UPDATE_TIME DATE NULL,
	CONSTRAINT JCL_FIELD_EXTENDGROUP_DEPT_PK PRIMARY KEY (ID)
);

-- JCL_FIELD_EXTENDINFO_DEPT
CREATE TABLE JCL_FIELD_EXTENDINFO_DEPT (
	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,
	EXTEND_GROUP NUMBER NULL,
	ISENABLE NUMBER NULL,
	ISREQUIRED NUMBER NULL,
	LIST_SHOW NUMBER NULL,
	SEARCH_SHOW NUMBER NULL,
	EDIT_SHOW NUMBER NULL,
	ADD_SHOW NUMBER NULL,
	BUTTON_SHOW NUMBER NULL,
	SHOW_ORDER NUMBER NULL,
	CREATOR NUMBER NULL,
	DELETE_TYPE NUMBER NULL,
	CREATE_TIME DATE NULL,
	UPDATE_TIME DATE NULL,
	CONSTRAINT JCL_FIELD_EXTENDINFO_DEPT_PK PRIMARY KEY (ID)
);

-- JCL_ORG_DEPTPEXT
CREATE TABLE JCL_ORG_DEPTPEXT (
	ID NUMBER NOT NULL,
	CREATOR NUMBER NULL,
	DELETE_TYPE NUMBER NULL,
	CREATE_TIME DATE NULL,
	UPDATE_TIME DATE NULL,
	CONSTRAINT JCL_ORG_DEPTPEXT_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,
	PARENT_DEPT NUMBER NULL,
	JOB_SEQUENCE NUMBER NULL,
	SCHEME_ID NUMBER NULL,
	PARENT_JOB NUMBER NULL,
	IS_KEY_JOB NUMBER NULL,
	WORKPLACE NVARCHAR2(100) NULL,
	WORK_DESCRIPTION NVARCHAR2(1000) NULL,
	WORK_DUTY NVARCHAR2(1000) NULL,
	WORK_AUTHORITY NVARCHAR2(1000) NULL,
	FORBIDDEN_TAG 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,
	JOB_RANK NUMBER NULL,
	JOB_LEVEL NUMBER NULL,
	CREATOR NUMBER NULL,
	DELETE_TYPE NUMBER NULL,
	CREATE_TIME DATE NULL,
	UPDATE_TIME DATE NULL,
	CONSTRAINT CL_ORG_DEPTPEXT_PK PRIMARY KEY (ID)
);

-- JCL_FIELD_EXTENDGROUP_JOB
CREATE TABLE JCL_FIELD_EXTENDGROUP_JOB (
	ID NUMBER NOT NULL,
	EXTEND_TYPE NUMBER NULL,
	GROUP_NAME NVARCHAR2(100) NULL,
	CREATOR NUMBER NULL,
	DELETE_TYPE NUMBER NULL,
	CREATE_TIME DATE NULL,
	UPDATE_TIME DATE NULL,
	CONSTRAINT JCL_FIELD_EXTENDGROUP_JOB_PK PRIMARY KEY (ID)
);

-- JCL_FIELD_EXTENDINFO_JOB
CREATE TABLE JCL_FIELD_EXTENDINFO_JOB (
	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,
	EXTEND_GROUP NUMBER NULL,
	ISENABLE NUMBER NULL,
	ISREQUIRED NUMBER NULL,
	LIST_SHOW NUMBER NULL,
	SEARCH_SHOW NUMBER NULL,
	EDIT_SHOW NUMBER NULL,
	ADD_SHOW NUMBER NULL,
	BUTTON_SHOW NUMBER NULL,
	SHOW_ORDER NUMBER NULL,
	CREATOR NUMBER NULL,
	DELETE_TYPE NUMBER NULL,
	CREATE_TIME DATE NULL,
	UPDATE_TIME DATE NULL,
	CONSTRAINT JCL_FIELD_EXTENDINFO_JOB_PK PRIMARY KEY (ID)
);

-- JCL_ORG_JOBPEXT
CREATE TABLE JCL_ORG_JOBPEXT (
	ID NUMBER NOT NULL,
	CREATOR NUMBER NULL,
	DELETE_TYPE NUMBER NULL,
	CREATE_TIME DATE NULL,
	UPDATE_TIME DATE NULL,
	CONSTRAINT JCL_ORG_JOBPEXT_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_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,
	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,
	STAFF_PERMANENT_NUM NUMBER NULL,
	FREEZE_NUM NUMBER NULL,
	LACK_STATUS NUMBER NULL,
	STAFF_DESCRIPTION NVARCHAR2(100) NULL,
    DESCRIPTION NVARCHAR2(1000) 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,
	BUSINESS_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)
);









