-- MySQL Workbench Forward Engineering


SET
    @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS,
    FOREIGN_KEY_CHECKS = 0;

SET
    @OLD_SQL_MODE = @@SQL_MODE,
    SQL_MODE = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------


-- -----------------------------------------------------
-- Schema hr
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `hr` DEFAULT CHARACTER SET utf8mb3 ;
USE `hr` ;

-- -----------------------------------------------------
-- Table `hr`.`PositionTypes`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`PositionTypes` (
  `ID` INT NOT NULL AUTO_INCREMENT,
  `Name` VARCHAR(255) NULL DEFAULT NULL,
  PRIMARY KEY (`ID`))
ENGINE = InnoDB
AUTO_INCREMENT = 9
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`Positions`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`Positions` (
  `ID` INT NOT NULL AUTO_INCREMENT,
  `PositionTypeID` INT NOT NULL,
  `Name` VARCHAR(255) NOT NULL,
  `ParentID` INT NULL DEFAULT NULL,
  `Permissions` TEXT NOT NULL,
  `KPI` TEXT NULL DEFAULT NULL,
  `Specifications` TEXT NULL DEFAULT NULL,
  `Percentage` DECIMAL(10,2) NULL DEFAULT NULL,
  `Item` INT NULL DEFAULT NULL,
  `Todos` VARCHAR(500) NULL DEFAULT NULL,
  `Flag` VARCHAR(50) NULL DEFAULT 'position',
  PRIMARY KEY (`ID`),
  INDEX `Positions_ibfk_1` (`PositionTypeID` ASC) VISIBLE,
  INDEX `Positions_ibfk_2` (`ParentID` ASC) VISIBLE,
  CONSTRAINT `Positions_ibfk_1`
    FOREIGN KEY (`PositionTypeID`)
    REFERENCES `hr`.`PositionTypes` (`ID`),
  CONSTRAINT `Positions_ibfk_2`
    FOREIGN KEY (`ParentID`)
    REFERENCES `hr`.`Positions` (`ID`)
    ON DELETE SET NULL
    ON UPDATE SET NULL)
