/**Begin D:\PDM\PDM_UPGRADE\pdm_new\FA_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_CHECKRESULT') 
 CREATE TABLE T_FA_CHECKRESULT (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 1 NOT NULL,
FCHECKITEMID BIGINT DEFAULT 0 NOT NULL,
FCHECKSTATUS CHAR(1) DEFAULT '1' NOT NULL,
FBIZFILTERJSON NVARCHAR(2000) DEFAULT ' '
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_CLOSEOPENBOOKRECORD') 
 CREATE TABLE T_FA_CLOSEOPENBOOKRECORD (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FOPTSTATUS CHAR(1) DEFAULT '0' NOT NULL,
FCLOSINGSTATUS CHAR(1) DEFAULT 'N' NOT NULL,
FCLOSEDPERIODID BIGINT DEFAULT 0 NOT NULL,
FASSETBOOKID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FDEPREUSEID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_CLOSEOPENBOOKRECORD_L') 
 CREATE TABLE T_FA_CLOSEOPENBOOKRECORD_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
);

/**End D:\PDM\PDM_UPGRADE\pdm_new\FA_table.sql **/
