CREATE TABLE HRMSUBCOMPANY_VERSION (
	ID SERIAL NOT NULL,
	SUBCOMID INT NULL,
	SUBCOMPANYDESC VARCHAR ( 255 ) NULL,
	SUBCOMPANYCODE VARCHAR ( 255 ) NULL,
	SUBCOMPANYNAME VARCHAR ( 255 ) NULL,
	SUPSUBCOMID INT NULL,
	SHOWORDER INT NULL,
	CANCELED INT NULL,
	DESCRIPTION VARCHAR ( 2000 ) NULL,
	OPERATOR VARCHAR ( 255 ) NULL,
	VERSION DECIMAL ( 9,1 ) NULL,
	OPERATE_TIME TIMESTAMP WITHOUT TIME ZONE NULL,
	PRIMARY KEY ( ID ) 
);
/

CREATE TABLE HRMDEPARTMENT_VERSION (
	ID SERIAL NOT NULL,
	DEPARTMENTID INT NULL,
	DEPARTMENTMARK VARCHAR ( 255 ) NULL,
	DEPARTMENTCODE VARCHAR ( 255 ) NULL,
	DEPARTMENTNAME VARCHAR ( 255 ) NULL,
	SUBCOMPANYID1 INT NULL,
	SUPDEPID INT NULL,
	BMFZR VARCHAR ( 2000 ) NULL,
	SHOWORDER INT NULL,
	CANCELED INT NULL,
	DESCRIPTION VARCHAR ( 2000 ) NULL,
	OPERATOR VARCHAR ( 255 ) NULL,
	VERSION DECIMAL ( 9,1 ) NULL,
	OPERATE_TIME TIMESTAMP WITHOUT TIME ZONE NULL,
	PRIMARY KEY ( ID ) 
);
/



create table HRMRESOURCE_VERSION (
	ID SERIAL NOT NULL,
	RESOURCEID INT,
	COMPANYSTARTDATE TIMESTAMP WITHOUT TIME ZONE null,
	COMPANYWORKYEAR INT,
	WORKSTARTDATE TIMESTAMP WITHOUT TIME ZONE null,
	WORKYEAR INT,
	USEKIND INT,
	JOBCALL INT,
	ACCUMFUNDACCOUNT VARCHAR (100) null,
	BIRTHPLACE VARCHAR (255) null,
	FOLK VARCHAR (255) null,
	RESIDENTPHONE VARCHAR (255) null,
	RESIDENTPOSTCODE VARCHAR (1000) null,
	EXTPHONE VARCHAR (255) null,
	MANAGERSTR VARCHAR (255) null,
	STATUS INT,
	FAX VARCHAR (255) null,
	ISLABOUUNION CHAR(10),
	WEIGHT INT,
	TEMPRESIDENTNUMBER VARCHAR(1000),
	PROBATIONENDDATE TIMESTAMP WITHOUT TIME ZONE null,
	COUNTRYID INT default 1,
	PASSWDCHGDATE TIMESTAMP WITHOUT TIME ZONE null,
	LLOGINID VARCHAR(1000),
	DSPORDER FLOAT(53),
	PASSWORDSTATE INT,
	ACCOUNTTYPE INT,
	BELONGTO INT,
	MESSAGERURL VARCHAR(1000),
	ACCOUNTNAME VARCHAR(1000),
	LOGINID VARCHAR(1000),
	PASSWORD VARCHAR(1000),
	LASTNAME VARCHAR(1000),
	SEX CHAR(1),
	BIRTHDAY CHAR(10),
	NATIONALITY INT,
	MARITALSTATUS CHAR(1),
	TELEPHONE VARCHAR(1000),
	MOBILE VARCHAR(1000),
	MOBILECALL VARCHAR(1000),
	EMAIL VARCHAR(1000),
	LOCATIONID INT,
	WORKROOM VARCHAR(1000),
	HOMEADDRESS VARCHAR(1000),
	RESOURCETYPE CHAR(1),
	STARTDATE TIMESTAMP WITHOUT TIME ZONE null,
	ENDDATE TIMESTAMP WITHOUT TIME ZONE null,
	JOBTITLE INT,
	JOBACTIVITYDESC VARCHAR(1000),
	JOBLEVEL INT,
	SECLEVEL INT,
	DEPARTMENTID INT,
	SUBCOMPANYID1 INT,
	COSTCENTERID INT,
	MANAGERID INT,
	ASSISTANTID INT,
	BANKID1 INT,
	ACCOUNTID1 VARCHAR(1000),
	RESOURCEIMAGEID INT,
	CERTIFICATENUM VARCHAR(1000),
	NATIVEPLACE VARCHAR(1000),
	EDUCATIONLEVEL INT,
	BEMEMBERDATE TIMESTAMP WITHOUT TIME ZONE null,
	BEPARTYDATE TIMESTAMP WITHOUT TIME ZONE null,
	WORKCODE VARCHAR(1000),
	REGRESIDENTPLACE VARCHAR(1000),
	HEALTHINFO CHAR(1),
	RESIDENTPLACE VARCHAR(1000),
	POLICY VARCHAR(1000),
	DEGREE VARCHAR(1000),
	HEIGHT VARCHAR(640),
	CLASSIFICATION CHAR(1) default 3,
	DESCRIPTION VARCHAR (2000) null,
	OPERATOR VARCHAR (255) null,
	VERSION DECIMAL ( 9,1 ) null,
	OPERATE_TIME TIMESTAMP WITHOUT TIME ZONE null,
	primary key (ID)
);
/