/**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_OPEN_APIBODYENTRY') 
 CREATE TABLE T_OPEN_APIBODYENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FPARAMNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPARAMTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMUST NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEXAMPLE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBODYPARAMDES NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPARENTENTRYID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_OPEN_APIHEADERENTRY') 
 CREATE TABLE T_OPEN_APIHEADERENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FHEADERNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FHEADERVALUE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FHEADERDES NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_OPEN_APIQUERYPARAMENTRY') 
 CREATE TABLE T_OPEN_APIQUERYPARAMENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FURLPARAMNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FURLPARAMTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FURLPARAMMUST NVARCHAR(50) DEFAULT ' ' NOT NULL,
FURLPARAMEXAMPLE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FURLPARAMDES NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_OPEN_APIRESPENTRY') 
 CREATE TABLE T_OPEN_APIRESPENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FRESPPARAMNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FRESPPARAMTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FRESPPARAMMUST NVARCHAR(50) DEFAULT ' ' NOT NULL,
FRESPEXAMPLE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FRESPDES NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPARENTENTRYID BIGINT DEFAULT 0 NOT NULL
);

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