/**Begin D:\PDM_UPGRADE\PDM1\HRDI_table.sql **/
-- 实体集成字段黑名单
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRDI_FIELDBLACKLIST') 
 CREATE TABLE T_HRDI_FIELDBLACKLIST (
FID BIGINT DEFAULT 0 NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FENTITYOBJID VARCHAR(36) DEFAULT ' ' NOT NULL,
FFIELDSELECT VARCHAR(1000) DEFAULT ' ' NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);


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

-- 集成字段配置模板
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRDI_MIDTABLECONFTPL') 
 CREATE TABLE T_HRDI_MIDTABLECONFTPL (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(300) DEFAULT ' ' NOT NULL,
FENTITYOBJID VARCHAR(36) DEFAULT ' ' NOT NULL,
FBIZAPPID VARCHAR(60) DEFAULT ' ' NOT NULL,
FMIDENTITYNUMBER VARCHAR(36) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(300) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(2) DEFAULT 'C' NOT NULL,
FENABLE VARCHAR(2) DEFAULT '1' NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FDESCRIPTION NVARCHAR(765) DEFAULT ' ' NOT NULL,
FINDEX INT DEFAULT 0 NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRDI_MIDTABLETPLENTRY') 
 CREATE TABLE T_HRDI_MIDTABLETPLENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FPARENTENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FENTITYNUMBER VARCHAR(36) DEFAULT ' ' NOT NULL,
FNUMBERALIAS VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYNAME NVARCHAR(180) DEFAULT ' ' NOT NULL,
FREFERENCEPROP VARCHAR(25) DEFAULT '0' NOT NULL,
FISINTEGRATIONFIELD CHAR(1) DEFAULT '0' NOT NULL,
FISMUSTINPUT CHAR(1) DEFAULT '0' NOT NULL,
FISVALIDATEEXIST CHAR(1) DEFAULT '0' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FISTABLEHEAD CHAR(1) DEFAULT '0' NOT NULL,
FISFIELD CHAR(1) DEFAULT '0' NOT NULL,
FISBASEDATA CHAR(1) DEFAULT '0' NOT NULL,
FFIELDDESCRIPTION NVARCHAR(2000) DEFAULT ' ' NOT NULL 
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRDI_MIDTABLETPLENTRY_L') 
 CREATE TABLE T_HRDI_MIDTABLETPLENTRY_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FENTITYNAME NVARCHAR(180) DEFAULT ' ' NOT NULL,
FFIELDDESCRIPTION NVARCHAR(2000) DEFAULT ' ' NOT NULL 
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRDI_TPLINITENTITYOBJ') 
 CREATE TABLE T_HRDI_TPLINITENTITYOBJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID VARCHAR(36) DEFAULT ' ' NOT NULL
);

-- 集成场景规则配置
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRDI_INTSCENERULE') 
 CREATE TABLE T_HRDI_INTSCENERULE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(300) DEFAULT ' ' NOT NULL,
FENTITYOBJID VARCHAR(36) DEFAULT ' ' NOT NULL,
FREFERENCEFIELD VARCHAR(2000) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(300) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(2) DEFAULT 'C' NOT NULL,
FENABLE VARCHAR(2) DEFAULT '1' NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FDESCRIPTION NVARCHAR(765) DEFAULT ' ' NOT NULL,
FINDEX INT DEFAULT 0 NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FWRITETYPE VARCHAR(2) DEFAULT '0' NOT NULL,
FCLOUDID VARCHAR(60) DEFAULT ' ' NOT NULL,
FAPPID VARCHAR(60) DEFAULT ' ' NOT NULL,
FSERVICENAME VARCHAR(60) DEFAULT ' ' NOT NULL ,
FMETHOD VARCHAR(60) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(600) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRDI_INTSCENERULE_L') 
 CREATE TABLE T_HRDI_INTSCENERULE_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(300) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(300) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(765) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(600) DEFAULT ' ' NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRDI_INTRULEENTRY') 
 CREATE TABLE T_HRDI_INTRULEENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSCENETYPE VARCHAR(4) DEFAULT '0' NOT NULL,
FCLASSPATH VARCHAR(255) DEFAULT ' ' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FOPERATE VARCHAR(50) DEFAULT ' ' NOT NULL
);


/**End D:\PDM_UPGRADE\PDM1\HRDI_table.sql **/
