IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_GBS_BIZRULE')
 CREATE TABLE T_GBS_BIZRULE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT 'C' NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FENTITY VARCHAR(36) DEFAULT ' ' NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FDESC NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FBIZRULELIBRARY BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FAPPLYOPERATION VARCHAR(25) DEFAULT ' ' NOT NULL,
FALLOWDISABLE CHAR(1) DEFAULT '0' NOT NULL,
FVALIDATEINDEX INT DEFAULT 9999 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL
);



IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_GBS_BIZRULELIBRARY')
 CREATE TABLE T_GBS_BIZRULELIBRARY (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT 'C' NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FENTITY VARCHAR(36) DEFAULT ' ' NOT NULL,
FLEVEL VARCHAR(10) DEFAULT ' ' NOT NULL,
FSERVICECLASS VARCHAR(255) DEFAULT ' ' NOT NULL,
FDESC NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FFIELD VARCHAR(255) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FVALIDATETYPE VARCHAR(2) DEFAULT ' ' NOT NULL,
FVALIDATEINDEX INT DEFAULT 9999 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
FEXPRESSION VARCHAR(255) DEFAULT ' ',
FCHECKTYPE VARCHAR(2) DEFAULT ' ' NOT NULL,
FVALIDATEMSG NVARCHAR(500) DEFAULT ' ',
FCHECKNULL CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_GBS_BIZRULELIBRARY_L')
 CREATE TABLE T_GBS_BIZRULELIBRARY_L (
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FDESC NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FVALIDATEMSG NVARCHAR(500) DEFAULT ' '
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_GBS_BIZRULE_L')
 CREATE TABLE T_GBS_BIZRULE_L (
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FDESC NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


