/**Begin D:\PDM\PDM_UPGRADE\pdm1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_PERMISSIONCLASS') 
 CREATE TABLE T_BCM_PERMISSIONCLASS (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FREMARK NVARCHAR(200) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_PERMISSIONCLASS_L') 
 CREATE TABLE T_BCM_PERMISSIONCLASS_L (
FPKID VARCHAR(50) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(15) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(200) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_PERMCLASS_ENTITY') 
 CREATE TABLE T_BCM_PERMCLASS_ENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTITYNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITYID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FPERMCLASSID BIGINT DEFAULT 0 NOT NULL,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);



/**End D:\PDM\PDM_UPGRADE\pdm1\BCM_table.sql **/
