/**援建类型、轮岗类型、挂职类型建表语句**/
/**Begin D:\Soft\PDM_UPGRADE_1.4\PDM_UPGRADE\PDM1\HBSS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_ROTATIONTYPE')
CREATE TABLE T_HBSS_ROTATIONTYPE (
                                     FID BIGINT DEFAULT 0 NOT NULL,
                                     FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
                                     FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                     FSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
                                     FENABLE VARCHAR(2) DEFAULT ' ' NOT NULL,
                                     FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                     FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
                                     FCREATORID BIGINT DEFAULT 0 NOT NULL,
                                     FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
                                     FCREATETIME DATETIME,
                                     FMODIFYTIME DATETIME,
                                     FMASTERID BIGINT DEFAULT 0 NOT NULL,
                                     FINDEX INT DEFAULT 0 NOT NULL,
                                     FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
                                     FDISABLERID BIGINT DEFAULT 0 NOT NULL,
                                     FDISABLEDATE DATETIME
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_TTAKEPOSTYPE')
CREATE TABLE T_HBSS_TTAKEPOSTYPE (
                                     FID BIGINT DEFAULT 0 NOT NULL,
                                     FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
                                     FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                     FSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
                                     FENABLE VARCHAR(2) DEFAULT ' ' NOT NULL,
                                     FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                     FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
                                     FCREATORID BIGINT DEFAULT 0 NOT NULL,
                                     FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
                                     FCREATETIME DATETIME,
                                     FMODIFYTIME DATETIME,
                                     FMASTERID BIGINT DEFAULT 0 NOT NULL,
                                     FINDEX INT DEFAULT 0 NOT NULL,
                                     FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
                                     FDISABLERID BIGINT DEFAULT 0 NOT NULL,
                                     FDISABLEDATE DATETIME
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_HELPBUILDTYPE')
CREATE TABLE T_HBSS_HELPBUILDTYPE (
                                      FID BIGINT DEFAULT 0 NOT NULL,
                                      FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
                                      FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                      FSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
                                      FENABLE VARCHAR(2) DEFAULT ' ' NOT NULL,
                                      FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                      FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
                                      FCREATORID BIGINT DEFAULT 0 NOT NULL,
                                      FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
                                      FCREATETIME DATETIME,
                                      FMODIFYTIME DATETIME,
                                      FMASTERID BIGINT DEFAULT 0 NOT NULL,
                                      FINDEX INT DEFAULT 0 NOT NULL,
                                      FISSYSPRESET CHAR(1) DEFAULT '0' NOT NULL,
                                      FDISABLERID BIGINT DEFAULT 0 NOT NULL,
                                      FDISABLEDATE DATETIME,
                                      FORINUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
                                      FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                      FORISTATUS CHAR(1) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_HELPBUILDTYPE_L')
CREATE TABLE T_HBSS_HELPBUILDTYPE_L (
                                        FID BIGINT DEFAULT 0 NOT NULL,
                                        FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
                                        FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
                                        FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                        FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                        FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
                                        FORINAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);



/**End D:\Soft\PDM_UPGRADE_1.4\PDM_UPGRADE\PDM1\HBSS_table.sql **/