/**Begin D:\PDM_UPGRADE\PDM1\FA_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_PC_LOCK_CONFIG_N') 
 CREATE TABLE T_FA_PC_LOCK_CONFIG_N (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FCREATETIME DATETIME,
FUSEPURPOSE VARCHAR(50) DEFAULT ' ' NOT NULL,
FLOCKEDENTITYCODE VARCHAR(36) DEFAULT ' ' NOT NULL,
FSTATUSCOMENT VARCHAR(256) DEFAULT ' ' NOT NULL,
FBIZNORMALSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FBIZFINALSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUSCODE VARCHAR(256) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_HOLD_PCLOCK_BILL_N') 
 CREATE TABLE T_FA_HOLD_PCLOCK_BILL_N (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPARENTBILLENTITYCODE VARCHAR(36) DEFAULT ' ' NOT NULL,
FPHEADBASECODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FPRELBASETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTRYCODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FPENTRYBASECODE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_BASE_STATUS_CTR_N') 
 CREATE TABLE T_FA_BASE_STATUS_CTR_N (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FFROMBIZSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FTOBIZSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FOPERATIONS VARCHAR(50) DEFAULT ' ' NOT NULL,
FCOMMENT VARCHAR(256) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_HOLD_CCLOCK_BILL_N') 
 CREATE TABLE T_FA_HOLD_CCLOCK_BILL_N (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCHILDBILLENTITYCODE VARCHAR(36) DEFAULT ' ' NOT NULL,
FCHEADBASECODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCRELBASETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCENTRYCODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCENTRYBASECODE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_PC_LOCK_N') 
 CREATE TABLE T_FA_PC_LOCK_N (
FID BIGINT DEFAULT 0 NOT NULL,
FLOCKEDENTITYNAME VARCHAR(36) DEFAULT ' ' NOT NULL,
FLOCKEDDATAMASTERID BIGINT DEFAULT 0 NOT NULL,
FLOCKEDDATANUM VARCHAR(50) DEFAULT ' ' NOT NULL,
FUSEPURPOSE VARCHAR(50) DEFAULT ' ' NOT NULL,
FHOLDLOCKENTITYNAME VARCHAR(36) DEFAULT ' ' NOT NULL,
FHOLDLOCKDATAID BIGINT DEFAULT 0 NOT NULL,
FHOLDLOCKDATANO VARCHAR(50) DEFAULT ' ' NOT NULL,
FSUBLOCKNUM BIGINT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FLOCKEDDATASTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FMODIFYTIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_PC_LOCK_DETAIL_N') 
 CREATE TABLE T_FA_PC_LOCK_DETAIL_N (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDTHOLDLOCKENTITYNAME VARCHAR(36) DEFAULT ' ' NOT NULL,
FDTHOLDLOCKDATAID BIGINT DEFAULT 0 NOT NULL,
FDTHOLDLOCKDATANUM VARCHAR(50) DEFAULT ' ' NOT NULL,
FDTMODIFYTIME DATETIME
);



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