/**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_PRIVACY_TRANSCHANNEL')
 CREATE TABLE T_PRIVACY_TRANSCHANNEL (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(10) DEFAULT ' ' NOT NULL,
FCREATEDATE DATETIME DEFAULT GETDATE() NOT NULL,
FMODIFYDATE DATETIME,
FMASTERID VARCHAR(36) DEFAULT ' ' NOT NULL,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FSENDER BIGINT DEFAULT 0 NOT NULL,
FRECIPIENT BIGINT DEFAULT 0 NOT NULL,
FISTRANSMISSION CHAR(1) DEFAULT '1' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PRIVACY_TRANSDATATAG')
 CREATE TABLE T_PRIVACY_TRANSDATATAG (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(10) DEFAULT ' ' NOT NULL,
FCREATEDATE DATETIME DEFAULT GETDATE() NOT NULL,
FMODIFYDATE DATETIME,
FMASTERID VARCHAR(36) DEFAULT ' ' NOT NULL,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FDATACATEGORY VARCHAR(10) DEFAULT ' ' NOT NULL,
FDATALEVEL VARCHAR(10) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PRIVACY_TRANSDATATAG_L')
 CREATE TABLE T_PRIVACY_TRANSDATATAG_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_PRIVACY_TRANSRULES')
 CREATE TABLE T_PRIVACY_TRANSRULES (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(10) DEFAULT ' ' NOT NULL,
FCREATEDATE DATETIME DEFAULT GETDATE() NOT NULL,
FMODIFYDATE DATETIME,
FMASTERID VARCHAR(36) DEFAULT ' ' NOT NULL,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FDATALABELID BIGINT DEFAULT 0 NOT NULL,
FDESENRULEID VARCHAR(36) DEFAULT ' ' NOT NULL
);



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

