-- JCL_ORG_SCHEME
CREATE TABLE JCL_ORG_SCHEME (
	id int auto_increment NOT NULL,
	scheme_no varchar(100) NULL,
	scheme_name varchar(100) NULL,
	scheme_description text NULL,
	forbidden_tag int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	level_no varchar(100) NULL,
	level_name varchar(100) NULL,
	description text NULL,
	scheme_id int null,
	forbidden_tag int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	grade_no varchar(100) NULL,
	grade_name varchar(100) NULL,
	description text NULL,
	scheme_id int null,
	level_id varchar(100) null,
	forbidden_tag int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	sequence_no varchar(100) NULL,
	sequence_name varchar(100) NULL,
	description text NULL,
	scheme_id int null,
	forbidden_tag int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	post_no varchar(100) null,
	post_name varchar(100) NULL,
	description text NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	post_info_no varchar(100) null,
	post_info_name varchar(100) NULL,
	post_info_authority text null,
	post_info_duty text null,
	post_info_qualification text null,
	post_id int null,
	description text NULL,
	forbidden_tag int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	comp_no varchar(100) NULL,
	comp_name varchar(100) NULL,
	comp_name_short varchar(100) NULL,
	parent_company int null,
	org_code varchar(100) NULL,
	industry int null,
	comp_principal int null,
	description text NULL,
	forbidden_tag int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	extend_type int null,
	group_name varchar(100) NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	extend_type int null,
	table_name varchar(100) NULL,
	field_name varchar(100) NULL,
	field_name_desc varchar(100) NULL,
	field_type varchar(1000) NULL,
	control_type int null,
	extend_group int null,
	isenable int null,
	isrequired int null,
	list_show int null,
	search_show int null,
	edit_show int null,
	add_show int null,
	button_show int null,
	show_order int null,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	mainid int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	dept_no varchar(100) NULL,
	dept_name varchar(100) NULL,
	dept_name_short varchar(100) NULL,
	parent_comp int null,
	parent_dept int null,
	dept_principal int null,
	show_order int null,
	description text NULL,
	forbidden_tag int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	extend_type int null,
	group_name varchar(100) NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	extend_type int null,
	table_name varchar(100) NULL,
	field_name varchar(100) NULL,
	field_name_desc varchar(100) NULL,
	field_type varchar(1000) NULL,
	control_type int null,
	extend_group int null,
	isenable int null,
	isrequired int null,
	list_show int null,
	search_show int null,
	edit_show int null,
	add_show int null,
	button_show int null,
	show_order int null,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	mainid int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	job_no varchar(100) NULL,
	job_name varchar(100) NULL,
	parent_comp int null,
	parent_dept int null,
	job_sequence int null,
	scheme_id int null,
	parent_job int null,
	is_key_job int null,
	workplace varchar(100) NULL,
	work_description text null,
	work_duty text null,
	work_authority text null,
	forbidden_tag int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	mainid int NULL,
	job_rank int null,
	job_level int null,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	extend_type int null,
	group_name varchar(100) NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	extend_type int null,
	table_name varchar(100) NULL,
	field_name varchar(100) NULL,
	field_name_desc varchar(100) NULL,
	field_type varchar(1000) NULL,
	control_type int null,
	extend_group int null,
	isenable int null,
	isrequired int null,
	list_show int null,
	search_show int null,
	edit_show int null,
	add_show int null,
	button_show int null,
	show_order int null,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	mainid int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	staffplan_no varchar(100) NULL,
	staffplan_name varchar(100) NULL,
	staffplan_year varchar(100) NULL,
	time_start date NULL,
	time_end date NULL,
	apply_company int NULL,
	description text NULL,
	status int NULL,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	scheme_id int null,
	comp int null,
	dept int null,
	job int null,
	staff_num int null,
	control_policy int null,
	staff_permanent_num int null,
	freeze_num int null,
	lack_status int null,
	staff_description varchar(100) NULL,
	instruction text null,
	creator int null,
	delete_type int 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 int auto_increment NOT NULL,
	staff_id int null,
	business_type int null,
	business_change_num int null,
	business_source int null,
	requestid int null,
	creator int null,
	delete_type int null,
	create_time date null,
	update_time date null,
	CONSTRAINT JCL_ORG_STAFFS_PK PRIMARY KEY (id)
);









