/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MDL_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_META_DYNPLUGIN')
 CREATE TABLE T_META_DYNPLUGIN (
FID BIGINT DEFAULT 0 NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FROLE CHAR(1) DEFAULT '1' NOT NULL,
FINTERFACETYPE CHAR(1) DEFAULT '1' NOT NULL,
FCODETYPE CHAR(1) DEFAULT '0' NOT NULL,
FCLASSNAME VARCHAR(255) DEFAULT ' ' NOT NULL,
FBIZAPPID VARCHAR(36) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FEVENTMETHOD VARCHAR(255) DEFAULT ' ' NOT NULL,
FISV VARCHAR(200) DEFAULT ' ' NOT NULL,
FPLUGINDESC NVARCHAR(255) DEFAULT ' ',
FPLUGINDESC_TAG NCLOB,
FPLUGINCODE NVARCHAR(255) DEFAULT ' ',
FPLUGINCODE_TAG NCLOB,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME DEFAULT GETDATE(),
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_META_DYNPLUGIN_L')
 CREATE TABLE T_META_DYNPLUGIN_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_META_DYNPLUGINBIND')
 CREATE TABLE T_META_DYNPLUGINBIND (
FID BIGINT DEFAULT 0 NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FDYNPLUGINID BIGINT DEFAULT 0 NOT NULL,
FOBJECTTYPEID VARCHAR(36) DEFAULT ' ' NOT NULL,
FCLIENT CHAR(1) DEFAULT '1' NOT NULL,
FOPERATIONKEY VARCHAR(36) DEFAULT ' ' NOT NULL,
FEFFECTFIELDS VARCHAR(255) DEFAULT ' ' NOT NULL,
FRUNCONDITION NVARCHAR(255) DEFAULT ' ',
FRUNCONDITION_TAG NCLOB,
FAPPLYSUBPAGE CHAR(1) DEFAULT '1' NOT NULL,
FISV VARCHAR(200) DEFAULT ' ' NOT NULL,
FNUMBER VARCHAR(200) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT 'A' NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME DEFAULT GETDATE(),
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_META_DYNPLUGINBIND_L')
 CREATE TABLE T_META_DYNPLUGINBIND_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);



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