<?php defined('BASEPATH') or exit('No direct script access allowed');

if (!function_exists('init_hr_database_tables')) {
  /**
   * Init installation tables creation in database
   */
  function init_hr_database_tables()
  {
    $CI = &get_instance();

  }
}


if (!function_exists('init_hr_install_sequence')) {
  /**
   * Initialize tables content example data for email templates and sms in database
   */
  function init_hr_install_sequence()
  {
    init_hr_database_tables();
  }
}

if (!function_exists('init_hr_desinstall_sequence')) {
  /**
   * Initialize tables content example data for email templates and sms in database
   */
  function init_hr_desinstall_sequence()
  {
    $CI = &get_instance();

    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_employees");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_travel_modes");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_travel_types");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_travels");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_transfers");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_resignations");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_complaints");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_warnings");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_end_contracts");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_end_contract_types");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_promotions");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_shifts");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_shift_days");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_holidays");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_departments");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_awards");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_award_types");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_locations");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_documents");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_document_categories");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_document_types");
    $CI->db->query("DROP TABLE IF EXISTS ".db_prefix() . "hr_checkins");

  }
}
