/**Begin D:\PDM_UPGRADE\PDM1\HBSS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_EVENT') 
 CREATE TABLE T_HBSS_EVENT (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FEVENTTYPE VARCHAR(2) DEFAULT ' ' NOT NULL,
FEXECUTEWAY VARCHAR(2) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FEVENTBATCHTYPE VARCHAR(2) DEFAULT ' ' NOT NULL,
FCANCELEDEVENTID BIGINT DEFAULT 0 NOT NULL,
FOPERATEUSERID BIGINT DEFAULT 0 NOT NULL,
FOPERATEDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_BUSIEVENTREL') 
 CREATE TABLE T_HBSS_BUSIEVENTREL (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FOPERATEUSERID BIGINT DEFAULT 0 NOT NULL,
FOPERATEDATE DATETIME,
FSOURCEENTITY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBOID BIGINT DEFAULT 0 NOT NULL,
FISBUSINESSEVENTBO CHAR(1) DEFAULT ' ' NOT NULL,
FEVENTID BIGINT DEFAULT 0 NOT NULL,
FSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FCANCELEDEVENTID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_HISEVENTREL') 
 CREATE TABLE T_HBSS_HISEVENTREL (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FVID BIGINT DEFAULT 0 NOT NULL,
FBUSIEVENTID BIGINT DEFAULT 0 NOT NULL,
FPRESTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FPREBSED DATETIME,
FPREBSLED DATETIME
);



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