/**Begin C:\PDM_UPGRADE\PDM1\PBD_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_API_INPUTSENTITY') 
 CREATE TABLE T_PBD_API_INPUTSENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPARENTENTRYID BIGINT DEFAULT 0 NOT NULL,
FFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFIELDID VARCHAR(80) DEFAULT ' ' NOT NULL,
FTHIRDFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FTHIRDFIELDID VARCHAR(80) DEFAULT ' ' NOT NULL,
FFIELDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FTHIRDFIELDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYENTITYID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_API_OUTPUTSENTITY') 
 CREATE TABLE T_PBD_API_OUTPUTSENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPARENTENTRYID BIGINT DEFAULT 0 NOT NULL,
FFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFIELDID VARCHAR(80) DEFAULT ' ' NOT NULL,
FTHIRDFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FTHIRDFIELDID VARCHAR(80) DEFAULT ' ' NOT NULL,
FFIELDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FTHIRDFIELDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTRYENTITYID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_API_STANDARD') 
 CREATE TABLE T_PBD_API_STANDARD (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(1000) DEFAULT ' ' NOT NULL,
FSOURCE BIGINT DEFAULT 0 NOT NULL,
FISPREINSDATA CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_API_STANDARD_ENTITY') 
 CREATE TABLE T_PBD_API_STANDARD_ENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPLATFORMAPI BIGINT DEFAULT 0 NOT NULL,
FPLATFORM BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_API_STANDARD_TYPE') 
 CREATE TABLE T_PBD_API_STANDARD_TYPE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FISPREINSDATA CHAR(1) DEFAULT '0' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_ABNENTITY') 
 CREATE TABLE T_PBD_BUSI_ABNENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPUTDATE DATETIME,
FPUTDEPARTMENT NVARCHAR(200) DEFAULT ' ' NOT NULL,
FREMOVEDATE DATETIME,
FABNREMOVEREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FABNREMOVEREASON_TAG NCLOB,
FREMOVEDEPARTMENT NVARCHAR(200) DEFAULT ' ' NOT NULL,
FABNPUTREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FABNPUTREASON_TAG NCLOB,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_BRANCHENTITY') 
 CREATE TABLE T_PBD_BUSI_BRANCHENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FBRANCHNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FLEGALPERSONNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREGSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FESTIBLISHTIME DATETIME,
FBRANCHID BIGINT DEFAULT 0 NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_CCHECKENTITY') 
 CREATE TABLE T_PBD_BUSI_CCHECKENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCERTINO VARCHAR(100) DEFAULT ' ' NOT NULL,
FCERTIORG NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCHECKYEAR VARCHAR(11) DEFAULT ' ' NOT NULL,
FCHECKPRONAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCHECKPRODUCTTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCHECKRESULT NVARCHAR(200) DEFAULT ' ' NOT NULL,
FCHECKSPECNUM VARCHAR(100) DEFAULT ' ' NOT NULL,
FCHECKUNQUALIFIITEM NVARCHAR(200) DEFAULT ' ' NOT NULL,
FCHECKCANCELDATE DATETIME,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_CHANGEENTITY') 
 CREATE TABLE T_PBD_BUSI_CHANGEENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCHANGEITEM VARCHAR(255) DEFAULT ' ' NOT NULL,
FCHANGEITEM_TAG NCLOB,
FCONTENTBEFORE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCONTENTBEFORE_TAG NCLOB,
FCONTENTAFTER NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCONTENTAFTER_TAG NCLOB,
FCHANGETIME DATETIME,
FCHANGEID BIGINT DEFAULT 0 NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_COMCHECKENTITY') 
 CREATE TABLE T_PBD_BUSI_COMCHECKENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCOMCHECKDATE DATETIME,
FCOMCHECKORG NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCOMCHECKRESULT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCOMCHECKRESULT_TAG NCLOB,
FCOMCHECKTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FCOMREMARK NVARCHAR(1024) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_CONTACTENTITY') 
 CREATE TABLE T_PBD_BUSI_CONTACTENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCONTACTADDRESS NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCONTACTPHONE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTACTEMAIL VARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTACTWEBSITE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTACTPROVINCE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTACTCITY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCONTACTAREA NVARCHAR(50) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_COURTANENTITY') 
 CREATE TABLE T_PBD_BUSI_COURTANENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCOURTANNOID BIGINT DEFAULT 0 NOT NULL,
FBLTNNO VARCHAR(50) DEFAULT ' ' NOT NULL,
FPARTY1 NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FPARTY2 NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FBLTNTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FBLTNDEFENDANT NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FBLTNPUBLISHDATE DATETIME,
FBLTNCASENO VARCHAR(200) DEFAULT ' ' NOT NULL,
FBLTNREASON NVARCHAR(500) DEFAULT ' ' NOT NULL,
FBLTNCONTENT NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FBLTNCOURT NVARCHAR(200) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_COURTREGENTITY') 
 CREATE TABLE T_PBD_BUSI_COURTREGENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCOURTREGID BIGINT DEFAULT 0 NOT NULL,
FLITIGANT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFILINGDATE DATETIME,
FCASESTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FCOURTREGCONTENT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCOURTREGCONTENT_TAG NCLOB,
FCOURTREGCASETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCOURTREGPLAINTIFF NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCOURTREGDEFENDANT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCOURTREGCOURT NVARCHAR(200) DEFAULT ' ' NOT NULL,
FCOURTREGCASENO VARCHAR(50) DEFAULT ' ' NOT NULL,
FCOURTREGREASON NVARCHAR(50) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_DISHONENTITY') 
 CREATE TABLE T_PBD_BUSI_DISHONENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FDISHONESTID BIGINT DEFAULT 0 NOT NULL,
FDISHONESTREGDATE DATETIME,
FDISHONESTCASETIME DATETIME,
FDISHONESTCASENO VARCHAR(50) DEFAULT ' ' NOT NULL,
FDISHONESTINAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDISHONESTCOURT NVARCHAR(200) DEFAULT ' ' NOT NULL,
FPERFORMANCE NVARCHAR(200) DEFAULT ' ' NOT NULL,
FGISTID VARCHAR(200) DEFAULT ' ' NOT NULL,
FDISRUPTTYPENAME NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_EXEENTITY') 
 CREATE TABLE T_PBD_BUSI_EXEENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FEXECID BIGINT DEFAULT 0 NOT NULL,
FEXECCASENO VARCHAR(50) DEFAULT ' ' NOT NULL,
FEXECCOURT NVARCHAR(200) DEFAULT ' ' NOT NULL,
FEXECPNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FEXECCASETIME DATETIME,
FEXECMONEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_HOLDERENTITY') 
 CREATE TABLE T_PBD_BUSI_HOLDERENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FHOLDERNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FICHOLDERPERCENT VARCHAR(50) DEFAULT ' ' NOT NULL,
FHOLDERID BIGINT DEFAULT 0 NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_ILLEGALENTITY') 
 CREATE TABLE T_PBD_BUSI_ILLEGALENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPUTDATE DATETIME,
FPUTREASON VARCHAR(255) DEFAULT ' ' NOT NULL,
FPUTREASON_TAG NCLOB,
FPUTDEPARTMENT VARCHAR(200) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_KTANENTITY') 
 CREATE TABLE T_PBD_BUSI_KTANENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FKTANNOUNCEMENTID BIGINT DEFAULT 0 NOT NULL,
FKTDATE DATETIME,
FKTPLAINTIFF NVARCHAR(255) DEFAULT ' ' NOT NULL,
FKTPLAINTIFF_TAG NCLOB,
FKTCOURTROOM VARCHAR(50) DEFAULT ' ' NOT NULL,
FKTCOURTREGREASON VARCHAR(200) DEFAULT ' ' NOT NULL,
FKTCOURT NVARCHAR(200) DEFAULT ' ' NOT NULL,
FKTLITIGANT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FKTCASENO VARCHAR(50) DEFAULT ' ' NOT NULL,
FKTDEFENDANT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FKTDEFENDANT_TAG NCLOB,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_LAWSUITENTITY') 
 CREATE TABLE T_PBD_BUSI_LAWSUITENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCASEID BIGINT DEFAULT 0 NOT NULL,
FCASETITLE NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FCASEREASON NVARCHAR(500) DEFAULT ' ' NOT NULL,
FCASENO NVARCHAR(1000) DEFAULT ' ' NOT NULL,
FCASETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCASEPERSONS VARCHAR(2000) DEFAULT ' ' NOT NULL,
FCASEPERSONS_TAG NCLOB,
FCASECOURT VARCHAR(100) DEFAULT ' ' NOT NULL,
FSUBMITTIME DATETIME,
FJUDGETIME DATETIME,
FCASEMONEY VARCHAR(50) DEFAULT ' ' NOT NULL,
FURL VARCHAR(255) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_NEWSENTITY') 
 CREATE TABLE T_PBD_BUSI_NEWSENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FNEWSTITLE NVARCHAR(200) DEFAULT ' ' NOT NULL,
FNEWSURL VARCHAR(300) DEFAULT ' ' NOT NULL,
FNEWSRTM DATETIME,
FNEWSEMOTION VARCHAR(50) DEFAULT ' ' NOT NULL,
FNEWSABSTRACTS NVARCHAR(255) DEFAULT ' ' NOT NULL,
FNEWSABSTRACTS_TAG NCLOB,
FDOCID VARCHAR(255) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_PROCHECKENTITY') 
 CREATE TABLE T_PBD_BUSI_PROCHECKENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPROCHECKRESULT NVARCHAR(100) DEFAULT ' ' NOT NULL,
FINSPECTIONORG NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMAJORDISQUPROJECT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPRONAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPRODATE VARCHAR(50) DEFAULT ' ' NOT NULL,
FRESULTRELEASETIME DATETIME,
FSPECNUM VARCHAR(100) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_PUNISHENTITY') 
 CREATE TABLE T_PBD_BUSI_PUNISHENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FDECISIONDATE DATETIME,
FPUNISHNUMBER VARCHAR(500) DEFAULT ' ' NOT NULL,
FREASON NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREASON_TAG NCLOB,
FCONTENT NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCONTENT_TAG NCLOB,
FDEPARTMENTNAME NVARCHAR(512) DEFAULT ' ' NOT NULL,
FLEGALPERSONNAME1 NVARCHAR(120) DEFAULT ' ' NOT NULL,
FPUNISHSTATUS VARCHAR(100) DEFAULT ' ' NOT NULL,
FEVIDENCE NVARCHAR(1000) DEFAULT ' ' NOT NULL,
FPUNISHNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSI_STAFFENTITY') 
 CREATE TABLE T_PBD_BUSI_STAFFENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSTAFFNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSTAFFPOSITION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSTAFFID BIGINT DEFAULT 0 NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_BUSINESS_INFO') 
 CREATE TABLE T_PBD_BUSINESS_INFO (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(80) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FCREATETIME DATETIME,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSUPPLIERNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FLEGALPERSONNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FREGCAPITAL VARCHAR(50) DEFAULT ' ' NOT NULL,
FREGSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FACTUALCAPITAL VARCHAR(50) DEFAULT ' ' NOT NULL,
FCREDITCODE VARCHAR(255) DEFAULT ' ' NOT NULL,
FTAXNUMBER VARCHAR(255) DEFAULT ' ' NOT NULL,
FREGNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FCOMPANYORGTYPE VARCHAR(255) DEFAULT ' ' NOT NULL,
FORGNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FINDUSTRY VARCHAR(255) DEFAULT ' ' NOT NULL,
FESTIBLISHTIME DATETIME,
FREVOKEREASON VARCHAR(500) DEFAULT ' ' NOT NULL,
FCANCELREASON VARCHAR(500) DEFAULT ' ' NOT NULL,
FCANCELDATE DATETIME,
FREVOKEDATE DATETIME,
FAPPROVEDTIME DATETIME,
FREGINSTITUTE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPERCENTILESCORE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FADDRESS NVARCHAR(255) DEFAULT ' ' NOT NULL,
FHISTORYNAMES NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSOCIALSTAFFNUM BIGINT DEFAULT 0 NOT NULL,
FSTAFFNUMRANGE VARCHAR(255) DEFAULT ' ' NOT NULL,
FREGLOCATION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISLISTEDCOMPANY CHAR(1) DEFAULT ' ' NOT NULL,
FCOMPANYINTRO NVARCHAR(500) DEFAULT ' ' NOT NULL,
FBUSINESSSCOPE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FBUSINESSSCOPE_TAG NCLOB,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FOPERATINGPERIODFROM DATETIME,
FOPERATINGPERIODTO DATETIME,
FCHANGETOTAL INT DEFAULT 0 NOT NULL,
FHOLDERTOTAL INT DEFAULT 0 NOT NULL,
FBRANCHTOTAL INT DEFAULT 0 NOT NULL,
FSTAFFTOTAL INT DEFAULT 0 NOT NULL,
FABNTOTAL INT DEFAULT 0 NOT NULL,
FCERTCHECKTOTAL INT DEFAULT 0 NOT NULL,
FCOMPANYCHECKTOTAL INT DEFAULT 0 NOT NULL,
FNEWSTOTAL INT DEFAULT 0 NOT NULL,
FCASETOTAL INT DEFAULT 0 NOT NULL,
FCOURTANNOTOTAL INT DEFAULT 0 NOT NULL,
FCOURTREGISTERTOTAL INT DEFAULT 0 NOT NULL,
FEXECUTEETOTAL INT DEFAULT 0 NOT NULL,
FDISHONESTTOTAL INT DEFAULT 0 NOT NULL,
FKTANNOUNCEMENTTOTAL INT DEFAULT 0 NOT NULL,
FPUNISHMENTINFOTOTAL INT DEFAULT 0 NOT NULL,
FILLEGALINFOTOTAL INT DEFAULT 0 NOT NULL,
FPRODUCTCHECKTOTAL INT DEFAULT 0 NOT NULL,
FUPDATETIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_LINK') 
 CREATE TABLE T_PBD_LINK (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FUSEORGID BIGINT DEFAULT 0 NOT NULL,
FCTRLSTRATEGY VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCEDATAID BIGINT DEFAULT 0 NOT NULL,
FBITINDEX BIGINT DEFAULT 0 NOT NULL,
FSOURCEBITINDEX BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FCLIENTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FCLIENTSECRET VARCHAR(50) DEFAULT ' ' NOT NULL,
FTOKEN VARCHAR(50) DEFAULT ' ' NOT NULL,
FPUBLICKEY VARCHAR(500) DEFAULT ' ' NOT NULL,
FJINGWEIPUBLICKEY VARCHAR(500) DEFAULT ' ' NOT NULL,
FOPENSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FTENANTID VARCHAR(50) DEFAULT ' ' NOT NULL,
FWHOLEGROUP CHAR(1) DEFAULT '1' NOT NULL,
FPLATFORM BIGINT DEFAULT 0 NOT NULL,
FAPPLYORG VARCHAR(1000) DEFAULT ' ' NOT NULL,
FCALLNUMS BIGINT DEFAULT 0 NOT NULL,
FSYSSOURCEID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_LINK_ORGENTITY') 
 CREATE TABLE T_PBD_LINK_ORGENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCOMPANYORG BIGINT DEFAULT 0 NOT NULL,
FINCLUDESUBORG CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_ENTRYENTITY') 
 CREATE TABLE T_PBD_SERVICE_ENTRYENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FSTANDARDAPI BIGINT DEFAULT 0 NOT NULL,
FPLATFORMAPI BIGINT DEFAULT 0 NOT NULL,
FEFFECTIVENESS BIGINT DEFAULT 0 NOT NULL,
FAPIPURPOSE NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_OP_SCENE') 
 CREATE TABLE T_PBD_SERVICE_OP_SCENE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_ORGENTITY') 
 CREATE TABLE T_PBD_SERVICE_ORGENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCOMPANYORG BIGINT DEFAULT 0 NOT NULL,
FINCLUDESUBORG CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_PROGRAMME') 
 CREATE TABLE T_PBD_SERVICE_PROGRAMME (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FLINK BIGINT DEFAULT 0 NOT NULL,
FISPREINSDATA CHAR(1) DEFAULT '0' NOT NULL,
FWHOLEGROUP CHAR(1) DEFAULT '0' NOT NULL,
FREMARK NVARCHAR(1000) DEFAULT ' ' NOT NULL,
FBILLENTITY VARCHAR(36) DEFAULT ' ' NOT NULL,
FTRIGGERTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FOPERATOR VARCHAR(50) DEFAULT ' ' NOT NULL,
FOPERATORNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FAPPLYORG VARCHAR(1000) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_RULE') 
 CREATE TABLE T_PBD_SERVICE_RULE (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(80) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FCREATETIME DATETIME,
FSTANDARDAPILD BIGINT DEFAULT 0 NOT NULL,
FPLATFORMAPILD BIGINT DEFAULT 0 NOT NULL,
FBILLENTITY VARCHAR(36) DEFAULT ' ' NOT NULL,
FTRIGGERTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FBILLID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FRULETYPE CHAR(1) DEFAULT ' ' NOT NULL,
FOPERATOR VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_RULE_FIN') 
 CREATE TABLE T_PBD_SERVICE_RULE_FIN (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FINPUTSOURCEFIELD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FINPUTSOURCEFIELDDESC NVARCHAR(255) DEFAULT ' ' NOT NULL,
FINPUTFIELDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FINPUTTARGETFIELD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FINPUTTARGETFIELDNAME VARCHAR(255) DEFAULT ' ' NOT NULL,
FINPUTREMARK NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_RULE_FOUT') 
 CREATE TABLE T_PBD_SERVICE_RULE_FOUT (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FOUTPUTSOURCEFIELD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FOUTPUTSOURCEFIELDDESC NVARCHAR(255) DEFAULT ' ' NOT NULL,
FOUTPUTFIELDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FOUTPUTTARGETFIELD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FOUTPUTSTARGETFIELDNAME VARCHAR(255) DEFAULT ' ' NOT NULL,
FOUTPUTFIELDFORMULA VARCHAR(50) DEFAULT ' ' NOT NULL,
FOUTPUTFIELDFORMULADESC NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_RULE_PLUGIN') 
 CREATE TABLE T_PBD_SERVICE_RULE_PLUGIN (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPLCLASSNAME VARCHAR(500) DEFAULT ' ' NOT NULL,
FPLDISPLAYNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPLDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPLISENABLE CHAR(1) DEFAULT '1' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_RULE_RIN') 
 CREATE TABLE T_PBD_SERVICE_RULE_RIN (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FINPUTSRCRULEFIELD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FINPUTSRCRULEFIELDDESC NVARCHAR(255) DEFAULT ' ' NOT NULL,
FINPUTRULETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FINPUTTARRULEFIELD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FINPUTTARRULEFIELDNAME VARCHAR(255) DEFAULT ' ' NOT NULL,
FINPUTRULEREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_RULE_ROUT') 
 CREATE TABLE T_PBD_SERVICE_RULE_ROUT (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FOUTPUTSRCRULEFIELD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FOUTPUTSRCRULEFIELDDESC NVARCHAR(255) DEFAULT ' ' NOT NULL,
FOUTPUTRULETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FOUTPUTTARRULEFIELD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FOUTPUTTARRULEFIELDNAME VARCHAR(255) DEFAULT ' ' NOT NULL,
FOUTPUTRULEREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_SCENE') 
 CREATE TABLE T_PBD_SERVICE_SCENE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FDESC NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDESC_TAG NCLOB,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FISPREINSDATA CHAR(1) DEFAULT '0' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_STRUCT') 
 CREATE TABLE T_PBD_STRUCT (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCEID VARCHAR(36) DEFAULT ' ' NOT NULL,
FENTITYCODE VARCHAR(512) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FISPREINSDATA CHAR(1) DEFAULT '0' NOT NULL,
FREMARK NVARCHAR(1000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_STRUCT_INPUTENTITY') 
 CREATE TABLE T_PBD_STRUCT_INPUTENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPARENTENTRYID BIGINT DEFAULT 0 NOT NULL,
FINPUTSFIELDID VARCHAR(50) DEFAULT ' ' NOT NULL,
FINPUTSFIELDNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FINPUTSFIELDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FINPUTSISARRAY CHAR(1) DEFAULT '0' NOT NULL,
FINPUTSKEYISV VARCHAR(50) DEFAULT ' ' NOT NULL,
FINPUTSKEYSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_STRUCT_OUTPUTENTITY') 
 CREATE TABLE T_PBD_STRUCT_OUTPUTENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPARENTENTRYID BIGINT DEFAULT 0 NOT NULL,
FOUTPUTSFIELDID VARCHAR(50) DEFAULT ' ' NOT NULL,
FOUTPUTSFIELDNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FOUTPUTSFIELDTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FOUTPUTSISARRAY CHAR(1) DEFAULT '0' NOT NULL,
FOUTPUTSKEYSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FOUTPUTSKEYISV VARCHAR(50) DEFAULT ' ' NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PBD_SERVICE_FIELDPLUGIN') 
 CREATE TABLE T_PBD_SERVICE_FIELDPLUGIN (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FPLCLASSNAME VARCHAR(500) DEFAULT ' ' NOT NULL,
FPLDISPLAYNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPLDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPLISENABLE CHAR(1) DEFAULT '1' NOT NULL
);



/**End C:\PDM_UPGRADE\PDM1\PBD_table.sql **/
