-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 03, 2025 at 12:27 PM
-- Server version: 10.5.28-MariaDB-cll-lve
-- PHP Version: 8.3.20

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `gasd3326_sdm`
--

-- --------------------------------------------------------

--
-- Table structure for table `ez_activity_log`
--

CREATE TABLE `ez_activity_log` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `text` text NOT NULL,
  `ip_address` varchar(64) NOT NULL,
  `user_agent` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_applications`
--

CREATE TABLE `ez_applications` (
  `id` int(11) NOT NULL,
  `job_id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `name` varchar(200) NOT NULL,
  `email` varchar(100) NOT NULL,
  `contact_number` varchar(100) NOT NULL,
  `address` text DEFAULT NULL,
  `app_description` text NOT NULL,
  `status` enum('save_for_later','reject','select','unread') NOT NULL DEFAULT 'unread',
  `resume` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_assigned_awards`
--

CREATE TABLE `ez_assigned_awards` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `award_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_assigned_roles`
--

CREATE TABLE `ez_assigned_roles` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_assigned_tasks`
--

CREATE TABLE `ez_assigned_tasks` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `task_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_attachments`
--

CREATE TABLE `ez_attachments` (
  `id` int(11) NOT NULL,
  `attachment_title` varchar(100) NOT NULL,
  `attachment_description` text NOT NULL,
  `task_id` int(11) NOT NULL,
  `attachment_username` varchar(100) NOT NULL,
  `file` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_awards`
--

CREATE TABLE `ez_awards` (
  `id` int(11) NOT NULL,
  `award_type_id` int(11) NOT NULL,
  `gift` varchar(100) DEFAULT NULL,
  `cash` int(10) DEFAULT NULL,
  `month` varchar(100) NOT NULL,
  `year` year(4) NOT NULL,
  `award_description` text NOT NULL,
  `award_date` date NOT NULL,
  `created_at` tinytext NOT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_award_types`
--

CREATE TABLE `ez_award_types` (
  `id` int(11) NOT NULL,
  `award_name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_bank_accounts`
--

CREATE TABLE `ez_bank_accounts` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `bank_name` varchar(100) NOT NULL,
  `account_name` varchar(100) NOT NULL,
  `account_number` varchar(100) NOT NULL,
  `ifsc_code` varchar(100) NOT NULL,
  `bank_branch` varchar(100) DEFAULT NULL,
  `created_at` tinytext NOT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_clock`
--

CREATE TABLE `ez_clock` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `clock_in` datetime NOT NULL,
  `clock_out` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_comments`
--

CREATE TABLE `ez_comments` (
  `id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `comment` text NOT NULL,
  `comment_username` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_config`
--

CREATE TABLE `ez_config` (
  `id` int(11) NOT NULL,
  `company_name` varchar(200) NOT NULL,
  `contact_person` varchar(100) NOT NULL,
  `address` text NOT NULL,
  `city` varchar(100) NOT NULL,
  `state` varchar(100) NOT NULL,
  `zipcode` varchar(10) NOT NULL,
  `country_id` int(11) DEFAULT NULL,
  `email` varchar(100) NOT NULL,
  `phone` varchar(20) NOT NULL,
  `company_logo` varchar(100) DEFAULT NULL,
  `timezone_id` varchar(10) DEFAULT NULL,
  `default_currency` varchar(20) NOT NULL,
  `default_currency_symbol` varchar(100) NOT NULL,
  `default_language` varchar(10) NOT NULL,
  `direction` enum('ltr','rtl') NOT NULL,
  `allowed_upload_file` text NOT NULL,
  `allowed_upload_max_size` int(11) DEFAULT NULL,
  `employee_notification` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_departments`
--

CREATE TABLE `ez_departments` (
  `id` int(11) NOT NULL,
  `department_name` varchar(200) NOT NULL,
  `department_description` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_designations`
--

CREATE TABLE `ez_designations` (
  `id` int(11) NOT NULL,
  `department_id` int(11) NOT NULL,
  `designation` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_documents`
--

CREATE TABLE `ez_documents` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `document_type` enum('offer letter','appointment letter','code of conduct','id proof','address proof','salary certificate') NOT NULL,
  `document_title` varchar(500) NOT NULL,
  `document_description` text NOT NULL,
  `document` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_expenses`
--

CREATE TABLE `ez_expenses` (
  `id` int(11) NOT NULL,
  `expense_head_id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `amount` int(11) NOT NULL,
  `expense_date` date NOT NULL,
  `remarks` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_expense_heads`
--

CREATE TABLE `ez_expense_heads` (
  `id` int(11) NOT NULL,
  `expense_head` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_holidays`
--

CREATE TABLE `ez_holidays` (
  `id` int(11) NOT NULL,
  `date` date NOT NULL,
  `holiday_description` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_jobs`
--

CREATE TABLE `ez_jobs` (
  `id` int(11) NOT NULL,
  `job_title` varchar(200) NOT NULL,
  `designation_id` int(11) NOT NULL,
  `numbers` int(11) NOT NULL,
  `job_description` text DEFAULT NULL,
  `status` enum('open','closed') NOT NULL DEFAULT 'open',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_leaves`
--

CREATE TABLE `ez_leaves` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `leave_type_id` int(11) NOT NULL,
  `from_date` date NOT NULL,
  `to_date` date NOT NULL,
  `leave_description` text NOT NULL,
  `leave_status` enum('pending','approved','rejected') NOT NULL,
  `leave_comment` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_leave_types`
--

CREATE TABLE `ez_leave_types` (
  `id` int(11) NOT NULL,
  `leave_name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_messages`
--

CREATE TABLE `ez_messages` (
  `id` int(11) NOT NULL,
  `from_user_id` int(10) UNSIGNED NOT NULL,
  `to_user_id` int(10) UNSIGNED NOT NULL,
  `subject` varchar(1000) NOT NULL,
  `content` text NOT NULL,
  `read` int(11) NOT NULL,
  `attachment` varchar(100) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_notes`
--

CREATE TABLE `ez_notes` (
  `id` int(11) NOT NULL,
  `task_id` int(11) NOT NULL,
  `note_content` text NOT NULL,
  `note_username` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_notice`
--

CREATE TABLE `ez_notice` (
  `id` int(11) NOT NULL,
  `title` varchar(1000) NOT NULL,
  `content` text NOT NULL,
  `from_date` date NOT NULL,
  `to_date` date NOT NULL,
  `username` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_notice_designation`
--

CREATE TABLE `ez_notice_designation` (
  `id` int(11) NOT NULL,
  `notice_id` int(11) NOT NULL,
  `designation_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_password_reminders`
--

CREATE TABLE `ez_password_reminders` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_payroll`
--

CREATE TABLE `ez_payroll` (
  `id` int(11) NOT NULL,
  `payroll_slip_id` int(11) NOT NULL,
  `salary_type_id` int(11) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_payroll_slip`
--

CREATE TABLE `ez_payroll_slip` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `month` varchar(2) NOT NULL,
  `year` varchar(4) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_permissions`
--

CREATE TABLE `ez_permissions` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `display_name` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `ez_permissions`
--

INSERT INTO `ez_permissions` (`id`, `name`, `display_name`, `created_at`, `updated_at`) VALUES
(1, 'manage_department', 'Manage Department', '2015-08-28 03:38:03', '2015-08-28 03:38:03'),
(2, 'create_department', 'Create Department', '2015-08-28 03:38:51', '2015-08-28 03:38:51'),
(3, 'edit_department', 'Edit Department', '2015-08-28 03:38:57', '2015-08-28 03:38:57'),
(4, 'delete_department', 'Delete Department', '2015-08-28 12:56:54', '2015-08-28 12:56:54'),
(5, 'manage_designation', 'Manage Designation', '2015-08-28 12:49:51', NULL),
(6, 'create_designation', 'Create Designation', '2015-08-28 12:49:51', NULL),
(7, 'edit_designation', 'Edit Designation', '2015-08-28 12:51:20', NULL),
(8, 'delete_designation', 'Delete Designation', '2015-08-28 12:51:20', NULL),
(9, 'manage_employee', 'Manage Employee', '2015-08-28 13:38:41', NULL),
(10, 'create_employee', 'Create Employee', '2015-08-28 13:38:41', NULL),
(11, 'edit_employee', 'Edit Employee', '2015-08-28 13:39:00', NULL),
(12, 'delete_employee', 'Delete Employee', '2015-08-28 13:39:00', NULL),
(13, 'profile_update_employee', 'Profile Update Employee', '2015-08-28 13:41:16', NULL),
(14, 'view_employee', 'View Employee', '2015-08-28 13:41:16', NULL),
(15, 'manage_job', 'Manage Job', '2015-08-28 13:42:18', NULL),
(16, 'create_job', 'Create Job', '2015-08-28 13:42:18', NULL),
(17, 'edit_job', 'Edit Job', '2015-08-28 13:42:36', NULL),
(18, 'delete_job', 'Delete Job', '2015-08-28 13:42:36', NULL),
(19, 'view_job', 'View Job', '2015-08-28 13:46:14', NULL),
(20, 'view_job_application', 'View Job Application', '2015-08-28 13:46:14', NULL),
(21, 'edit_job_application', 'Edit Job Application', '2015-08-28 13:46:41', NULL),
(22, 'apply_job', 'Apply Job', '2015-08-28 13:46:41', NULL),
(23, 'delete_job_application', 'Delete Job Application', '2015-08-28 13:47:21', NULL),
(24, 'manage_expense', 'Manage Expense', '2015-08-28 13:56:49', NULL),
(25, 'create_expense', 'Create Expense', '2015-08-28 13:56:49', NULL),
(26, 'edit_expense', 'Edit Expense', '2015-08-28 13:57:05', NULL),
(27, 'delete_expense', 'Delete Expense', '2015-08-28 13:57:05', NULL),
(28, 'manage_holiday', 'Manage Holiday', '2015-08-28 14:12:59', NULL),
(29, 'create_holiday', 'Create Holiday', '2015-08-28 14:12:59', NULL),
(30, 'edit_holiday', 'Edit Holiday', '2015-08-28 14:13:15', NULL),
(31, 'delete_holiday', 'Delete Holiday', '2015-08-28 14:13:15', NULL),
(32, 'update_attendance', 'Update Attendance', '2015-08-28 14:40:18', NULL),
(33, 'daily_attendance', 'Daily Attendance', '2015-08-28 14:40:18', NULL),
(34, 'upload_attendance', 'Upload Attendance', '2015-08-28 14:44:07', NULL),
(35, 'manage_leave', 'Manage leave', '2015-08-28 14:51:12', NULL),
(36, 'view_leave', 'View Leave', '2015-08-28 14:51:12', NULL),
(37, 'create_leave', 'Create Leave', '2015-08-28 14:51:45', NULL),
(38, 'edit_leave', 'Edit Leave', '2015-08-28 14:51:45', NULL),
(39, 'edit_leave_status', 'Edit Leave Status', '2015-08-28 14:52:08', NULL),
(40, 'delete_leave', 'Delete Leave', '2015-08-28 14:52:08', NULL),
(41, 'manage_payroll', 'Manage Payroll', '2015-08-28 14:54:03', NULL),
(42, 'create_payroll', 'Create Payroll', '2015-08-28 14:54:03', NULL),
(43, 'generate_payroll', 'Generate Payroll', '2015-08-28 14:54:13', NULL),
(44, 'manage_ticket', 'Manage Ticket', '2015-08-28 14:56:18', NULL),
(45, 'view_ticket', 'View Ticket', '2015-08-28 14:56:18', NULL),
(46, 'update_status_ticket', 'Update Status Ticket', '2015-08-28 14:56:39', NULL),
(47, 'create_ticket', 'Create Ticket', '2015-08-28 14:56:39', NULL),
(48, 'edit_ticket', 'Edit Ticket', '2015-08-28 14:56:57', NULL),
(49, 'delete_ticket', 'Delete Ticket', '2015-08-28 14:56:57', NULL),
(50, 'manage_task', 'Manage Task', '2015-08-28 14:59:27', NULL),
(51, 'update_progress_task', 'Update Progress Task', '2015-08-28 14:59:27', NULL),
(52, 'view_task', 'View Task', '2015-08-28 14:59:45', NULL),
(53, 'create_task', 'Create Task', '2015-08-28 14:59:45', NULL),
(54, 'edit_task', 'Edit Task', '2015-08-28 14:59:59', NULL),
(55, 'delete_task', 'Delete Task', '2015-08-28 14:59:59', NULL),
(56, 'manage_message', 'Manage Message', '2015-08-28 15:00:41', NULL),
(57, 'manage_sms', 'Manage SMS', '2015-08-28 15:03:18', NULL),
(58, 'manage_template', 'Manage Template', '2015-08-28 15:03:18', NULL),
(59, 'send_template', 'Send Template', '2015-08-28 15:05:05', NULL),
(60, 'manage_language', 'Manage Language', '2015-08-28 15:06:52', NULL),
(61, 'set_language', 'Set Language', '2015-08-28 15:06:52', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `ez_permission_role`
--

CREATE TABLE `ez_permission_role` (
  `id` int(10) UNSIGNED NOT NULL,
  `permission_id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_profile`
--

CREATE TABLE `ez_profile` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `employee_code` varchar(100) NOT NULL,
  `date_of_birth` date DEFAULT NULL,
  `father_name` varchar(100) NOT NULL,
  `mother_name` varchar(100) NOT NULL,
  `date_of_joining` date DEFAULT NULL,
  `date_of_leaving` date DEFAULT NULL,
  `contact_number` varchar(20) NOT NULL,
  `alternate_contact_number` varchar(20) NOT NULL,
  `alternate_email` varchar(100) NOT NULL,
  `present_address` text NOT NULL,
  `permanent_address` text NOT NULL,
  `photo` varchar(100) DEFAULT NULL,
  `facebook_link` text NOT NULL,
  `twitter_link` text NOT NULL,
  `blogger_link` text NOT NULL,
  `linkedin_link` text NOT NULL,
  `googleplus_link` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_roles`
--

CREATE TABLE `ez_roles` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `display_name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_salary`
--

CREATE TABLE `ez_salary` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `salary_type_id` int(11) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_salary_types`
--

CREATE TABLE `ez_salary_types` (
  `id` int(11) NOT NULL,
  `salary_head` varchar(100) NOT NULL,
  `salary_type` enum('earning','deduction') NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_tasks`
--

CREATE TABLE `ez_tasks` (
  `id` int(11) NOT NULL,
  `task_title` varchar(500) NOT NULL,
  `task_description` text NOT NULL,
  `start_date` date NOT NULL,
  `due_date` date NOT NULL,
  `hours` varchar(10) DEFAULT NULL,
  `task_progress` int(11) NOT NULL,
  `task_username` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_templates`
--

CREATE TABLE `ez_templates` (
  `id` int(11) NOT NULL,
  `template_name` varchar(500) NOT NULL,
  `template_description` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `ez_templates`
--

INSERT INTO `ez_templates` (`id`, `template_name`, `template_description`, `created_at`, `updated_at`) VALUES
(1, 'New Employer Welcome Message', '<p>Hello [NAME],</p><p>We welcome you at WM Lab.</p><p><span style=\"font-weight: bold;\">Regards</span></p><p><span style=\"font-weight: bold;\">Administrator,</span></p><p><span style=\"font-weight: bold;\">WM Lab</span></p>', '2015-07-21 10:35:56', '2015-07-22 08:50:24'),
(2, 'Employee Salary Payment', '<p><br></p>', '2015-07-21 11:02:35', '2015-07-22 08:49:51');

-- --------------------------------------------------------

--
-- Table structure for table `ez_tickets`
--

CREATE TABLE `ez_tickets` (
  `id` int(11) NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `ticket_subject` varchar(500) NOT NULL,
  `ticket_description` text DEFAULT NULL,
  `ticket_priority` enum('low','medium','high','critical') NOT NULL,
  `ticket_status` enum('open','closed') NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_ticket_attachments`
--

CREATE TABLE `ez_ticket_attachments` (
  `id` int(11) NOT NULL,
  `attachment_title` varchar(100) NOT NULL,
  `attachment_description` text NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `attachment_username` varchar(100) NOT NULL,
  `file` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_ticket_comments`
--

CREATE TABLE `ez_ticket_comments` (
  `id` int(11) NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `comment` text NOT NULL,
  `comment_username` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_ticket_notes`
--

CREATE TABLE `ez_ticket_notes` (
  `id` int(11) NOT NULL,
  `ticket_id` int(11) NOT NULL,
  `note_content` text NOT NULL,
  `note_username` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ez_users`
--

CREATE TABLE `ez_users` (
  `id` int(10) UNSIGNED NOT NULL,
  `first_name` varchar(100) NOT NULL,
  `last_name` varchar(100) NOT NULL,
  `designation_id` int(11) NOT NULL,
  `username` varchar(100) NOT NULL,
  `email` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `confirmation_code` varchar(255) NOT NULL,
  `remember_token` varchar(255) DEFAULT NULL,
  `confirmed` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_activity` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `ez_activity_log`
--
ALTER TABLE `ez_activity_log`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ez_applications`
--
ALTER TABLE `ez_applications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `job_id` (`job_id`),
  ADD KEY `username` (`user_id`);

--
-- Indexes for table `ez_assigned_awards`
--
ALTER TABLE `ez_assigned_awards`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`,`award_id`),
  ADD KEY `award_id` (`award_id`);

--
-- Indexes for table `ez_assigned_roles`
--
ALTER TABLE `ez_assigned_roles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `assigned_roles_user_id_foreign` (`user_id`),
  ADD KEY `assigned_roles_role_id_foreign` (`role_id`);

--
-- Indexes for table `ez_assigned_tasks`
--
ALTER TABLE `ez_assigned_tasks`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_id` (`user_id`,`task_id`),
  ADD KEY `task_id` (`task_id`);

--
-- Indexes for table `ez_attachments`
--
ALTER TABLE `ez_attachments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `attachment_username` (`attachment_username`),
  ADD KEY `task_id` (`task_id`);

--
-- Indexes for table `ez_awards`
--
ALTER TABLE `ez_awards`
  ADD PRIMARY KEY (`id`),
  ADD KEY `award_type_id` (`award_type_id`);

--
-- Indexes for table `ez_award_types`
--
ALTER TABLE `ez_award_types`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ez_bank_accounts`
--
ALTER TABLE `ez_bank_accounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `ez_clock`
--
ALTER TABLE `ez_clock`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `ez_comments`
--
ALTER TABLE `ez_comments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `task_id` (`task_id`),
  ADD KEY `comment_username` (`comment_username`);

--
-- Indexes for table `ez_config`
--
ALTER TABLE `ez_config`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ez_departments`
--
ALTER TABLE `ez_departments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ez_designations`
--
ALTER TABLE `ez_designations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `department_id` (`department_id`);

--
-- Indexes for table `ez_documents`
--
ALTER TABLE `ez_documents`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `ez_expenses`
--
ALTER TABLE `ez_expenses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `expense_head_id` (`expense_head_id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `ez_expense_heads`
--
ALTER TABLE `ez_expense_heads`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ez_holidays`
--
ALTER TABLE `ez_holidays`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `date` (`date`);

--
-- Indexes for table `ez_jobs`
--
ALTER TABLE `ez_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `designation_id` (`designation_id`);

--
-- Indexes for table `ez_leaves`
--
ALTER TABLE `ez_leaves`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`,`leave_type_id`),
  ADD KEY `leaves_leave_type_id_foreign` (`leave_type_id`);

--
-- Indexes for table `ez_leave_types`
--
ALTER TABLE `ez_leave_types`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ez_messages`
--
ALTER TABLE `ez_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `from_user_id` (`from_user_id`,`to_user_id`),
  ADD KEY `to_user_id` (`to_user_id`);

--
-- Indexes for table `ez_notes`
--
ALTER TABLE `ez_notes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `unique_id` (`task_id`),
  ADD KEY `username` (`note_username`);

--
-- Indexes for table `ez_notice`
--
ALTER TABLE `ez_notice`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ez_notice_designation`
--
ALTER TABLE `ez_notice_designation`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notice_id` (`notice_id`),
  ADD KEY `designation_id` (`designation_id`);

--
-- Indexes for table `ez_payroll`
--
ALTER TABLE `ez_payroll`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`salary_type_id`),
  ADD KEY `salary_type_id` (`salary_type_id`),
  ADD KEY `payroll_slip_id` (`payroll_slip_id`);

--
-- Indexes for table `ez_payroll_slip`
--
ALTER TABLE `ez_payroll_slip`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `ez_permissions`
--
ALTER TABLE `ez_permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_unique` (`name`);

--
-- Indexes for table `ez_permission_role`
--
ALTER TABLE `ez_permission_role`
  ADD PRIMARY KEY (`id`),
  ADD KEY `permission_role_permission_id_foreign` (`permission_id`),
  ADD KEY `permission_role_role_id_foreign` (`role_id`);

--
-- Indexes for table `ez_profile`
--
ALTER TABLE `ez_profile`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `ez_roles`
--
ALTER TABLE `ez_roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_unique` (`name`);

--
-- Indexes for table `ez_salary`
--
ALTER TABLE `ez_salary`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `salary_type_id` (`salary_type_id`);

--
-- Indexes for table `ez_salary_types`
--
ALTER TABLE `ez_salary_types`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `salary_head` (`salary_head`);

--
-- Indexes for table `ez_tasks`
--
ALTER TABLE `ez_tasks`
  ADD PRIMARY KEY (`id`),
  ADD KEY `task_username` (`task_username`);

--
-- Indexes for table `ez_templates`
--
ALTER TABLE `ez_templates`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ez_tickets`
--
ALTER TABLE `ez_tickets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `ez_ticket_attachments`
--
ALTER TABLE `ez_ticket_attachments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `attachment_username` (`attachment_username`),
  ADD KEY `ticket_id` (`ticket_id`);

--
-- Indexes for table `ez_ticket_comments`
--
ALTER TABLE `ez_ticket_comments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ticket_id` (`ticket_id`),
  ADD KEY `comment_username` (`comment_username`);

--
-- Indexes for table `ez_ticket_notes`
--
ALTER TABLE `ez_ticket_notes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ticket_id` (`ticket_id`),
  ADD KEY `username` (`note_username`);

--
-- Indexes for table `ez_users`
--
ALTER TABLE `ez_users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD UNIQUE KEY `username` (`username`),
  ADD KEY `designation_id` (`designation_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `ez_activity_log`
--
ALTER TABLE `ez_activity_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_applications`
--
ALTER TABLE `ez_applications`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_assigned_awards`
--
ALTER TABLE `ez_assigned_awards`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_assigned_roles`
--
ALTER TABLE `ez_assigned_roles`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_assigned_tasks`
--
ALTER TABLE `ez_assigned_tasks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_attachments`
--
ALTER TABLE `ez_attachments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_awards`
--
ALTER TABLE `ez_awards`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_award_types`
--
ALTER TABLE `ez_award_types`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_bank_accounts`
--
ALTER TABLE `ez_bank_accounts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_clock`
--
ALTER TABLE `ez_clock`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_comments`
--
ALTER TABLE `ez_comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_config`
--
ALTER TABLE `ez_config`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_departments`
--
ALTER TABLE `ez_departments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_designations`
--
ALTER TABLE `ez_designations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_documents`
--
ALTER TABLE `ez_documents`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_expenses`
--
ALTER TABLE `ez_expenses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_expense_heads`
--
ALTER TABLE `ez_expense_heads`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_holidays`
--
ALTER TABLE `ez_holidays`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_jobs`
--
ALTER TABLE `ez_jobs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_leaves`
--
ALTER TABLE `ez_leaves`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_leave_types`
--
ALTER TABLE `ez_leave_types`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_messages`
--
ALTER TABLE `ez_messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_notes`
--
ALTER TABLE `ez_notes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_notice`
--
ALTER TABLE `ez_notice`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_notice_designation`
--
ALTER TABLE `ez_notice_designation`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_payroll`
--
ALTER TABLE `ez_payroll`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_payroll_slip`
--
ALTER TABLE `ez_payroll_slip`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_permissions`
--
ALTER TABLE `ez_permissions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=62;

--
-- AUTO_INCREMENT for table `ez_permission_role`
--
ALTER TABLE `ez_permission_role`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_profile`
--
ALTER TABLE `ez_profile`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_roles`
--
ALTER TABLE `ez_roles`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_salary`
--
ALTER TABLE `ez_salary`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_salary_types`
--
ALTER TABLE `ez_salary_types`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_tasks`
--
ALTER TABLE `ez_tasks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_templates`
--
ALTER TABLE `ez_templates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `ez_tickets`
--
ALTER TABLE `ez_tickets`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_ticket_attachments`
--
ALTER TABLE `ez_ticket_attachments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_ticket_comments`
--
ALTER TABLE `ez_ticket_comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_ticket_notes`
--
ALTER TABLE `ez_ticket_notes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ez_users`
--
ALTER TABLE `ez_users`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `ez_applications`
--
ALTER TABLE `ez_applications`
  ADD CONSTRAINT `applications_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `job_applications_job_id_foreign` FOREIGN KEY (`job_id`) REFERENCES `ez_jobs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_assigned_awards`
--
ALTER TABLE `ez_assigned_awards`
  ADD CONSTRAINT `assigned_awards_award_id_foreign` FOREIGN KEY (`award_id`) REFERENCES `ez_awards` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `assigned_awards_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_assigned_roles`
--
ALTER TABLE `ez_assigned_roles`
  ADD CONSTRAINT `assigned_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `ez_roles` (`id`),
  ADD CONSTRAINT `assigned_roles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_assigned_tasks`
--
ALTER TABLE `ez_assigned_tasks`
  ADD CONSTRAINT `assigned_tasks_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `ez_tasks` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `assigned_tasks_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_attachments`
--
ALTER TABLE `ez_attachments`
  ADD CONSTRAINT `attachments_attachment_username_foreign` FOREIGN KEY (`attachment_username`) REFERENCES `ez_users` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `attachments_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `ez_tasks` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_awards`
--
ALTER TABLE `ez_awards`
  ADD CONSTRAINT `award_types_award_type_id_foreign` FOREIGN KEY (`award_type_id`) REFERENCES `ez_award_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_bank_accounts`
--
ALTER TABLE `ez_bank_accounts`
  ADD CONSTRAINT `bank_accounts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_comments`
--
ALTER TABLE `ez_comments`
  ADD CONSTRAINT `comment_comment_username_foreign` FOREIGN KEY (`comment_username`) REFERENCES `ez_users` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `comment_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `ez_tasks` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_designations`
--
ALTER TABLE `ez_designations`
  ADD CONSTRAINT `designations_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `ez_departments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_documents`
--
ALTER TABLE `ez_documents`
  ADD CONSTRAINT `documents_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_expenses`
--
ALTER TABLE `ez_expenses`
  ADD CONSTRAINT `expenses_expense_head_id_foreign` FOREIGN KEY (`expense_head_id`) REFERENCES `ez_expense_heads` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `expenses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_jobs`
--
ALTER TABLE `ez_jobs`
  ADD CONSTRAINT `jobs_designation_id_foreign` FOREIGN KEY (`designation_id`) REFERENCES `ez_designations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_leaves`
--
ALTER TABLE `ez_leaves`
  ADD CONSTRAINT `leaves_leave_type_id_foreign` FOREIGN KEY (`leave_type_id`) REFERENCES `ez_leave_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `leaves_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_messages`
--
ALTER TABLE `ez_messages`
  ADD CONSTRAINT `messages_from_user_id_foreign` FOREIGN KEY (`from_user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `messages_to_user_id_foreign` FOREIGN KEY (`to_user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_notes`
--
ALTER TABLE `ez_notes`
  ADD CONSTRAINT `notes_note_username_foreign` FOREIGN KEY (`note_username`) REFERENCES `ez_users` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `notes_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `ez_tasks` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_notice_designation`
--
ALTER TABLE `ez_notice_designation`
  ADD CONSTRAINT `notice_designation_designation_id_foreign` FOREIGN KEY (`designation_id`) REFERENCES `ez_designations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `notice_designation_notice_id_foreign` FOREIGN KEY (`notice_id`) REFERENCES `ez_notice` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_payroll`
--
ALTER TABLE `ez_payroll`
  ADD CONSTRAINT `payroll_payroll_slip_id_foreign` FOREIGN KEY (`payroll_slip_id`) REFERENCES `ez_payroll_slip` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `payroll_salary_type_id_foreign` FOREIGN KEY (`salary_type_id`) REFERENCES `ez_salary_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_payroll_slip`
--
ALTER TABLE `ez_payroll_slip`
  ADD CONSTRAINT `payroll_slip_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_permission_role`
--
ALTER TABLE `ez_permission_role`
  ADD CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `ez_permissions` (`id`),
  ADD CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `ez_roles` (`id`);

--
-- Constraints for table `ez_profile`
--
ALTER TABLE `ez_profile`
  ADD CONSTRAINT `profile_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_salary`
--
ALTER TABLE `ez_salary`
  ADD CONSTRAINT `salary_salary_type_id_foreign` FOREIGN KEY (`salary_type_id`) REFERENCES `ez_salary_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `salary_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_tasks`
--
ALTER TABLE `ez_tasks`
  ADD CONSTRAINT `tasks_task_username_foreign` FOREIGN KEY (`task_username`) REFERENCES `ez_users` (`username`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_tickets`
--
ALTER TABLE `ez_tickets`
  ADD CONSTRAINT `tickets_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `ez_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_ticket_attachments`
--
ALTER TABLE `ez_ticket_attachments`
  ADD CONSTRAINT `ticket_attachments_attachment_username_foreign` FOREIGN KEY (`attachment_username`) REFERENCES `ez_users` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ticket_attachments_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `ez_tickets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_ticket_comments`
--
ALTER TABLE `ez_ticket_comments`
  ADD CONSTRAINT `ticket_comments_comment_username_foreign` FOREIGN KEY (`comment_username`) REFERENCES `ez_users` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ticket_comments_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `ez_tickets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_ticket_notes`
--
ALTER TABLE `ez_ticket_notes`
  ADD CONSTRAINT `ticket_notes_note_username_foreign` FOREIGN KEY (`note_username`) REFERENCES `ez_users` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `ticket_notes_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `ez_tickets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `ez_users`
--
ALTER TABLE `ez_users`
  ADD CONSTRAINT `users_designation_id_foreign` FOREIGN KEY (`designation_id`) REFERENCES `ez_designations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
