/**Begin D:\PDM_UPGRADE\PDM1\HBSS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_ORGCONFIG') 
 CREATE TABLE T_HBSS_ORGCONFIG (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FENABLE VARCHAR(2) DEFAULT '1' NOT NULL,
FSTATUS VARCHAR(2) DEFAULT 'C' NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME,
FINDEX INT DEFAULT 0 NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FORGFUNID BIGINT DEFAULT 0 NOT NULL,
FCLOUDID BIGINT DEFAULT 0 NOT NULL,
FAPPID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_ORGCONFIG_L') 
 CREATE TABLE T_HBSS_ORGCONFIG_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_HBSS_ORGCONFIGENTRY') 
 CREATE TABLE T_HBSS_ORGCONFIGENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FAPINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FAPIENABLE VARCHAR(2) DEFAULT '1' NOT NULL,
FCHECKINDEX INT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FAPINAME VARCHAR(100) DEFAULT ' ' NOT NULL,
FAPI VARCHAR(100) DEFAULT ' ' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL
);


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



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