/**Begin C:\PDM_UPGRADE\PDM1\SRC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REGEXPERT') 
 CREATE TABLE T_SRC_REGEXPERT (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) 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,
FCREATEORGID BIGINT DEFAULT 0 NOT NULL,
FCTRLSTRATEGY CHAR(1) DEFAULT ' ' NOT NULL,
FSEX CHAR(1) DEFAULT ' ' NOT NULL,
FBIRTHDATE DATETIME,
FIDNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FEVALUATETIME DATETIME,
FQUALIFYTIME DATETIME,
FWORKTIME DATETIME,
FTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FUSERID BIGINT DEFAULT 0 NOT NULL,
FOFFICEPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTELEPHONE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEMAIL NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPOLITICALSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FNAME NVARCHAR(300) DEFAULT ' ' NOT NULL,
FOFFICE NVARCHAR(300) DEFAULT ' ' NOT NULL,
FJOB NVARCHAR(300) DEFAULT ' ' NOT NULL,
FJOBTITLE NVARCHAR(300) DEFAULT ' ' NOT NULL,
FVOCATIONALQUALIFICATION NVARCHAR(300) DEFAULT ' ' NOT NULL,
FWORKINGMAJOR NVARCHAR(300) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(300) DEFAULT ' ' NOT NULL,
FOFFICEADDRESS NVARCHAR(300) DEFAULT ' ' NOT NULL,
FCITYID BIGINT DEFAULT 0 NOT NULL,
FPICTURE VARCHAR(300) DEFAULT ' ' NOT NULL,
FISPUSHEXPERT CHAR(1) DEFAULT '0' NOT NULL,
FEXECUTERESULT CHAR(1) DEFAULT ' ' NOT NULL,
FAUDITSTATUS CHAR(1) DEFAULT 'A' NOT NULL,
FORIGIN CHAR(1) DEFAULT '2' NOT NULL,
FPROFICIENTLEVELID BIGINT DEFAULT 0 NOT NULL,
FPROFICIENTTYPEID BIGINT DEFAULT 0 NOT NULL,
FSOURCEDATAID BIGINT DEFAULT 0 NOT NULL,
FBITINDEX INT DEFAULT 0 NOT NULL,
FSOURCEBITINDEX INT DEFAULT 0 NOT NULL,
FAUDITOPINION NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REGEXPERT_L') 
 CREATE TABLE T_SRC_REGEXPERT_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(300) DEFAULT ' ' NOT NULL,
FOFFICE NVARCHAR(300) DEFAULT ' ' NOT NULL,
FJOB NVARCHAR(300) DEFAULT ' ' NOT NULL,
FJOBTITLE NVARCHAR(300) DEFAULT ' ' NOT NULL,
FVOCATIONALQUALIFICATION NVARCHAR(300) DEFAULT ' ' NOT NULL,
FWORKINGMAJOR NVARCHAR(300) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(300) DEFAULT ' ' NOT NULL,
FOFFICEADDRESS NVARCHAR(300) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REGEXPERTAPTITUDE') 
 CREATE TABLE T_SRC_REGEXPERTAPTITUDE (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FAPTITUDETYPEID BIGINT DEFAULT 0 NOT NULL,
FAPTITUDENAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FISSUEORG NVARCHAR(255) DEFAULT ' ' NOT NULL,
FAPTITUDENUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FGRADE VARCHAR(20) DEFAULT ' ' NOT NULL,
FISSUEDATE DATETIME,
FDATETO DATETIME,
FCHECKDATE DATETIME,
FAPTITUDENOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REGEXPERTAPT_FJ') 
 CREATE TABLE T_SRC_REGEXPERTAPT_FJ (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REGEXPERTSUPPLIER') 
 CREATE TABLE T_SRC_REGEXPERTSUPPLIER (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSUPPLIERNOTE NVARCHAR(510) DEFAULT ' ' NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REGEXPERTEDUCATION') 
 CREATE TABLE T_SRC_REGEXPERTEDUCATION (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FMAJOR NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEDUCATIONDEGREE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDATEFROM DATETIME,
FDATETO DATETIME,
FGRADUATESCHOOL NVARCHAR(100) DEFAULT ' ' NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REGEXPERTWORK') 
 CREATE TABLE T_SRC_REGEXPERTWORK (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDATEFROM DATETIME,
FDATETO DATETIME,
FWORKUNIT NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDUTY NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNOTE NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_EXPERT_PBTYPE') 
 CREATE TABLE T_SRC_EXPERT_PBTYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SRC_REGEXPERT_TYPE') 
 CREATE TABLE T_SRC_REGEXPERT_TYPE (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);



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