ENGINE = InnoDB
AUTO_INCREMENT = 205
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`PositionRelationship`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`PositionRelationship` (
  `position_id` INT NOT NULL,
  `work_with_who_id` INT NOT NULL,
  PRIMARY KEY (`position_id`, `work_with_who_id`),
  INDEX `PositionRelationship_ibfk_2` (`work_with_who_id` ASC) VISIBLE,
  CONSTRAINT `PositionRelationship_ibfk_1`
    FOREIGN KEY (`position_id`)
    REFERENCES `hr`.`Positions` (`ID`)
    ON DELETE CASCADE
    ON UPDATE CASCADE,
  CONSTRAINT `PositionRelationship_ibfk_2`
    FOREIGN KEY (`work_with_who_id`)
    REFERENCES `hr`.`Positions` (`ID`)
    ON DELETE CASCADE
    ON UPDATE CASCADE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`project`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`project` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `hash` BIGINT NOT NULL,
  `title` VARCHAR(255) NOT NULL,
  `project_type` VARCHAR(255) NOT NULL,
  `client_hash` VARCHAR(255) NOT NULL,
  `description` TEXT NULL DEFAULT NULL,
  `start_date` DATE NULL DEFAULT NULL,
  `deadline` DATE NULL DEFAULT NULL,
  `price` DECIMAL(15,2) NULL DEFAULT NULL,
  `created_at` TIMESTAMP NULL DEFAULT NULL,
  `updated_at` TIMESTAMP NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  INDEX `index_on_hash` (`hash` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 6
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`RequestPayment`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`RequestPayment` (
  `PaymentID` INT NOT NULL AUTO_INCREMENT,
  `price` DECIMAL(10,2) NOT NULL,
  `date` DATE NOT NULL,
  `notes` VARCHAR(45) NULL DEFAULT NULL,
  `goverment` VARCHAR(25) NOT NULL,
  `projectId` BIGINT NULL DEFAULT NULL,
  `userId` BIGINT NOT NULL,
  PRIMARY KEY (`PaymentID`),
  INDEX `ibk3_projectIdForeignKey_idx` (`projectId` ASC) INVISIBLE,
  CONSTRAINT `ibk3_projectIdForeignKey`
    FOREIGN KEY (`projectId`)
    REFERENCES `hr`.`project` (`hash`))
ENGINE = InnoDB
AUTO_INCREMENT = 14
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`accounting_tree`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`accounting_tree` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `hash` BIGINT NOT NULL,
  `name` VARCHAR(45) NOT NULL,
  `number` INT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 111297
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`administrative_order_type`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`administrative_order_type` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(255) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 22
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'انواع الاوامر الادارية';


-- -----------------------------------------------------
-- Table `hr`.`administrative_orders`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`administrative_orders` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `order_title_hash` BIGINT NULL DEFAULT NULL,
  `details` VARCHAR(1000) NULL DEFAULT NULL,
  `number` VARCHAR(100) NULL DEFAULT NULL,
  `date` DATE NULL DEFAULT NULL COMMENT 'الاوامر الادارية',
  `attachment` VARCHAR(1000) NULL DEFAULT NULL,
  `hash` BIGINT UNSIGNED NULL DEFAULT NULL COMMENT 'الاوامر الادارية',
  `amount` INT NULL DEFAULT '0',
  `create_record_date` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 1025
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'الاوامر الادارية';


-- -----------------------------------------------------
-- Table `hr`.`system_users`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`system_users` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(255) CHARACTER SET 'utf8mb3' NOT NULL,
  `username` VARCHAR(255) CHARACTER SET 'utf8mb3' NOT NULL,
  `password` VARCHAR(255) CHARACTER SET 'utf8mb3' NOT NULL,
  `user_type` BIGINT NOT NULL DEFAULT '16587740479514765',
  `vication_agreement` INT NULL DEFAULT NULL,
  `image_profile` VARCHAR(1000) COLLATE 'utf8mb3_unicode_ci' NULL DEFAULT 'http://unimedica-iraq.com/hr/app/uploads/user_image_profile/default.png',
  `insert_record_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `mobile_token` VARCHAR(1000) COLLATE 'utf8mb3_unicode_ci' NULL DEFAULT NULL,
  `is_ios` INT NULL DEFAULT NULL,
  `mobile_info` VARCHAR(1000) COLLATE 'utf8mb3_unicode_ci' NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  `task_agreement` INT NULL DEFAULT '0',
  `employment_code` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `hash_UNIQUE` (`hash` ASC) VISIBLE,
  INDEX `index2` (`hash` ASC) INVISIBLE,
  INDEX `index4` (`user_type` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 736
COMMENT = 'المستخدمين';


-- -----------------------------------------------------
-- Table `hr`.`advance`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`advance` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `price` DECIMAL(13,0) NULL DEFAULT NULL,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  `is_deleted` TINYINT(1) NULL DEFAULT '0',
  `is_blocked` TINYINT(1) NULL DEFAULT '0',
  `user_admin` BIGINT NULL DEFAULT NULL,
  `advancecol` VARCHAR(45) NULL DEFAULT NULL,
  `status_id` INT NOT NULL DEFAULT '4',
  PRIMARY KEY (`id`),
  INDEX `advance_ibfk_1` (`user_hash` ASC) VISIBLE,
  CONSTRAINT `advance_ibfk_1`
    FOREIGN KEY (`user_hash`)
    REFERENCES `hr`.`system_users` (`hash`))
ENGINE = InnoDB
AUTO_INCREMENT = 102
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`advance_payment`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`advance_payment` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `price` DECIMAL(10,2) NOT NULL,
  `date` DATE NULL DEFAULT NULL,
  `invoice_number` INT NOT NULL,
  `invoice_date` DATE NOT NULL,
  `notes` TEXT NULL DEFAULT NULL,
  `attachment` VARCHAR(255) NOT NULL,
  `projectId` BIGINT NULL DEFAULT NULL,
  `userId` BIGINT NOT NULL,
  `requestPaymentId` INT NOT NULL,
  `categoryId` BIGINT NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `invoice_number_UNIQUE` (`invoice_number` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 63
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`advance_status`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`advance_status` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(255) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `hash_UNIQUE` (`hash` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 5
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`advance_steps`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`advance_steps` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `advance_id` INT NULL DEFAULT NULL,
  `status_id` INT NULL DEFAULT '4',
  `date` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `notes` TEXT NULL DEFAULT NULL,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `user_admin` BIGINT NULL DEFAULT NULL,
  `is_finish` TINYINT(1) NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  INDEX `user_admin` (`user_admin` ASC) VISIBLE,
  INDEX `advance_steps_ibfk_2` (`status_id` ASC) VISIBLE,
  INDEX `advance_steps_ibfk_1` (`advance_id` ASC) VISIBLE,
  CONSTRAINT `advance_steps_ibfk_1`
    FOREIGN KEY (`advance_id`)
    REFERENCES `hr`.`advance` (`id`),
  CONSTRAINT `advance_steps_ibfk_2`
    FOREIGN KEY (`status_id`)
    REFERENCES `hr`.`advance_status` (`id`),
  CONSTRAINT `advance_steps_ibfk_3`
    FOREIGN KEY (`user_admin`)
    REFERENCES `hr`.`system_users` (`hash`))
ENGINE = InnoDB
AUTO_INCREMENT = 186
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`announce`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`announce` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(255) NULL DEFAULT NULL,
  `details` VARCHAR(1000) NULL DEFAULT NULL,
  `number` VARCHAR(50) NULL DEFAULT NULL,
  `date` DATE NULL DEFAULT NULL,
  `attachment` VARCHAR(1000) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  `create_record` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 234
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`announce_to_user`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`announce_to_user` (
  `id` BIGINT NOT NULL AUTO_INCREMENT,
  `announce_hash` BIGINT NULL DEFAULT NULL,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 15146
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`blocked_pages`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`blocked_pages` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `pageId` INT NOT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 12
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`check_in`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`check_in` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `note` VARCHAR(1000) NULL DEFAULT NULL,
  `location` POINT NULL DEFAULT NULL,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `data_entry` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 27
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`clients`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`clients` (
  `name` VARCHAR(100) NOT NULL,
  `address` VARCHAR(255) NOT NULL,
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `hash` BIGINT UNSIGNED NOT NULL,
  `created_at` DATETIME NULL DEFAULT NULL,
  `updated_at` DATETIME NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 2
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`device_log`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`device_log` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(100) NULL DEFAULT NULL,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `old_mobile_info` VARCHAR(1000) NULL DEFAULT NULL,
  `new_mobile_info` VARCHAR(1000) NULL DEFAULT NULL,
  `status` VARCHAR(45) NULL DEFAULT '1',
  `hash` BIGINT NULL DEFAULT NULL,
  `record_date` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 1044
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`emp_fingerprint`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`emp_fingerprint` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `user_hash` BIGINT NOT NULL,
  `fingerprint_type` BIGINT NOT NULL,
  `fingerprint_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `in_out` VARCHAR(100) NOT NULL,
  `data_entry` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `hash` BIGINT NULL DEFAULT NULL,
  `location` POINT NULL DEFAULT NULL,
  `user_create_record` BIGINT NULL DEFAULT NULL,
  `user_update_record` BIGINT NULL DEFAULT NULL,
  `mobile_info` VARCHAR(1000) NULL DEFAULT NULL COMMENT 'الموبايل الي بصم بي',
  `day_print` DATE GENERATED ALWAYS AS (cast(`fingerprint_time` as date)) STORED,
  `emp_test` VARCHAR(45) NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `hash_UNIQUE` (`hash` ASC) VISIBLE,
  INDEX `emp_fingerprint_user_hash_index` (`user_hash` ASC) VISIBLE,
  INDEX `index5` USING BTREE (`user_hash`, `day_print`) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 84610
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'بصمة الموظفين';


-- -----------------------------------------------------
-- Table `hr`.`positions_other`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`positions_other` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(45) NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 23
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`emp_information`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`emp_information` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `user_hash` BIGINT NOT NULL,
  `primary_salary` DOUBLE NULL DEFAULT '500',
  `vacations_limit` INT NULL DEFAULT '16',
  `sick_leave` INT NULL DEFAULT '16',
  `status` VARCHAR(45) NULL DEFAULT NULL,
  `work_from` TIME NULL DEFAULT '08:00:00',
  `work_to` TIME NULL DEFAULT '17:00:00',
  `allow_time` TIME NULL DEFAULT '08:15:00',
  `location_of_work` BIGINT NULL DEFAULT NULL,
  `birthday` DATE NULL DEFAULT NULL,
  `address` VARCHAR(45) NULL DEFAULT NULL,
  `phone1` VARCHAR(45) NULL DEFAULT NULL,
  `phone2` VARCHAR(45) NULL DEFAULT NULL,
  `partment` VARCHAR(45) NULL DEFAULT NULL,
  `disable_in_finger_time` TIME NULL DEFAULT '12:00:00',
  `disable_out_finger_time` TIME NULL DEFAULT '18:00:00',
  `start_work_date` DATE NULL DEFAULT '2022-08-01',
  `emp_id` INT NULL DEFAULT NULL,
  `jop_type` INT NULL DEFAULT '0',
  `is_work` TINYINT NULL DEFAULT '1',
  `job_number` VARCHAR(45) NULL DEFAULT NULL,
  `work_in_check_distance` VARCHAR(5) NULL DEFAULT '1',
  `work_out_check_distance` VARCHAR(5) NULL DEFAULT '1',
  `advance_agreement` VARCHAR(5) NULL DEFAULT '0',
  `advance_request` VARCHAR(5) NULL DEFAULT '0',
  `position` VARCHAR(45) NULL DEFAULT NULL,
  `annual_percentage_increase` INT NULL DEFAULT '0',
  `annual_price_increase` INT NULL DEFAULT '0',
  `salary_type` INT NULL DEFAULT '1',
  `position_other` INT NULL DEFAULT NULL,
  `pagesPermissions` SET('169', '166', '167', '150', '149', '127', '147') NULL DEFAULT '169,166,167,150,149,127,147',
  `IBN` VARCHAR(255) NULL DEFAULT NULL,
  `number_of_year_exp` INT NULL DEFAULT '0',
  `fingerprint_required` TINYINT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE INDEX `user_hash_UNIQUE` (`user_hash` ASC) INVISIBLE,
  INDEX `position_other_idx` (`position_other` ASC) VISIBLE,
  CONSTRAINT `position_other`
    FOREIGN KEY (`position_other`)
    REFERENCES `hr`.`positions_other` (`id`)
    ON DELETE SET NULL
    ON UPDATE CASCADE)
ENGINE = InnoDB
AUTO_INCREMENT = 514
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'معلومات الموظفين';


-- -----------------------------------------------------
-- Table `hr`.`emp_information_log`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`emp_information_log` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `id1` INT NOT NULL,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `primary_salary` DOUBLE NULL DEFAULT '500',
  `vacations_limit` INT NULL DEFAULT '16',
  `sick_leave` INT NULL DEFAULT '16',
  `status` VARCHAR(45) NULL DEFAULT NULL,
  `work_from` TIME NULL DEFAULT '08:00:00',
  `work_to` TIME NULL DEFAULT '17:00:00',
  `allow_time` TIME NULL DEFAULT '08:15:00',
  `location_of_work` BIGINT NULL DEFAULT NULL,
  `birthday` DATE NULL DEFAULT NULL,
  `address` VARCHAR(45) NULL DEFAULT NULL,
  `phone1` VARCHAR(45) NULL DEFAULT NULL,
  `phone2` VARCHAR(45) NULL DEFAULT NULL,
  `partment` VARCHAR(45) NULL DEFAULT NULL,
  `disable_in_finger_time` TIME NULL DEFAULT '12:00:00',
  `disable_out_finger_time` TIME NULL DEFAULT '18:00:00',
  `start_work_date` DATE NULL DEFAULT '2022-08-01',
  `emp_id` INT NULL DEFAULT NULL,
  `jop_type` INT NULL DEFAULT '0',
  `is_work` TINYINT NULL DEFAULT '1',
  `date_of_insert` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 2280
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'معلومات الموظفين';


-- -----------------------------------------------------
-- Table `hr`.`emp_information_old`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`emp_information_old` (
  `id` INT NOT NULL,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `primary_salary` DOUBLE NULL DEFAULT '500',
  `vacations_limit` INT NULL DEFAULT '16',
  `sick_leave` INT NULL DEFAULT '16',
  `status` VARCHAR(45) NULL DEFAULT NULL,
  `work_from` TIME NULL DEFAULT '08:00:00',
  `work_to` TIME NULL DEFAULT '17:00:00',
  `allow_time` TIME NULL DEFAULT '08:15:00',
  `location_of_work` BIGINT NULL DEFAULT NULL,
  `birthday` DATE NULL DEFAULT NULL,
  `address` VARCHAR(45) NULL DEFAULT NULL,
  `phone1` VARCHAR(45) NULL DEFAULT NULL,
  `phone2` VARCHAR(45) NULL DEFAULT NULL,
  `partment` VARCHAR(45) NULL DEFAULT NULL,
  `disable_in_finger_time` TIME NULL DEFAULT '12:00:00',
  `disable_out_finger_time` TIME NULL DEFAULT '18:00:00',
  `start_work_date` DATETIME NULL DEFAULT NULL,
  `emp_id` INT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE INDEX `user_hash_UNIQUE` (`user_hash` ASC) VISIBLE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'معلومات الموظفين';


-- -----------------------------------------------------
-- Table `hr`.`emp_payroll`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`emp_payroll` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `emp_id` BIGINT NOT NULL,
  `emp_name` TEXT NULL DEFAULT NULL,
  `user_qualifcations` TEXT NULL DEFAULT NULL,
  `vacactions_for_this_month` INT NULL DEFAULT NULL,
  `primary_salary` INT NULL DEFAULT NULL,
  `specification_qualification` TEXT NULL DEFAULT NULL,
  `specification_position` TEXT NULL DEFAULT NULL,
  `differences_salary` INT NULL DEFAULT '0',
  `total_salary` INT NULL DEFAULT NULL,
  `flat_salary` INT NULL DEFAULT NULL,
  `notes` TEXT NULL DEFAULT NULL,
  `approved` TINYINT NULL DEFAULT '0',
  `specification_others` TEXT NULL DEFAULT NULL,
  `finiancial_discounts` TEXT NULL DEFAULT NULL,
  `year_months` VARCHAR(7) NOT NULL,
  `from` DATE NOT NULL,
  `to` DATE NOT NULL,
  `price_increase_per_year` INT NOT NULL,
  `salary_after_cut_off` INT NULL DEFAULT NULL,
  `primary_salary_after_cut_off` INT NULL DEFAULT NULL,
  `discountAmount` INT NULL DEFAULT NULL,
  `salaryAfterDiscount` INT NULL DEFAULT NULL,
  `total_Yearly_salary` INT NULL DEFAULT NULL,
  `created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  `hash` BIGINT NULL DEFAULT NULL,
  `updated_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `sum_penalties` INT NULL DEFAULT NULL,
  `sum_rewards` INT NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
  INDEX `ibk1_emp_id` (`emp_id` ASC) VISIBLE,
  CONSTRAINT `ibk1_emp_id`
    FOREIGN KEY (`emp_id`)
    REFERENCES `hr`.`emp_information` (`user_hash`))
ENGINE = InnoDB
AUTO_INCREMENT = 1217
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`event_log`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`event_log` (
  `id` BIGINT NOT NULL AUTO_INCREMENT,
  `message` VARCHAR(255) NULL DEFAULT NULL,
  `date` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 604
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`financial_discounts`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`financial_discounts` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(45) NULL DEFAULT NULL,
  `price` INT NULL DEFAULT NULL,
  `percentage` FLOAT NULL DEFAULT NULL,
  `maximumPrice` INT NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
  INDEX `ibk_price_idx` (`price` ASC) VISIBLE,
  INDEX `ibk_id_idx` (`id` ASC) VISIBLE,
  INDEX `ibk_id2_idx` (`id` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 22
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`finger_print_report`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`finger_print_report` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(255) NULL DEFAULT NULL,
  `emp_hash` BIGINT NULL DEFAULT '0',
  `vacation_hour` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات الاجازة',
  `vacation_limit_hour` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات الاجازة المسموح بها ',
  `duty_hour` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات الواجب',
  `vacation_limit_out` TIME NULL DEFAULT '00:00:00' COMMENT 'تجاوز الساعات المسموح بها',
  `work_hour` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات الحضور',
  `finger_limit_out` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات التاخير البصمة',
  `work_hour_target` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات الدوام المطلوبة',
  `cut_off_hours` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات الخصم',
  `over_time` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات اضافية',
  `cut_off_amount` DOUBLE NULL DEFAULT '0' COMMENT 'مبلغ الخصم',
  `sick_vacation_hour` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات الاجازة المرضية',
  `cut_off_days` DOUBLE NULL DEFAULT '0' COMMENT 'ايام  الخصم',
  `absence_hour` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات الغياب',
  `finger_limit_out_leave` TIME NULL DEFAULT '00:00:00' COMMENT 'ساعات المغادره قبل انتهاء الدوام الرسمي',
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 113
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`fingerprint_type`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`fingerprint_type` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(100) NOT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 7
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'انواع البصمات';


-- -----------------------------------------------------
-- Table `hr`.`holiday`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`holiday` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `date` DATE NULL DEFAULT NULL,
  `type` CHAR(45) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 219
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'جدول العطل والمناسبات';


-- -----------------------------------------------------
-- Table `hr`.`inventory_items_types`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`inventory_items_types` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 63
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`inventory_items`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`inventory_items` (
  `item_id` INT NOT NULL AUTO_INCREMENT,
  `item_name` VARCHAR(255) NULL DEFAULT NULL,
  `item_type` INT NOT NULL,
  `availability_status` TINYINT(1) NULL DEFAULT NULL,
  PRIMARY KEY (`item_id`),
  INDEX `ibk1_item_item_idx` (`item_type` ASC) VISIBLE,
  CONSTRAINT `ibk1_item_item`
    FOREIGN KEY (`item_type`)
    REFERENCES `hr`.`inventory_items_types` (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 106
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`item_assignments`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`item_assignments` (
  `assignment_id` INT NOT NULL AUTO_INCREMENT,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `item_id` INT NULL DEFAULT NULL,
  `assignment_date` DATE NULL DEFAULT NULL,
  PRIMARY KEY (`assignment_id`),
  INDEX `user_hash` (`user_hash` ASC) VISIBLE,
  INDEX `item_assignments_ibfk_2` (`item_id` ASC) VISIBLE,
  CONSTRAINT `item_assignments_ibfk_1`
    FOREIGN KEY (`user_hash`)
    REFERENCES `hr`.`system_users` (`hash`),
  CONSTRAINT `item_assignments_ibfk_2`
    FOREIGN KEY (`item_id`)
    REFERENCES `hr`.`inventory_items` (`item_id`)
    ON UPDATE RESTRICT)
ENGINE = InnoDB
AUTO_INCREMENT = 438
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`log_procedure`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`log_procedure` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `msg` VARCHAR(500) NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 113
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`migrations`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`migrations` (
  `version` BIGINT NOT NULL)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`notification`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`notification` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `type` VARCHAR(45) NULL DEFAULT NULL,
  `text` VARCHAR(1000) NULL DEFAULT NULL,
  `data_entry` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `isreaded` TINYINT NULL DEFAULT '0',
  `title` VARCHAR(100) NULL DEFAULT NULL,
  `user_hash` BIGINT NULL DEFAULT '0',
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 19685
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`notifications_payroll`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`notifications_payroll` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `user_hash` BIGINT NOT NULL,
  `message` TEXT NULL DEFAULT NULL,
  `from_month` DATE NULL DEFAULT NULL,
  `to_month` DATE NULL DEFAULT NULL,
  `salary` DECIMAL(10,2) NULL DEFAULT NULL,
  `created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  INDEX `fk_user_hash` (`user_hash` ASC) VISIBLE,
  CONSTRAINT `fk_user_hash`
    FOREIGN KEY (`user_hash`)
    REFERENCES `hr`.`system_users` (`hash`))
ENGINE = InnoDB
AUTO_INCREMENT = 289
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`office_location`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`office_location` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(255) NULL DEFAULT NULL,
  `address` VARCHAR(255) NULL DEFAULT NULL,
  `location` POINT NULL DEFAULT NULL,
  `allow_merters` VARCHAR(45) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 20
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'مواقع العمل';


-- -----------------------------------------------------
-- Table `hr`.`office_to_user`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`office_to_user` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `office_hash` BIGINT NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 5189
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'مواقع العمل بلنسبة للموظف';


-- -----------------------------------------------------
-- Table `hr`.`others_specifications`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`others_specifications` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(45) NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 27
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`pages`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`pages` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(45) NOT NULL,
  `location` VARCHAR(45) NOT NULL,
  `category` VARCHAR(45) NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 196
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`partments`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`partments` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(45) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 27
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`payroll_conf`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`payroll_conf` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `from` DATE NOT NULL,
  `to` DATE NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`penalties_rewards_types`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`penalties_rewards_types` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(50) NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `name` (`name` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`penalties_rewards`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`penalties_rewards` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `penalties_rewards_types_id` INT NOT NULL,
  `description` VARCHAR(255) NULL DEFAULT NULL,
  `amount` DECIMAL(10,2) NOT NULL,
  `date_added` DATE NOT NULL,
  `notes` VARCHAR(255) NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  INDEX `penalties_rewards_ibfk_1` (`penalties_rewards_types_id` ASC) VISIBLE,
  CONSTRAINT `penalties_rewards_ibfk_1`
    FOREIGN KEY (`penalties_rewards_types_id`)
    REFERENCES `hr`.`penalties_rewards_types` (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 5
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`penalties_rewards_employees`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`penalties_rewards_employees` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `emp_id` BIGINT NULL DEFAULT NULL,
  `penalties_rewards_id` INT NULL DEFAULT NULL,
  `amount` DECIMAL(10,2) NULL DEFAULT NULL,
  `date_added` DATE NULL DEFAULT NULL,
  `penalties_rewards_types_id` INT NULL DEFAULT NULL,
  `notes` VARCHAR(255) NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  INDEX `emp_id` (`emp_id` ASC) VISIBLE,
  INDEX `penalties_rewards_id` (`penalties_rewards_id` ASC) VISIBLE,
  INDEX `fk_penalties_rewards_types` (`penalties_rewards_types_id` ASC) VISIBLE,
  CONSTRAINT `fk_penalties_rewards_types`
    FOREIGN KEY (`penalties_rewards_types_id`)
    REFERENCES `hr`.`penalties_rewards_types` (`id`),
  CONSTRAINT `penalties_rewards_employees_ibfk_1`
    FOREIGN KEY (`emp_id`)
    REFERENCES `hr`.`emp_information` (`user_hash`),
  CONSTRAINT `penalties_rewards_employees_ibfk_2`
    FOREIGN KEY (`penalties_rewards_id`)
    REFERENCES `hr`.`penalties_rewards` (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 60
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`permission`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`permission` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `page_id` INT NULL DEFAULT NULL,
  `access` INT NULL DEFAULT '0',
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 961
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`qualifications`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`qualifications` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(255) NOT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 11
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`salary_types`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`salary_types` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(45) NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 3
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`specifications_types`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`specifications_types` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(45) NULL DEFAULT NULL,
  `table` VARCHAR(45) NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 4
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`specifications`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`specifications` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `specifications_type` INT NOT NULL,
  `name` VARCHAR(45) NULL DEFAULT NULL,
  `percentage` INT NULL DEFAULT NULL,
  `price` INT NULL DEFAULT NULL,
  `maximumPrice` INT NULL DEFAULT NULL,
  `nameValue` INT NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `name_UNIQUE` (`name` ASC) VISIBLE,
  INDEX `ibkf1_specifc_type_idx` (`specifications_type` ASC) VISIBLE,
  CONSTRAINT `ibkf1_specifc_type`
    FOREIGN KEY (`specifications_type`)
    REFERENCES `hr`.`specifications_types` (`id`)
    ON DELETE RESTRICT
    ON UPDATE CASCADE)
ENGINE = InnoDB
AUTO_INCREMENT = 96
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`suggestion`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`suggestion` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `text` VARCHAR(500) NULL DEFAULT NULL,
  `user_hash` VARCHAR(45) NOT NULL,
  `hash` VARCHAR(45) NOT NULL DEFAULT '0',
  `type` INT NULL DEFAULT '1',
  `data_entry` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 171
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`system_configration`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`system_configration` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `work_from` TIME NULL DEFAULT NULL,
  `work_to` TIME NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 2
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`system_group_name`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`system_group_name` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(255) CHARACTER SET 'utf8mb3' NOT NULL,
  `hash` BIGINT NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `index2` (`hash` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 39
COMMENT = 'اسماء الصلاحيات';


-- -----------------------------------------------------
-- Table `hr`.`system_privilage_role`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`system_privilage_role` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `group_hash` BIGINT NOT NULL,
  `table_name` VARCHAR(255) CHARACTER SET 'utf8mb3' NOT NULL,
  `select_op` INT NOT NULL DEFAULT '1',
  `update_op` INT NOT NULL DEFAULT '1',
  `insert_op` INT NOT NULL DEFAULT '1',
  `delete_op` INT NOT NULL DEFAULT '1',
  `hash` BIGINT NOT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 613;


-- -----------------------------------------------------
-- Table `hr`.`system_put_role_to_users`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`system_put_role_to_users` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `group_hash` BIGINT NOT NULL,
  `user_hash` BIGINT NOT NULL,
  `hash` BIGINT NOT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 239;


-- -----------------------------------------------------
-- Table `hr`.`system_users_type`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`system_users_type` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(255) CHARACTER SET 'utf8mb3' NOT NULL,
  `hash` VARCHAR(500) CHARACTER SET 'utf8mb3' NOT NULL,
  `insert_record_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `hash_UNIQUE` (`hash` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 10
COMMENT = 'انواع المستخدمين';


-- -----------------------------------------------------
-- Table `hr`.`task`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`task` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(255) NULL DEFAULT NULL,
  `discription` VARCHAR(1000) NOT NULL,
  `owner` BIGINT NOT NULL,
  `start_task` DATETIME NOT NULL,
  `deadline` DATETIME NOT NULL,
  `score` INT NULL DEFAULT NULL,
  `emergency` INT NOT NULL,
  `tag` BIGINT NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  `sender` BIGINT NULL DEFAULT NULL,
  `receiver` BIGINT NULL DEFAULT NULL,
  `status` BIGINT NULL DEFAULT NULL,
  `note` TEXT NULL DEFAULT NULL,
  `project_hash` BIGINT UNSIGNED NULL DEFAULT NULL,
  `created_at` DATETIME NULL DEFAULT NULL,
  `updated_at` DATETIME NULL DEFAULT NULL,
  `isaccept` INT NULL DEFAULT '2',
  `acceptnote` VARCHAR(1000) NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  INDEX `index2` (`receiver` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 1163
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'الواجبات';


-- -----------------------------------------------------
-- Table `hr`.`task_attachment`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`task_attachment` (
  `id` BIGINT NOT NULL AUTO_INCREMENT,
  `task_hash` BIGINT NULL DEFAULT NULL,
  `user_hash` BIGINT NULL DEFAULT NULL COMMENT 'مرفقات الواجبات',
  `link` VARCHAR(500) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  `note` TEXT NULL DEFAULT NULL,
  `create_record` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 34
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'مرفقات الواجبات';


-- -----------------------------------------------------
-- Table `hr`.`task_status`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`task_status` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(100) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 6
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'حالات الواجبات';


-- -----------------------------------------------------
-- Table `hr`.`task_team`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`task_team` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `user_hash` BIGINT NOT NULL,
  `status` VARCHAR(255) NOT NULL,
  `finish_date` DATETIME NOT NULL,
  `task_hash` BIGINT NOT NULL,
  `score` INT NOT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'الفريق الخاص بالواجب';


-- -----------------------------------------------------
-- Table `hr`.`user_financial_discounts`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`user_financial_discounts` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `emp_info_id` BIGINT NOT NULL,
  `financial_discounts_id` INT NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `ibk2_emp_id_info` (`emp_info_id` ASC) VISIBLE,
  INDEX `ibk3_financial_discount_id_idx` (`financial_discounts_id` ASC) VISIBLE,
  CONSTRAINT `ibk2_emp_id_info`
    FOREIGN KEY (`emp_info_id`)
    REFERENCES `hr`.`emp_information` (`user_hash`),
  CONSTRAINT `ibk4_financial_discount_id`
    FOREIGN KEY (`financial_discounts_id`)
    REFERENCES `hr`.`financial_discounts` (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 113
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`user_specifications`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`user_specifications` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `emp_info_id` BIGINT NOT NULL,
  `specification_id` INT NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `ibk1_emp_id_info` (`emp_info_id` ASC) VISIBLE,
  INDEX `ibk2_specifaction_id_idx` (`specification_id` ASC) VISIBLE,
  CONSTRAINT `ibk1_emp_id_info`
    FOREIGN KEY (`emp_info_id`)
    REFERENCES `hr`.`emp_information` (`user_hash`),
  CONSTRAINT `ibk2_specifaction_id`
    FOREIGN KEY (`specification_id`)
    REFERENCES `hr`.`specifications` (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 274
DEFAULT CHARACTER SET = utf8mb3;


-- -----------------------------------------------------
-- Table `hr`.`users_attachment`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`users_attachment` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `user_hash` BIGINT NULL DEFAULT NULL,
  `title_attachment` VARCHAR(255) NULL DEFAULT NULL,
  `attachment` VARCHAR(1000) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  `attachment_type` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 1155
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'المرفقات الخاصة بالموظفين';


-- -----------------------------------------------------
-- Table `hr`.`vacations`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`vacations` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `user_hash` BIGINT NOT NULL,
  `vication_type_hash` BIGINT NOT NULL,
  `duration_hour` INT NOT NULL,
  `duration_day` INT NOT NULL,
  `admin` BIGINT NULL DEFAULT NULL COMMENT 'أخر resiver',
  `status` BIGINT NULL DEFAULT '444',
  `date_start` DATETIME NOT NULL,
  `date_end` DATETIME NULL DEFAULT NULL,
  `note` TEXT NULL DEFAULT NULL,
  `datetime` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  `hash` BIGINT NULL DEFAULT NULL,
  `vication_owner_token` VARCHAR(1000) NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `hash_UNIQUE` (`hash` ASC) INVISIBLE,
  INDEX `index3` (`user_hash` ASC) INVISIBLE,
  INDEX `index5` (`vication_type_hash` ASC) VISIBLE,
  INDEX `index6` USING BTREE (`hash`) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 8549
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'الاجازات';


-- -----------------------------------------------------
-- Table `hr`.`vacations_agreement`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`vacations_agreement` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `vacations_hash` BIGINT NOT NULL,
  `sender` BIGINT NOT NULL,
  `receiver` BIGINT NOT NULL,
  `status` BIGINT NOT NULL,
  `note` TEXT NOT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  `flage` INT NULL DEFAULT '0',
  `date_entry` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `hash_UNIQUE` (`hash` ASC) INVISIBLE,
  INDEX `index3` USING BTREE (`vacations_hash`) VISIBLE,
  INDEX `index4` USING BTREE (`sender`) VISIBLE,
  INDEX `index5` USING BTREE (`status`) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 24977
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'موافقات الاجازة';


-- -----------------------------------------------------
-- Table `hr`.`vacations_status`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`vacations_status` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(100) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `hash_UNIQUE` (`hash` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 5
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'حالات الاجازة';


-- -----------------------------------------------------
-- Table `hr`.`vacations_type`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`vacations_type` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `type` VARCHAR(255) NOT NULL,
  `hour_day` VARCHAR(45) NULL DEFAULT NULL,
  `hash` BIGINT NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `hash_UNIQUE` (`hash` ASC) VISIBLE)
ENGINE = InnoDB
AUTO_INCREMENT = 8
DEFAULT CHARACTER SET = utf8mb3
COMMENT = 'انواع الاجازة';


-- -----------------------------------------------------
-- Table `hr`.`work_schedules`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `hr`.`work_schedules` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(50) NOT NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB
AUTO_INCREMENT = 5
DEFAULT CHARACTER SET = utf8mb3;

-- INsert values
;

INSERT INTO
    `system_users`
VALUES (
        271, 'admin', 'admin', 'admin3', 9876533, 1, 'http://account.native-code-iq.com/hr/app/uploads/user_image_profile/default.png', '2022-08-08 22:33:22', 'fLb31fJrR2e8SSESb71GmZ:APA91bEhz9fn8eq0AOAfvelaLQilHvExBRyw_Xb6hHKmo-pPjI213BR6ohtx_tbCLNu3W4NMUOL4BRRaFHesax0dtxiZm0vZYfUEGLNf7CpMGop_1h9o96vHzvA1WfA1sRLfwQmfsdcG', 1, 'iOS 17.2, iPhone 15 Pro Max iPhone', 16599872021296496, 1, 0
    );

;


;

INSERT INTO
    `PositionTypes`
VALUES (1, 'رئيس مجلس ادارة'),
    (2, 'عضو مجلس ادارة'),
    (3, 'مدير تنفيذي'),
    (4, 'قسم'),
    (5, 'شعبة'),
    (6, 'وحده');
;


--
-- Dumping data for table `accounting_tree`
--

;

INSERT INTO
    `accounting_tree`
VALUES (
        111271, 1628919638972876, 'مصاريف', 4321
    ),
    (
        111272, 4474456305815076, 'ايجار', 43211
    ),
    (
        111273, 5547849886182218, 'طعام', 43212
    ),
    (
        111274, 4832465155643911, 'نقل', 43213
    ),
    (
        111280, 9350157124379354, 'الشراب', 43214
    );
;


--
-- Dumping data for table `administrative_order_type`
--

;

INSERT INTO
    `administrative_order_type`
VALUES (
        1, 'كتاب شكر', 16591717838108690
    ),
    (
        2, 'مباشرة', 16591718023929457
    ),
    (
        3, 'انفكاك', 16591718148399759
    ),
    (4, 'ترقية', 16591718239457358),
    (5, 'عقوبة', 16591718318735509),
    (
        6, 'تعميم ', 16599468957570267
    ),
    (7, 'اقالة', 16610702165281322),
    (
        8, 'استلام ذمة', 16610702320336858
    ),
    (
        9, 'براءة ذمة', 1661070242690519
    ),
    (
        10, 'استقالة', 16610702803173106
    ),
    (
        11, 'تخويل', 16610703630167911
    ),
    (
        12, 'تأييد استمرار خدمة', 16610703925773726
    ),
    (
        13, 'تبليغ', 16610849975930554
    ),
    (
        15, 'انذار', 16658244433260953
    ),
    (
        16, 'انهاء خدمات', 1666431859316660
    ),
    (
        17, 'اسناد مهام', 16698118238493274
    ),
    (
        18, 'قرار اداري', 16867382025701689
    ),
    (20, 'غرامة', 6669257962954708),
    (
        21, 'محضر اجتماع', 4065973911911408
    );
;


--
-- Dumping data for table `advance_status`
--

;

INSERT INTO
    `advance_status`
VALUES (1, 'تمت الموافقة', 111),
    (2, 'رفض', 222),
    (3, 'موافق وتمرير', 333),
    (4, 'معلق', 444);
;


--
-- Dumping data for table `fingerprint_type`
--

;

INSERT INTO
    `fingerprint_type`
VALUES (1, 'دوام رسمي', 111),
    (2, 'ساعات اضافية', 222),
    (3, 'تعويض', 333),
    (4, 'واجب رسمي', 444),
    (5, 'زمينة', 5555);
;


--
-- Dumping data for table `inventory_items_types`
--

;

INSERT INTO
    `inventory_items_types`
VALUES (37, 'Laptop'),
    (38, 'phone '),
    (39, 'Tablet'),
    (40, 'Mouse'),
    (42, 'stamp'),
    (43, 'ٍSIM card '),
    (44, 'Badge card'),
    (45, 'قاصة'),
    (46, 'POS'),
    (47, 'DVD '),
    (48, 'DESKTOP'),
    (50, 'HARD SSD'),
    (52, 'GALAXYA03S'),
    (53, 'phone'),
    (54, 'Laptop'),
    (55, 'Camera'),
    (57, 'SIM'),
    (58, 'Hard HDD'),
    (59, 'Gimbal'),
    (60, 'car'),
    (61, 'Galaxy m31'),
    (62, 'ختم ');
;


--
-- Dumping data for table `others_specifications`
--

;

INSERT INTO
    `others_specifications`
VALUES (6, 'امين صندوق'),
    (7, 'صندوق'),
    (8, 'صندوق رئيسي'),
    (9, 'صندوق فرعي'),
    (10, 'نقل اموال'),
    (11, 'مشتريات'),
    (12, 'مبيت'),
    (14, 'مخزن صغير'),
    (15, 'مخزن متوسط'),
    (16, 'مخزن كبير'),
    (18, 'مخصصات نقل 1'),
    (19, 'مخصصات نقل 2'),
    (21, 'قسم صيانه'),
    (24, 'مسؤول موقع'),
    (25, 'مدير فرع'),
    (26, 'مسؤول مكتب');
;


--
-- Dumping data for table `pages`
--

;

INSERT INTO
    `pages`
VALUES (
        5, 'لوحه البيانات', '/today/global', 'الرئيسيه'
    ),
    (
        7, 'سجل الواجبات', '/today/tasks', 'السجل اليومي'
    ),
    (
        8, 'الهيكليه', '/employee/part', 'الموظفين'
    ),
    (
        9, 'الموظفين', '/employee/employees-list', 'الموظفين'
    ),
    (
        10, 'الصلاحيات', '/employee/permission', 'الموظفين'
    ),
    (
        11, 'طلب اجازة', '/services/leaves-admin', 'الخدمات الذاتيه'
    ),
    (
        14, 'طلب واجب', '/services/tasks', 'الخدمات الذاتيه'
    ),
    (
        15, 'ارسال اوامر ادارية', '/services/allOrders', 'الخدمات الذاتيه'
    ),
    (
        16, 'ارسال تعاميم', '/services/announce', 'الخدمات الذاتيه'
    ),
    (
        18, 'تقرير الحضور والانصراف', '/reports/attendance', 'التقارير'
    ),
    (
        19, 'تقرير المواقع', '/reports/check-in', 'التقارير'
    ),
    (
        21, 'التقرير المالي', '/reports/expense-reports', 'التقارير'
    ),
    (
        22, 'تقرير المخالفات الادارية', '/reports/another-phone-reports', 'التقارير'
    ),
    (
        24, 'الاجازات والعطل الرسمية', '/setting/holidays', 'الاعدادات'
    ),
    (
        25, 'المكاتب', '/setting/office', 'الاعدادات'
    ),
    (
        26, 'تصنيف الاوامر الادارية', '/setting/order-type', 'الاعدادات'
    ),
    (
        35, 'ملف الموظف الشخصي', '/profile/employee-profile', 'الموظفين'
    ),
    (
        43, 'لوحه المراقبه', '/today/tracking-map', 'الرئيسيه'
    ),
    (
        44, 'سجل الاجازات', '/today/vacations', 'السجل اليومي'
    ),
    (
        45, 'صفحات الموقع', '/setting/pages', 'الاعدادات'
    ),
    (
        47, 'تسجيل الدخول', '/login', 'الدخول'
    ),
    (
        50, 'سجل الحضور والانصراف', '/today/attendance-today', 'السجل اليومي'
    ),
    (
        55, 'العملاء', '/projects/clients', 'الاعدادات'
    ),
    (
        57, 'العميل', '/projects/client', 'الاعدادات'
    ),
    (
        62, 'تقرير الواجبات', '/reports/tasks', 'التقارير'
    ),
    (
        67, 'تقرير الاجازات', '/reports/leaves-admin', 'التقارير'
    ),
    (
        71, 'المتاخرين عن البصمة الصباحية', '/reports/late-reports', 'التقارير'
    ),
    (
        72, 'الاقتراحات والشكاوي', '/employee/suggestion', 'الخدمات الذاتيه'
    ),
    (
        73, 'شاشة المراقبة', '/today/today-report', 'الرئيسيه'
    ),
    (
        122, 'ذمم الموظفين', '/items/assignment', 'الذمم'
    ),
    (
        123, 'الموجودات الثابته', '/items/items', 'الذمم'
    ),
    (
        124, 'السلف', '/debit/index', 'السلف'
    ),
    (
        125, 'الاعدادات', '/setting/page', 'الاعدادات'
    ),
    (
        127, 'بناء مخصصات', '/specifaction/index', 'المخصصات'
    ),
    (
        131, 'انواع الموجودات', '/items/items-types', 'الذمم'
    ),
    (
        132, 'طلبات تسديد السلف', '/debit/reports', 'السلف'
    ),
    (
        134, 'اداره تسديدات السلف', '/debit/payment_request', 'السلف'
    ),
    (
        135, 'التسديدات', '/debit/payment_details', 'السلف'
    ),
    (
        136, 'التقرير', '/debit/payment_details_reports', 'السلف'
    ),
    (
        143, 'ابواب الصرف', '/accounting-tree/accounting-tree', 'السلف'
    ),
    (
        147, 'بناء استقطاع', '/FinancialDiscounts/index', 'المخصصات'
    ),
    (
        149, 'الكشف المالي', '/MoneyMangment/index', 'اداره الراتب'
    ),
    (
        150, 'مصداقه الكشف المالي', '/MoneyMangment/payroll', 'اداره الراتب'
    ),
    (
        157, '/app/profile/employee-profile', '/app/profile/employee-profile', NULL
    ),
    (
        158, '/profile/employee-profile/undefined', '/profile/employee-profile/undefined', NULL
    ),
    (
        159, '//projects/clients', '//projects/clients', NULL
    ),
    (
        160, '/projects/clients%D9%8A%D8%B4%D8%B3%D9%8A%D8%', '/projects/clients%D9%8A%D8%B4%D8%B3%D9%8A%D8%', NULL
    ),
    (
        161, '/projects/clients%D9%8A%D8%B4%D8%B3%D9%8A%D8%', '/projects/clients%D9%8A%D8%B4%D8%B3%D9%8A%D8%', NULL
    ),
    (
        162, '/projects/projects', '/projects/projects', NULL
    ),
    (
        163, 'المشاريع', '/projects/projects', 'السلف'
    ),
    (
        164, '/reports/today', '/reports/today', NULL
    ),
    (
        165, '/reports/today', '/reports/today', NULL
    ),
    (
        166, 'مخصصات اخري', '/specifaction/other', 'الاعدادات'
    ),
    (
        167, 'مخصصات منصب', '/specifaction/settings', 'الاعدادات'
    ),
    (
        168, '/employee/hr/login', '/employee/hr/login', NULL
    ),
    (169, '/app/', '/app/', NULL),
    (
        170, 'الكشف المالي للجميع ', '/MoneyMangment/employees', 'اداره الراتب'
    ),
    (
        171, '/MoneyMangment/hr/login', '/MoneyMangment/hr/login', NULL
    ),
    (
        172, 'المكافئات والعقوبات', '/MoneyMangment/rewards', 'اداره الراتب'
    ),
    (
        174, '/MoneyMangment/archieve', '/MoneyMangment/archieve', NULL
    ),
    (
        175, '/MoneyMangment/archieve/details', '/MoneyMangment/archieve/details', NULL
    ),
    (
        176, '/MoneyMangment/archieve/details/', '/MoneyMangment/archieve/details/', NULL
    ),
    (
        177, '/MoneyMangment/archieve/test', '/MoneyMangment/archieve/test', NULL
    ),
    (
        178, '/MoneyMangment/archieveDetails', '/MoneyMangment/archieveDetails', NULL
    ),
    (
        180, '/MoneyMangment/archieveDetails/', '/MoneyMangment/archieveDetails/', NULL
    ),
    (
        181, '/MoneyMangment/global', '/MoneyMangment/global', NULL
    ),
    (
        182, '/MoneyMangment/archievePaymentDetails', '/MoneyMangment/archievePaymentDetails', 'اداره الراتب'
    ),
    (
        183, '/MoneyMangment/archieve/archieve/PaymentDetai', '/MoneyMangment/archieve/archieve/PaymentDetai', NULL
    ),
    (
        184, '/MoneyMangment/archieve/PaymentDetails', '/MoneyMangment/archieve/PaymentDetails', NULL
    ),
    (
        185, '/MoneyMangment/PaymentDetails', '/MoneyMangment/PaymentDetails', NULL
    ),
    (
        186, '/MoneyMangment/archievearchievePaymentDetails', '/MoneyMangment/archievearchievePaymentDetails', NULL
    ),
    (
        187, '/MoneyMangment/archieve/archievePaymentDetail', '/MoneyMangment/archieve/archievePaymentDetail', NULL
    ),
    (
        188, '/MoneyMangment/archieve/archievePaymentDetail', '/MoneyMangment/archieve/archievePaymentDetail', NULL
    ),
    (
        189, '/MoneyMangment/archieve/archievePaymentDetail', '/MoneyMangment/archieve/archievePaymentDetail', NULL
    ),
    (
        190, '/MoneyMangment/archieve/archievePaymentDetail', '/MoneyMangment/archieve/archievePaymentDetail', NULL
    ),
    (
        191, '/MoneyMangment/archieve/archievePaymentDetail', '/MoneyMangment/archieve/archievePaymentDetail', NULL
    ),
    (
        192, '/MoneyMangment/archieve/archievePaymentDetail', '/MoneyMangment/archieve/archievePaymentDetail', NULL
    ),
    (
        193, '/app/uploads/board-361516_640test5487.jpg', '/app/uploads/board-361516_640test5487.jpg', NULL
    ),
    (
        194, '/app/uploads/b', '/app/uploads/b', NULL
    ),
    (
        195, '/app/uploads/m', '/app/uploads/m', NULL
    );
;


--
-- Dumping data for table `partments`
--

;

INSERT INTO
    `partments`
VALUES (
        1, 'قسم الموارد البشرية', 16598931804515596
    ),
    (
        4, 'قسم المالية', 16598988503267880
    ),
    (
        5, 'قسم المبيعات', 16598988605632878
    ),
    (
        6, 'قسم الصيانة ', 16598988711451537
    ),
    (
        8, 'فرع البصرة', 16598989976920637
    ),
    (
        9, 'فرع كردستان', 1659899007204024
    ),
    (
        10, 'فرع سليمانية', 16598990176215105
    ),
    (
        11, 'المختبر الطبي الموحد', 16598990304368286
    ),
    (
        12, 'قسم الاعلام', 16599464406300583
    ),
    (
        13, 'قسم الاستيراد', 1659946621845681
    ),
    (
        14, 'قسم السونارات', 16599466458680836
    ),
    (
        15, 'محل البلسم الشافي', 16599466685913527
    ),
    (
        16, 'محل الطبيات', 16599466806614415
    ),
    (
        17, 'محل الوزيرية', 16599467022269933
    ),
    (
        20, 'قسم الخدمات', 16612508188929987
    ),
    (
        21, 'قسم اللوجستية', 16612579411269419
    ),
    (
        22, 'الأدارة', 16671347894098376
    ),
    (
        23, 'قسم العمليات', 16697200655272875
    ),
    (
        24, 'مخزن الوزيرية', 16697200753222514
    ),
    (
        25, 'قسم التسويق', 1686726003480345
    );
;


--
-- Dumping data for table `penalties_rewards_types`
--

;

INSERT INTO
    `penalties_rewards_types`
VALUES (2, 'عقوبه'),
    (1, 'مكافئه');
;


--
-- Dumping data for table `positions_other`
--

;

INSERT INTO
    `positions_other`
VALUES (10, 'مدير تنفيذي'),
    (11, 'مدير قسم '),
    (12, 'مسؤول شعبة'),
    (13, 'مسؤول وحده'),
    (22, 'موظف');
;


--
-- Dumping data for table `qualifications`
--

;

INSERT INTO
    `qualifications`
VALUES (1, 'ابتدائيه'),
    (2, 'متوسطه'),
    (3, 'اعدادي'),
    (4, 'بكالوريوس'),
    (5, 'ماجستير'),
    (6, 'دكتوراه'),
    (7, 'دبلوم'),
    (8, 'دبلوم عالي'),
    (9, 'بدون موهلات');
;


--
-- Dumping data for table `salary_types`
--

;

INSERT INTO `salary_types` VALUES (1, 'سلم'), (2, 'مقطوع');
;


--
-- Dumping data for table `specifications_types`
--

;

INSERT INTO
    `specifications_types`
VALUES (1, 'شهاده', 'qualifications'),
    (2, 'منصب', 'positions_other'),
    (
        3, 'اخرى', 'others_specifications'
    );
;


--
-- Dumping data for table `system_users_type`
--

;

INSERT INTO
    `system_users_type`
VALUES (
        7, 'admin', '123455', '2022-07-13 11:18:05'
    ),
    (
        8, 'superviser', '22233343', '2022-07-13 11:18:05'
    ),
    (
        9, 'employ', '7776454', '2022-07-13 11:18:06'
    );
;


--
-- Dumping data for table `task_status`
--

;

INSERT INTO
    `task_status`
VALUES (1, 'معلق', 111),
    (2, 'منجز', 222),
    (3, 'غير منجز', 333),
    (
        5, 'جاري العمل', 1660547175234184
    );
;


--
-- Dumping data for table `vacations_status`
--

;

INSERT INTO
    `vacations_status`
VALUES (1, 'تمت الموافقة', 111),
    (2, 'رفض', 222),
    (3, 'موافق وتمرير', 333),
    (4, 'معلق', 444);
;


--
-- Dumping data for table `vacations_type`
--

;

INSERT INTO
    `vacations_type`
VALUES (1, 'اجازة مرضية', 'يوم', 111),
    (
        2, 'اجازة اعتيادية', 'يوم', 222
    ),
    (3, 'زمنية ', 'ساعة', 333),
    (4, 'واجب', 'ساعة', 444),
    (
        5, 'اجازة بدون راتب', 'يوم', 555
    );
;


--
-- Dumping data for table `work_schedules`
--

;

INSERT INTO
    `work_schedules`
VALUES (1, 'دوام كامل'),
    (2, 'دوام جزئي'),
    (3, 'يعمل بنسبة'),
    (4, 'دوام مزدوج');
;

;





--
-- Host: account.native-code-iq.com    Database: hr
-- ------------------------------------------------------

--
-- Dumping data for table `PositionTypes`
--