/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HPDI_table.sql **/ 

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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HPDI_EVENT') 
 CREATE TABLE T_HPDI_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(10) DEFAULT ' ' NOT NULL,
FEXECUTEWAY VARCHAR(10) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FEVENTBATCHTYPE VARCHAR(10) 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_HPDI_EVENTRELHIS') 
 CREATE TABLE T_HPDI_EVENTRELHIS (
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,
FPRESTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FPREBSED DATETIME,
FPREBSLED DATETIME,
FBUSIEVENTID BIGINT DEFAULT 0 NOT NULL
);



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HPDI_table.sql **/
