/**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_CTS_TERMWORD') 
 CREATE TABLE T_CTS_TERMWORD (
FID BIGINT DEFAULT 0 NOT NULL,
FTERMWORD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FTERMWORDCUST NVARCHAR(80) DEFAULT ' ',
FLANID BIGINT DEFAULT 0 NOT NULL,
FAPPID VARCHAR(36) DEFAULT ' ' NOT NULL,
FWORDSTATUS VARCHAR(10) DEFAULT '0' NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FSTATUS VARCHAR(10) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CTS_TERMWORDCOMP') 
 CREATE TABLE T_CTS_TERMWORDCOMP (
FID BIGINT DEFAULT 0 NOT NULL,
FWORDID BIGINT DEFAULT 0 NOT NULL,
FWORDCOMP NVARCHAR(1024) DEFAULT ' ' NOT NULL,
FKEY VARCHAR(255) DEFAULT ' ' NOT NULL,
FLANID BIGINT DEFAULT 0 NOT NULL,
FCATEGORY VARCHAR(10) DEFAULT ' ' NOT NULL,
FSUBJECTID VARCHAR(36) DEFAULT ' ' NOT NULL,
FSUBJECTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSUBJECTCATEGORY VARCHAR(10) DEFAULT ' ' NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FSTATUS VARCHAR(10) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CTS_TERMWORDLOG') 
 CREATE TABLE T_CTS_TERMWORDLOG (
FID BIGINT DEFAULT 0 NOT NULL,
FWORDID BIGINT DEFAULT 0 NOT NULL,
FSRCTERM NVARCHAR(80) DEFAULT ' ' NOT NULL,
FDESTTERM NVARCHAR(80) DEFAULT ' ' NOT NULL,
FVERSION INT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FSTATUS VARCHAR(10) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CTS_TERMWORDLOG_L') 
 CREATE TABLE T_CTS_TERMWORDLOG_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(1024) DEFAULT ' ' NOT NULL
);



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