/**Begin D:\idea_workspace\pdm\PDM1\HRCS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PROJEMPSTRATEGY') 
 CREATE TABLE T_HRCS_PROJEMPSTRATEGY (
FID BIGINT DEFAULT 0 NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FORGTEAMID BIGINT DEFAULT 0 NOT NULL,
FSTRATEGYID BIGINT DEFAULT 0 NOT NULL,
FINHERITEDORGID BIGINT DEFAULT 0 NOT NULL,
FHRBUID BIGINT DEFAULT 0 NOT NULL,
FSOURCEORGID BIGINT DEFAULT 0 NOT NULL,
FLEFFDT DATETIME,
FEFFDT DATETIME,
FENABLE VARCHAR(2) DEFAULT '2' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FSTATUS VARCHAR(2) DEFAULT 'C' NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FINDEX INT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FINITTYPE VARCHAR(2) DEFAULT '0' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCHANGETYPE VARCHAR(2) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PROJEMPSTRENTRY') 
 CREATE TABLE T_HRCS_PROJEMPSTRENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FORGTEAMID BIGINT DEFAULT 0 NOT NULL,
FBUSSINESSFIELDID BIGINT DEFAULT 0 NOT NULL,
FHRBUID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(2) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FLEFFDT DATETIME,
FEFFDT DATETIME,
FSTRATEGYID BIGINT DEFAULT 0 NOT NULL,
FINHERITEDORGID BIGINT DEFAULT 0 NOT NULL,
FSOURCEORGID BIGINT DEFAULT 0 NOT NULL,
FSTRATEGYENTRYTYPE VARCHAR(2) DEFAULT ' ' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FENTRYCHANGETYPE VARCHAR(2) DEFAULT '0' NOT NULL,
FSOURCEENTRYID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PROJORGSTRATEGY') 
 CREATE TABLE T_HRCS_PROJORGSTRATEGY (
FID BIGINT DEFAULT 0 NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FORGTEAMID BIGINT DEFAULT 0 NOT NULL,
FSTRATEGYID BIGINT DEFAULT 0 NOT NULL,
FINHERITEDORGID BIGINT DEFAULT 0 NOT NULL,
FHRBUID BIGINT DEFAULT 0 NOT NULL,
FSOURCEORGID BIGINT DEFAULT 0 NOT NULL,
FLEFFDT DATETIME,
FEFFDT DATETIME,
FENABLE VARCHAR(2) DEFAULT '2' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FSTATUS VARCHAR(2) DEFAULT 'C' NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FINDEX INT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FINITTYPE VARCHAR(2) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCHANGETYPE VARCHAR(2) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PROJORGSTRENTRY') 
 CREATE TABLE T_HRCS_PROJORGSTRENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FORGTEAMID BIGINT DEFAULT 0 NOT NULL,
FBUSSINESSFIELDID BIGINT DEFAULT 0 NOT NULL,
FHRBUID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(2) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FLEFFDT DATETIME,
FEFFDT DATETIME,
FSTRATEGYID BIGINT DEFAULT 0 NOT NULL,
FINHERITEDORGID BIGINT DEFAULT 0 NOT NULL,
FSOURCEORGID BIGINT DEFAULT 0 NOT NULL,
FSTRATEGYENTRYTYPE VARCHAR(2) DEFAULT '0' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FENTRYCHANGETYPE VARCHAR(2) DEFAULT '0' NOT NULL,
FSOURCEENTRYID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PROJEMPSTRATEGY_L') 
 CREATE TABLE T_HRCS_PROJEMPSTRATEGY_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PROJORGSTRATEGY_L') 
 CREATE TABLE T_HRCS_PROJORGSTRATEGY_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL
);



/**End D:\idea_workspace\pdm\PDM1\HRCS_table.sql **/
