/**Begin D:\pdm\PDM_UPGRADE\pdm_new\BDM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BDM_STATIC_QRCODE_ENTRY') 
 CREATE TABLE T_BDM_STATIC_QRCODE_ENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFIELDTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FHELPTEXT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBIZCONTROL NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFIELDREQUIRED CHAR(1) DEFAULT ' ' NOT NULL,
FFIELDKEY NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFIELDVALUE NVARCHAR(1024) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BDM_STATIC_QRCODE_SET') 
 CREATE TABLE T_BDM_STATIC_QRCODE_SET (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS NVARCHAR(10) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE NVARCHAR(10) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FORG BIGINT DEFAULT 0 NOT NULL,
FTAXNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FINVOICETYPE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPHONE_VISABLE CHAR(1) DEFAULT ' ' NOT NULL,
FPHONE_INPUT CHAR(1) DEFAULT ' ' NOT NULL,
FEMAIL_VISABLE CHAR(1) DEFAULT ' ' NOT NULL,
FEMAIL_INPUT CHAR(1) DEFAULT ' ' NOT NULL,
FQRCODESTATUS NVARCHAR(10) DEFAULT ' ' NOT NULL,
FEPINFO BIGINT DEFAULT 0 NOT NULL
);


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



/**End D:\pdm\PDM_UPGRADE\pdm_new\BDM_table.sql **/
