/**Begin D:\utils\PDM_UPGRADE\PDM_UPGRADE\PDM1\HRPTMC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTC_REPORTCENTER')
CREATE TABLE T_HRPTC_REPORTCENTER (
                                      FID BIGINT DEFAULT 0 NOT NULL,
                                      FDESCRIPTION NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                      FREPORTMANAGEID BIGINT DEFAULT 0 NOT NULL,
                                      FREPORTGROUPID BIGINT DEFAULT 0 NOT NULL,
                                      FREPORTPICTURE VARCHAR(255) DEFAULT ' ' NOT NULL,
                                      FCREATORID BIGINT DEFAULT 0 NOT NULL,
                                      FCREATETIME DATETIME,
                                      FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
                                      FMODIFYTIME DATETIME
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTC_REPORTGROUP')
CREATE TABLE T_HRPTC_REPORTGROUP (
                                     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,
                                     FLONGNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
                                     FLEVEL INT DEFAULT 0 NOT NULL,
                                     FFULLNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                     FISLEAF CHAR(1) DEFAULT '0' NOT NULL,
                                     FPARENTID BIGINT DEFAULT 0 NOT NULL,
                                     FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                     FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
                                     FISENDGROUP CHAR(1) DEFAULT '0' 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_HRPTC_REPORTGROUP_L')
CREATE TABLE T_HRPTC_REPORTGROUP_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,
                                       FFULLNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                       FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                       FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL
);



/**End D:\utils\PDM_UPGRADE\PDM_UPGRADE\PDM1\HRPTMC_table.sql **/
