-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `mod_hr`
--

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

--
-- Table structure for table `appraisals`
--

CREATE TABLE `appraisals` (
  `id` int(11) NOT NULL,
  `employee_id` int(50) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `department` varchar(50) DEFAULT NULL,
  `rank` varchar(50) DEFAULT NULL,
  `period` varchar(50) DEFAULT NULL,
  `score` decimal(5,2) DEFAULT NULL,
  `comments` text DEFAULT NULL,
  `upload_doc` text DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `appraisals`
--

INSERT INTO `appraisals` (`id`, `employee_id`, `name`, `department`, `rank`, `period`, `score`, `comments`, `upload_doc`, `status`) VALUES
(1, 1236547, 'Christian Davis', 'DMO', 'Senior Staff', 'Jan 2025', 7.00, 'work time', NULL, 'Pending');

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

--
-- Table structure for table `attendance`
--

CREATE TABLE `attendance` (
  `id` int(11) NOT NULL,
  `employee_id` int(50) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `department` varchar(100) DEFAULT NULL,
  `rank` varchar(100) DEFAULT NULL,
  `clock_in` datetime DEFAULT NULL,
  `clock_out` datetime DEFAULT NULL,
  `status` enum('Present','Absent','Not Marked') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `attendance`
--

INSERT INTO `attendance` (`id`, `employee_id`, `name`, `department`, `rank`, `clock_in`, `clock_out`, `status`) VALUES
(7, 1236547, 'Christian Davis', 'DMO', 'Senior Staff', '2025-06-09 07:19:00', '2025-06-09 16:19:00', 'Present'),
(10, 1236547, 'Christian Davis', 'DMO', 'Senior Staff', '2025-06-10 08:06:00', '2025-06-10 17:07:00', 'Present'),
(11, 1236547, 'Christian Davis', 'DMO', 'Senior Staff', '2025-06-11 07:23:00', '2025-06-11 16:23:00', 'Present'),
(12, 2145785473, 'Richard A. Williams', 'ICT', 'General', '2025-06-12 07:45:00', '2025-06-12 17:20:00', 'Present'),
(14, 1236547, 'Christian Davis', 'DM0', 'Senior Staff', '2025-06-06 10:31:00', '2025-06-06 22:31:00', 'Absent'),
(15, 2145785473, 'Richard A. Williams', 'ICT', 'General', '2025-06-02 10:33:00', '2025-06-02 22:33:00', 'Present'),
(18, 1236547, 'Christian Davis', 'DM0', 'Senior Staff', '2025-06-15 23:23:00', '2025-06-15 17:29:00', 'Present'),
(21, 2145785473, 'Richard A. Williams', 'ICT', 'General', '2025-06-16 05:58:00', '2025-06-15 17:57:00', 'Absent');

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

--
-- Table structure for table `audit_trail`
--

CREATE TABLE `audit_trail` (
  `id` int(11) NOT NULL,
  `user_id` varchar(50) DEFAULT NULL,
  `username` varchar(100) DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `target_table` varchar(100) DEFAULT NULL,
  `timestamp` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `audit_trail`
--

INSERT INTO `audit_trail` (`id`, `user_id`, `username`, `action`, `target_table`, `timestamp`) VALUES
(13, '1236547', 'chris25', 'User logged in', 'login', '2025-06-16 03:16:05'),
(14, '1236547', 'chris25', 'Added new employee 7895-254-2025', 'mod_emp', '2025-06-16 03:25:35'),
(15, '1236547', 'chris25', 'Updated attendance for 2025-06-15', 'attendance', '2025-06-16 03:27:20'),
(16, '1236547', 'chris25', 'User logged out', 'logout', '2025-06-16 04:09:45'),
(17, '1236547', 'chris25', 'User logged in', 'login', '2025-06-17 20:38:57'),
(18, '1236547', 'chris25', 'User logged out', 'logout', '2025-06-17 20:59:32'),
(19, '1236547', 'chris25', 'User logged in', 'login', '2025-06-17 23:01:12'),
(20, '1236547', 'chris25', 'Updated attendance for 2025-06-15', 'attendance', '2025-06-18 00:57:56'),
(21, '1236547', 'chris25', 'Deleted employee ID 7895', 'employee', '2025-06-18 01:06:16'),
(22, '1236547', 'chris25', 'Deleted employee ID 2147483647', 'employee', '2025-06-18 01:35:51'),
(23, '1236547', 'chris25', 'Updated attendance for 2025-06-15', 'attendance', '2025-06-18 02:09:56'),
(24, '1236547', 'chris25', 'Updated attendance for 2025-06-15', 'attendance', '2025-06-18 02:17:14'),
(25, '1236547', 'chris25', 'Updated attendance for 2025-06-15', 'attendance', '2025-06-18 02:27:00'),
(26, '1236547', 'chris25', 'Updated attendance for 2025-06-15', 'attendance', '2025-06-18 03:06:22'),
(27, '1236547', 'chris25', 'Updated attendance for 2025-06-15', 'attendance', '2025-06-18 03:14:09'),
(28, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:14:11'),
(29, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:16:40'),
(30, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:16:45'),
(31, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:19:33'),
(32, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:20:57'),
(33, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:27:32'),
(34, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:28:41'),
(35, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:29:34'),
(36, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:29:36'),
(37, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:29:38'),
(38, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:29:40'),
(39, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:29:46'),
(40, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:31:36'),
(41, '1236547', 'chris255', 'Updated username and password', 'users', '2025-06-18 03:46:15'),
(42, '1236547', 'chris255', 'User logged in', 'login', '2025-06-18 03:49:16'),
(43, '1236547', 'chris255', 'Updated attendance for 2025-06-15', 'attendance', '2025-06-18 03:51:24'),
(44, '1236547', 'chris255', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 03:51:31'),
(45, '1236547', 'chris255', 'Updated attendance for 2025-06-15', 'attendance', '2025-06-18 04:06:21'),
(46, '1236547', 'chris25', 'Updated username and password', 'users', '2025-06-18 04:52:26'),
(47, '1236547', 'chris25', 'User logged out', 'logout', '2025-06-18 04:52:29'),
(48, '1236547', 'chris25', 'User logged in', 'login', '2025-06-18 04:53:59'),
(49, '1236547', 'chris25', 'Added new employee 14526579', 'mod_emp', '2025-06-18 05:34:30'),
(50, '1236547', 'chris25', 'User logged out', 'logout', '2025-06-18 05:35:05'),
(51, '14526579', 'paye25', 'User logged in', 'login', '2025-06-18 05:35:47'),
(52, '14526579', 'paye25', 'User logged out', 'logout', '2025-06-18 05:36:35'),
(53, '1236547', 'chris25', 'User logged in', 'login', '2025-06-18 05:38:43'),
(54, '1236547', 'chris25', 'Leave Pending for request ID 1', 'leave_approval', '2025-06-18 05:58:57'),
(55, '1236547', 'chris25', 'Updated attendance for 2025-06-15', 'attendance', '2025-06-18 05:59:23'),
(56, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 05:59:37'),
(57, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 05:59:56'),
(58, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 05:59:57'),
(59, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 05:59:58'),
(60, '1236547', 'chris25', 'Viewed attendance summary', 'attendance_summary', '2025-06-18 05:59:59');

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

--
-- Table structure for table `hr_policies`
--

CREATE TABLE `hr_policies` (
  `id` int(11) NOT NULL,
  `title` varchar(200) NOT NULL,
  `description` text NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `leave_requests`
--

CREATE TABLE `leave_requests` (
  `id` int(11) NOT NULL,
  `employee_id` int(50) NOT NULL,
  `rank` varchar(100) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `department` varchar(100) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `reason` text DEFAULT NULL,
  `status` enum('Pending','Approved','Rejected') DEFAULT 'Pending',
  `upload_doc` text DEFAULT NULL,
  `created_at` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `leave_requests`
--

INSERT INTO `leave_requests` (`id`, `employee_id`, `rank`, `name`, `department`, `start_date`, `end_date`, `reason`, `status`, `upload_doc`, `created_at`) VALUES
(1, 1236547, 'Senior Staff', 'Christian Davis', 'DMO', '2025-06-10', '2025-06-11', 'sick', 'Pending', NULL, '2025-06-11 06:01:44.000000');

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

--
-- Table structure for table `mod_emp`
--

CREATE TABLE `mod_emp` (
  `employee_id` int(50) NOT NULL,
  `username` varchar(100) DEFAULT NULL,
  `password` varchar(100) DEFAULT NULL,
  `accounttype` varchar(50) DEFAULT NULL,
  `marital_status` varchar(20) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `employee_image` text DEFAULT NULL,
  `id_card_image` text DEFAULT NULL,
  `id_type` varchar(50) DEFAULT NULL,
  `id_number` varchar(50) DEFAULT NULL,
  `residence_address` text DEFAULT NULL,
  `department` varchar(100) DEFAULT NULL,
  `gender` varchar(10) DEFAULT NULL,
  `rank` varchar(100) DEFAULT NULL,
  `position` varchar(100) DEFAULT NULL,
  `primary_bank` varchar(100) DEFAULT NULL,
  `bank_account_one` varchar(100) DEFAULT NULL,
  `bank_account_two` varchar(100) DEFAULT NULL,
  `bank_one_salary` decimal(10,2) DEFAULT NULL,
  `bank_two_salary` decimal(10,2) DEFAULT NULL,
  `allowance` decimal(10,2) DEFAULT NULL,
  `next_of_kin_relationship` varchar(100) DEFAULT NULL,
  `next_of_kin_address` text DEFAULT NULL,
  `next_of_kin_phone` varchar(20) DEFAULT NULL,
  `next_of_kin` varchar(50) DEFAULT NULL,
  `next_of_kin_2` varchar(100) DEFAULT NULL,
  `next_of_kin_2_relationship` varchar(100) DEFAULT NULL,
  `next_of_kin_2_address` text DEFAULT NULL,
  `next_of_kin_2_phone` varchar(20) DEFAULT NULL,
  `next_of_kin_3` varchar(100) DEFAULT NULL,
  `next_of_kin_3_relationship` varchar(100) DEFAULT NULL,
  `next_of_kin_3_address` text DEFAULT NULL,
  `next_of_kin_3_phone` varchar(20) DEFAULT NULL,
  `next_of_kin_4` varchar(100) DEFAULT NULL,
  `next_of_kin_4_relationship` varchar(100) DEFAULT NULL,
  `next_of_kin_4_address` text DEFAULT NULL,
  `next_of_kin_4_phone` varchar(20) DEFAULT NULL,
  `dependant_4_name` varchar(100) DEFAULT NULL,
  `dependant_4_phone` varchar(20) DEFAULT NULL,
  `dependant_4_address` text DEFAULT NULL,
  `dependant_4_relationship` varchar(100) DEFAULT NULL,
  `dependant_3_name` varchar(100) DEFAULT NULL,
  `dependant_3_phone` varchar(20) DEFAULT NULL,
  `dependant_3_address` text DEFAULT NULL,
  `dependant_3_relationship` varchar(100) DEFAULT NULL,
  `dependant_2_name` varchar(100) DEFAULT NULL,
  `dependant_2_phone` varchar(20) DEFAULT NULL,
  `dependant_2_address` text DEFAULT NULL,
  `dependant_2_relationship` varchar(100) DEFAULT NULL,
  `dependant_1_name` varchar(100) DEFAULT NULL,
  `dependant_1_phone` varchar(20) DEFAULT NULL,
  `dependant_1_address` text DEFAULT NULL,
  `dependant_1_relationship` varchar(100) DEFAULT NULL,
  `email_address` varchar(100) DEFAULT NULL,
  `date_employed` date DEFAULT NULL,
  `status` enum('Active','Inactive','Terminated') DEFAULT NULL,
  `pan` varchar(50) DEFAULT NULL,
  `employment_letter` text DEFAULT NULL,
  `recommendation_letter` text DEFAULT NULL,
  `insurance` text DEFAULT NULL,
  `educational_document` text DEFAULT NULL,
  `support_1` text DEFAULT NULL,
  `support_2` text DEFAULT NULL,
  `support_3` text DEFAULT NULL,
  `other_doc_1` text DEFAULT NULL,
  `other_doc_2` text DEFAULT NULL,
  `other_doc_3` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `mod_emp`
--

INSERT INTO `mod_emp` (`employee_id`, `username`, `password`, `accounttype`, `marital_status`, `name`, `dob`, `phone`, `employee_image`, `id_card_image`, `id_type`, `id_number`, `residence_address`, `department`, `gender`, `rank`, `position`, `primary_bank`, `bank_account_one`, `bank_account_two`, `bank_one_salary`, `bank_two_salary`, `allowance`, `next_of_kin_relationship`, `next_of_kin_address`, `next_of_kin_phone`, `next_of_kin`, `next_of_kin_2`, `next_of_kin_2_relationship`, `next_of_kin_2_address`, `next_of_kin_2_phone`, `next_of_kin_3`, `next_of_kin_3_relationship`, `next_of_kin_3_address`, `next_of_kin_3_phone`, `next_of_kin_4`, `next_of_kin_4_relationship`, `next_of_kin_4_address`, `next_of_kin_4_phone`, `dependant_4_name`, `dependant_4_phone`, `dependant_4_address`, `dependant_4_relationship`, `dependant_3_name`, `dependant_3_phone`, `dependant_3_address`, `dependant_3_relationship`, `dependant_2_name`, `dependant_2_phone`, `dependant_2_address`, `dependant_2_relationship`, `dependant_1_name`, `dependant_1_phone`, `dependant_1_address`, `dependant_1_relationship`, `email_address`, `date_employed`, `status`, `pan`, `employment_letter`, `recommendation_letter`, `insurance`, `educational_document`, `support_1`, `support_2`, `support_3`, `other_doc_1`, `other_doc_2`, `other_doc_3`, `created_at`) VALUES
(1236547, 'chris25', '$2y$10$Mw4XGuOJIFKkVi5S3KqpgeRUR3i0RYaPzk/bldmfBozX7cDF0ef2G', 'admin', 'Single', 'Christian Davis', '1996-05-08', '0777809012', 'uploads/6848ccb79d063_Christian Davis photo.jpg', 'uploads/6848ccb7a4111_Stage 01 hh.jpg', '', '', 'Barclay\'s Farm, Community', 'PROT', 'Male', 'Senior Staff', 'Minister', 'LBDI & IB Bank', '002145789658', '000154885698', 2000.00, 5000.00, 10000.00, '---Select---', '', '', '', '', '---Select---', '', '', '', '---Select---', '', '', '', '---Select---', '', '', '', '', '', '---Select---', '', '', '', '---Select---', '', '', '', '---Select---', 'John Kollie', '0775734643', 'Margibi', 'Brother', 'admin@example.com', '2023-02-03', 'Active', 'uploads/6848ccb7a435b_IMG-20220906-WA0000.jpg', 'uploads/6848ccb7b5bb5_Screenshot_20221019-110125_1.jpg', 'uploads/6848ccb7b5e03_received_573987557737082.jpeg', 'uploads/6848ccb7b96bf_received_1545421282558737.jpeg', 'uploads/6848ccb7b9b85_received_1545421282558737.jpeg', NULL, NULL, NULL, NULL, NULL, NULL, '2025-06-11 00:24:23'),
(14526579, 'paye25', 'paye123', 'HR', 'Single', 'Paye M. Sino', '1994-06-19', '0886102277', 'uploads/68524fe6a3f86_IMG-20241101-WA0003.jpg', 'uploads/68524fe6a6120_02.PNG', 'Passport', 'PP00456778', 'UN Drive, Montserrado, Liberia', 'DGSI', 'Male', 'General', 'OIU', 'Eco Bank & LBDI', '77700214578965847', '01200154788561457', 500.00, 1000.00, 100.00, 'Father', '1st Street Sinkor, Montserrado County, Liberia', '0888614578', 'Barclay F Sino', 'Aloysius Romeo ', 'Brother', 'Harbel, Firestone, Margibi, Liberia', '08861028774', 'John Sino', 'Son', 'UN Drive, Montserrado, Liberia', '0886102712', 'Korpo Sno', 'Daughter', 'Barclay\'s Farm, Community', '0777809013', 'Abu Sino', '0777908453', 'Harbel, Firestone, Margibi, Liberia', 'Son', 'ZaLin Sino', '0886102444', 'UN Drive, Montserrado, Liberia', 'Son', 'SattaSino', '08886545766', '1st Street Sinkor, Montserrado County, Liberia', 'Daughter', 'Barclaylyn F Sino', '0888654578', '1st Street Sinkor, Montserrado County, Liberia', 'Wife', 'payemod@gmail', '2000-01-04', 'Active', 'uploads/68524fe6a636e_Bargue.jpg', 'uploads/68524fe6a6574_David D.jpg', 'uploads/68524fe6a67ae_Harrington.jpg', 'uploads/68524fe6a69d1_Jallah.jpg', 'uploads/68524fe6a6be9_Miss.png', 'uploads/68524fe6a6df4_Mr.jpg', 'uploads/68524fe6a701f_Sayway.jpg', 'uploads/68524fe6a726c_IMG-20220906-WA0000.jpg', 'uploads/68524fe6a748a_received_573987557737082.jpeg', 'uploads/68524fe6a76e7_received_1232289857342298.jpeg', 'uploads/68524fe6ace0c_received_1545421282558737.jpeg', '2025-06-18 05:34:30'),
(2145785473, 'rwilliams', 'admin123', 'admin', 'Married', 'Richard A. Williams', '1994-02-25', '0777673339', 'uploads/684a37f528885_raw.jpg', NULL, '', '', 'Lonstar, Jacob town', 'ICT', 'Male', 'General', 'IT Technician', 'Eco Bank & LBDI', '610002847', 'LR168937363993', 150.00, 10.00, 0.00, 'Daughter', 'Jacob Town', '', 'Debora D. Williams', '', '---Select---', '', '', '', '---Select---', '', '', '', '---Select---', '', '', '', '', '', '---Select---', '', '', '', '---Select---', '', '', '', '---Select---', 'Benitta Williams', '0777234874', 'Lonstar, Jacob town', 'Wife', 'richard.williams@mod.gov.lr', '2019-05-06', 'Active', 'uploads/684a37f528c7d_DB FORM.PNG', 'uploads/684a37f529051_offer letter to  Richard Williams  .    (IT).pdf', 'uploads/684a37f529410_Letter of Recommadation.pdf', 'uploads/684a37f5297c3_IMG_20190706_091321_2_1562404464745.jpg', 'uploads/684a37f529bbb_High School Tanscript.pdf', 'uploads/684a37f52a2e0_Coursera Technical Support Fundamantal.pdf', NULL, NULL, NULL, NULL, NULL, '2025-06-12 02:14:13');

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `employee_id` varchar(50) NOT NULL,
  `username` varchar(100) NOT NULL,
  `password` varchar(255) NOT NULL,
  `accounttype` enum('Admin','HR','Employee') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`employee_id`, `username`, `password`, `accounttype`) VALUES
('1236547', 'chris25', '$2y$10$CKVhlm4a2XF0QgS7CYWBXOH/3hB8YrkT7uUMwYKpcsmfTV5RBSouK', 'Admin'),
('14526579', 'paye25', '$2y$10$3nZdFRSb40ZE7dCn2Aevr.zke5hmb2Swpcl0au4HFKMbImMfSr1tO', 'HR'),
('45785478', 'richard25', '$2y$10$pDBVGDo5K5Z6F3Lvbu8yQeh.n/O2cK/f0NjWxmpYpHEgA9vDBHby2', 'Admin');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `appraisals`
--
ALTER TABLE `appraisals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `employee_id` (`employee_id`);

--
-- Indexes for table `attendance`
--
ALTER TABLE `attendance`
  ADD PRIMARY KEY (`id`),
  ADD KEY `employee_id` (`employee_id`);

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

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

--
-- Indexes for table `leave_requests`
--
ALTER TABLE `leave_requests`
  ADD PRIMARY KEY (`id`),
  ADD KEY `employee_id` (`employee_id`);

--
-- Indexes for table `mod_emp`
--
ALTER TABLE `mod_emp`
  ADD PRIMARY KEY (`employee_id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`employee_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `appraisals`
--
ALTER TABLE `appraisals`
  ADD CONSTRAINT `appraisals_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `mod_emp` (`employee_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `attendance`
--
ALTER TABLE `attendance`
  ADD CONSTRAINT `attendance_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `mod_emp` (`employee_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `leave_requests`
--
ALTER TABLE `leave_requests`
  ADD CONSTRAINT `leave_requests_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `mod_emp` (`employee_id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

