/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_LIGHTLAYOUT_L') 
 CREATE TABLE T_BAS_LIGHTLAYOUT_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,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL
);


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


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_LIGHTLAYOUT') 
 CREATE TABLE T_BAS_LIGHTLAYOUT (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(36) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT 'A' NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME DEFAULT GETDATE() NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FLAYOUTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FLISTLAYOUTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_LIGHTLAYOUTBILL') 
 CREATE TABLE T_BAS_LIGHTLAYOUTBILL (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ SMALLINT DEFAULT 0 NOT NULL,
FFIELDKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FTREENODEID VARCHAR(50) DEFAULT ' ' NOT NULL,
FFIELDMUSTINPUT CHAR(1) DEFAULT '0' NOT NULL,
FFIELDDEFVALUE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFIELDDEFVALUEDESIGN NVARCHAR(500) DEFAULT ' ' NOT NULL,
FLOCKNEW CHAR(1) DEFAULT '0' NOT NULL,
FLOCKMODIFY CHAR(1) DEFAULT '0' NOT NULL,
FLOCKSUBMIT CHAR(1) DEFAULT '0' NOT NULL,
FLOCKAUDIT CHAR(1) DEFAULT '0' NOT NULL,
FVIINIT CHAR(1) DEFAULT '0' NOT NULL,
FVINEW CHAR(1) DEFAULT '0' NOT NULL,
FVIMODIFY CHAR(1) DEFAULT '0' NOT NULL,
FVIVIEW CHAR(1) DEFAULT '0' NOT NULL,
FVISUBMIT CHAR(1) DEFAULT '0' NOT NULL,
FVIAUDIT CHAR(1) DEFAULT '0' NOT NULL,
FCONTROLID VARCHAR(50) DEFAULT ' ' NOT NULL,
FFIELDID VARCHAR(50) DEFAULT ' ' NOT NULL,
FFIELDDSPNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_LIGHTLAYOUTLIST') 
 CREATE TABLE T_BAS_LIGHTLAYOUTLIST (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ SMALLINT DEFAULT 0 NOT NULL,
FLISTKEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FLISTLAYOUTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FLISTVIINIT CHAR(1) DEFAULT '0' NOT NULL,
FLISTVIF7 CHAR(1) DEFAULT '0' NOT NULL,
FLISTCONTROLID VARCHAR(50) DEFAULT ' ' NOT NULL,
FLISTDSPNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);



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