-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jul 02, 2022 at 07:37 PM
-- Server version: 5.7.33
-- PHP Version: 7.4.19

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: `attendance`
--

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

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

CREATE TABLE `attendance` (
  `attendance_id` int(11) NOT NULL,
  `employee_id` int(11) DEFAULT NULL,
  `status_id` int(11) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `timein` time DEFAULT NULL,
  `timeout` time DEFAULT NULL,
  `comment` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

INSERT INTO `attendance` (`attendance_id`, `employee_id`, `status_id`, `date`, `timein`, `timeout`, `comment`) VALUES
(1, 1, 8, '2022-06-01', NULL, NULL, NULL),
(2, 2, 7, '2022-06-01', NULL, NULL, NULL),
(3, 3, 9, '2022-06-01', NULL, NULL, NULL),
(4, 4, 9, '2022-06-01', NULL, NULL, NULL),
(5, 5, 9, '2022-06-01', NULL, NULL, NULL),
(6, 6, 9, '2022-06-01', NULL, NULL, NULL),
(7, 7, 8, '2022-06-01', NULL, NULL, NULL),
(8, 8, 9, '2022-06-01', NULL, NULL, NULL),
(9, 9, 9, '2022-06-01', NULL, NULL, NULL),
(10, 10, 8, '2022-06-01', NULL, NULL, NULL),
(11, 11, 9, NULL, NULL, NULL, NULL),
(12, 12, 9, '2022-06-01', NULL, NULL, NULL),
(13, 13, 9, '2022-07-01', NULL, NULL, NULL),
(14, 14, 9, '2022-06-01', NULL, NULL, NULL),
(15, 15, 9, '2022-06-01', NULL, NULL, NULL),
(16, 16, 7, '2022-06-01', NULL, NULL, NULL),
(17, 17, 9, '2022-06-01', NULL, NULL, NULL),
(18, 18, 9, '2022-06-01', NULL, NULL, NULL),
(19, 1, 9, '2022-06-03', NULL, NULL, NULL);

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

--
-- Table structure for table `audittrail`
--

CREATE TABLE `audittrail` (
  `id` int(11) NOT NULL,
  `datetime` datetime NOT NULL,
  `script` varchar(255) DEFAULT NULL,
  `user` varchar(255) DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `table` varchar(255) DEFAULT NULL,
  `field` varchar(255) DEFAULT NULL,
  `keyvalue` longtext,
  `oldvalue` longtext,
  `newvalue` longtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `departments`
--

CREATE TABLE `departments` (
  `department_id` int(11) NOT NULL,
  `department_name` varchar(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `departments`
--

INSERT INTO `departments` (`department_id`, `department_name`) VALUES
(1, 'Management'),
(2, 'Global Dimension'),
(3, 'Finance'),
(4, 'Human Resources'),
(5, 'PyraEducation'),
(6, 'Information Technology'),
(7, 'Media Management'),
(8, 'Productions');

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

--
-- Table structure for table `employees`
--

CREATE TABLE `employees` (
  `employee_id` int(11) NOT NULL,
  `employee_name` varchar(255) DEFAULT NULL,
  `department_id` int(11) DEFAULT NULL,
  `employee_jobtitle` varchar(255) DEFAULT NULL,
  `employee_photo` text,
  `employee_mobile` varchar(100) DEFAULT NULL,
  `employee_email` varchar(100) DEFAULT NULL,
  `employee_status` enum('active','notactive') DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `employees`
--

INSERT INTO `employees` (`employee_id`, `employee_name`, `department_id`, `employee_jobtitle`, `employee_photo`, `employee_mobile`, `employee_email`, `employee_status`) VALUES
(1, 'Mona Al Ruwaini', 1, 'COO', NULL, '+971 50 667 2455', 'mona@pyramedia.biz', 'active'),
(2, 'Mohamed Goma', 1, 'CBDO', NULL, '+971 56 333 2860', 'm.gomaa@pyramedia.biz', 'active'),
(3, 'Marwan Abu El Nor', 2, 'CTO', NULL, '+971 50 705 7054', 'marwan@pyramedia.biz', 'active'),
(4, 'Khalid Al Jabri', 3, 'Internal Auditor', NULL, '+971 56 963 9111', 'cfo@pyramedia.biz', 'active'),
(5, 'Bilqees Anjum', 4, 'Human Resources', NULL, '+971 50 125 2524', 'hr@pyramedia.biz', 'active'),
(6, 'Abdul Rahoof Amar', 3, 'Accountant', NULL, '+971 55 702 8791', NULL, 'active'),
(7, 'Haneen Foaud', 5, 'Training Manager', NULL, NULL, NULL, 'active'),
(8, 'Yousef Saddiq', 6, 'IT Engineer', NULL, '+971 56 613 5789', 'it@pyramedia.biz', 'active'),
(9, 'Abeer Mahmoud', NULL, 'Account Manager', NULL, '+971 55 470 9970', 'abeer@pyramedia.biz', 'active'),
(10, 'Mohamed Ramadan', NULL, 'Producer', NULL, NULL, NULL, 'active'),
(11, 'Sogood Khalil', NULL, 'Content Producer', NULL, NULL, NULL, 'active'),
(12, 'Faheem Iqbal', 7, 'Media Management', NULL, NULL, NULL, 'active'),
(13, 'Hilda Aguilar', 8, 'Production Coordinator', NULL, NULL, NULL, 'active'),
(14, 'Ashok Kumar', NULL, 'Store Keeper', NULL, NULL, NULL, 'active'),
(15, 'RodgenBesa', NULL, 'Receptionist', NULL, NULL, NULL, 'active'),
(16, 'Ali Umad', NULL, 'Company Driver', NULL, NULL, NULL, 'active'),
(17, 'Mohamed Ali', NULL, 'Personal Assistant', NULL, NULL, NULL, 'active'),
(18, 'Tarek Tarabichi', NULL, 'Technical Consultant', 'Photo.jpeg', '+971 50 6621953', 'tarek@pyramedia.biz', 'active');

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

--
-- Table structure for table `status`
--

CREATE TABLE `status` (
  `status_id` int(11) NOT NULL,
  `status_name` varchar(100) DEFAULT NULL,
  `status_description` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `status`
--

INSERT INTO `status` (`status_id`, `status_name`, `status_description`) VALUES
(1, 'RD', 'Rest day'),
(2, 'CL', 'Compensatory Leave'),
(3, 'SL', 'Sick Leave'),
(4, 'PH', 'Public Holiday'),
(5, 'SUL', 'Sick Unpaid Leave'),
(6, 'A', 'Absent'),
(7, 'WO', 'Working Outside'),
(8, 'AL', 'Annual Leave'),
(9, 'P', 'Present'),
(10, 'L', 'Late');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `attendance`
--
ALTER TABLE `attendance`
  ADD PRIMARY KEY (`attendance_id`);

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

--
-- Indexes for table `departments`
--
ALTER TABLE `departments`
  ADD PRIMARY KEY (`department_id`);

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

--
-- Indexes for table `status`
--
ALTER TABLE `status`
  ADD PRIMARY KEY (`status_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- AUTO_INCREMENT for table `departments`
--
ALTER TABLE `departments`
  MODIFY `department_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `employees`
--
ALTER TABLE `employees`
  MODIFY `employee_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `status`
--
ALTER TABLE `status`
  MODIFY `status_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
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 */;
