-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 28, 2023 at 07:15 AM
-- Server version: 10.4.24-MariaDB
-- PHP Version: 8.1.6

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

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

--
-- Table structure for table `annual_leaves`
--

CREATE TABLE `annual_leaves` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `staff_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `annual_leaves`
--

INSERT INTO `annual_leaves` (`id`, `date`, `staff_id`, `created_at`, `updated_at`) VALUES
(1, '2023-09-25', 1, '2023-09-21 14:59:09', '2023-09-21 14:59:09'),
(2, '2023-09-25', 2, '2023-09-21 14:59:46', '2023-09-21 14:59:46'),
(3, '2023-09-25', 3, '2023-09-21 14:59:50', '2023-09-21 14:59:50'),
(4, '2023-09-25', 4, '2023-09-21 14:59:53', '2023-09-21 14:59:53'),
(5, '2023-09-25', 5, '2023-09-21 14:59:57', '2023-09-21 14:59:57'),
(6, '2023-09-25', 6, '2023-09-21 15:00:03', '2023-09-21 15:00:03'),
(7, '2023-09-25', 7, '2023-09-21 15:00:07', '2023-09-21 15:00:07'),
(8, '2023-09-25', 8, '2023-09-21 15:00:11', '2023-09-21 15:00:11'),
(15, '2023-09-26', 1, '2023-09-21 15:10:03', '2023-09-21 15:10:03'),
(16, '2023-09-28', 1, '2023-09-21 15:10:07', '2023-09-21 15:10:07'),
(17, '2023-09-29', 1, '2023-09-21 15:10:09', '2023-09-21 15:10:09'),
(18, '2023-09-30', 1, '2023-09-21 15:10:12', '2023-09-21 15:10:12');

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

--
-- Table structure for table `attendances`
--

CREATE TABLE `attendances` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL,
  `clock_in_status` enum('alpha','late','early','no clock-in','valid') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'no clock-in',
  `clock_out_status` enum('alpha','late','early','no clock-out','valid') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'no clock-out',
  `clock_in` time DEFAULT NULL,
  `clock_out` time DEFAULT NULL,
  `staff_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attendances`
--

INSERT INTO `attendances` (`id`, `date`, `clock_in_status`, `clock_out_status`, `clock_in`, `clock_out`, `staff_id`, `created_at`, `updated_at`) VALUES
(1, '2023-09-21', 'no clock-in', 'no clock-out', '09:06:00', '20:28:00', 1, '2023-09-21 02:06:41', '2023-09-21 13:28:11'),
(2, '2023-09-21', 'no clock-in', 'no clock-out', '16:07:00', '20:27:00', 2, '2023-09-21 09:07:49', '2023-09-21 13:27:48'),
(3, '2023-09-21', 'no clock-in', 'no clock-out', NULL, '20:28:00', 3, '2023-09-21 13:28:40', '2023-09-21 13:28:40'),
(4, '2023-09-22', 'late', 'no clock-out', '15:12:00', NULL, 1, '2023-09-22 08:12:11', '2023-09-22 08:12:11'),
(5, '2023-09-27', 'late', 'early', '16:27:00', '16:49:00', 2, '2023-09-27 09:27:36', '2023-09-27 09:49:36'),
(6, '2023-09-27', 'late', 'no clock-out', '16:28:00', NULL, 3, '2023-09-27 09:28:31', '2023-09-27 09:28:31'),
(7, '2023-09-27', 'late', 'no clock-out', '16:29:00', NULL, 4, '2023-09-27 09:29:36', '2023-09-27 09:29:36'),
(8, '2023-09-27', 'early', 'late', '16:30:00', '10:39:41', 5, '2023-09-27 09:30:42', '2023-09-28 03:39:41'),
(9, '2023-09-27', 'early', 'no clock-out', '16:30:00', NULL, 6, '2023-09-27 09:30:50', '2023-09-27 09:30:50'),
(10, '2023-09-27', 'no clock-in', 'late', NULL, '17:24:02', 7, '2023-09-27 10:24:02', '2023-09-27 10:24:02'),
(11, '2023-09-27', 'no clock-in', 'late', NULL, '17:27:10', 8, '2023-09-27 10:27:10', '2023-09-27 10:27:10'),
(12, '2023-09-27', 'late', 'late', '17:27:41', '17:27:45', 9, '2023-09-27 10:27:41', '2023-09-27 10:27:45'),
(13, '2023-09-28', 'no clock-in', 'early', NULL, '10:36:06', 5, '2023-09-28 03:36:07', '2023-09-28 03:36:07');

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(11, '2014_10_12_000000_create_users_table', 1),
(12, '2014_10_12_100000_create_password_reset_tokens_table', 1),
(13, '2014_10_12_100000_create_password_resets_table', 1),
(14, '2016_06_01_000001_create_oauth_auth_codes_table', 1),
(15, '2016_06_01_000002_create_oauth_access_tokens_table', 1),
(16, '2016_06_01_000003_create_oauth_refresh_tokens_table', 1),
(17, '2016_06_01_000004_create_oauth_clients_table', 1),
(18, '2016_06_01_000005_create_oauth_personal_access_clients_table', 1),
(19, '2019_08_19_000000_create_failed_jobs_table', 1),
(20, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(21, '2023_09_20_083535_create_staff_table', 2),
(22, '2023_09_20_083601_create_shifts_table', 2),
(23, '2023_09_20_083640_create_staff_has_shift_table', 2),
(24, '2023_09_20_083653_create_attendances_table', 2),
(25, '2023_09_20_083701_create_annual_leaves_table', 2),
(26, '2023_09_20_083713_create_operational_days_table', 2),
(27, '2023_09_20_083725_create_national_holidays_table', 2),
(28, '2023_09_22_140821_modify_attendances_table', 3);

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

--
-- Table structure for table `national_holidays`
--

CREATE TABLE `national_holidays` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `national_holidays`
--

INSERT INTO `national_holidays` (`id`, `name`, `date`, `created_at`, `updated_at`) VALUES
(1, 'Maulid Nabi Muhammad SAW', '2023-09-27', '2023-09-21 14:16:49', '2023-09-21 14:20:50'),
(2, 'Natal', '2023-12-25', '2023-09-21 14:17:40', '2023-09-21 14:17:40');

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

--
-- Table structure for table `oauth_access_tokens`
--

CREATE TABLE `oauth_access_tokens` (
  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `client_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `scopes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `revoked` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `oauth_access_tokens`
--

INSERT INTO `oauth_access_tokens` (`id`, `user_id`, `client_id`, `name`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) VALUES
('68e76315042b0b4fc9ba4175d03f3e309ed5572782dcda1a3528e83672a1f248b7744bc8900f0ebc', 1, '9a2d4c8a-e0cb-4b6b-99c9-1be1ec6ff2a2', NULL, '[]', 0, '2023-09-25 07:40:39', '2023-09-25 07:40:39', '2024-09-25 14:40:39'),
('9520121cee16b2f5759f2090efbd2517ab864a7a1ceadf9d6db8c6dbef84c45b2d5a627cbe423a59', 1, '9a2d4c8a-e0cb-4b6b-99c9-1be1ec6ff2a2', NULL, '[]', 0, '2023-09-25 07:40:39', '2023-09-25 07:40:39', '2024-09-25 14:40:39'),
('e2dc62550a81771e233fee13418a07e49b4b4da52881c99109bc31969b10387fc6bd09b57a1f9d45', 1, '9a2d4b00-33b9-4c49-beb0-897385256b26', NULL, '[]', 0, '2023-09-20 01:31:38', '2023-09-20 01:31:38', '2024-09-20 08:31:38');

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

--
-- Table structure for table `oauth_auth_codes`
--

CREATE TABLE `oauth_auth_codes` (
  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `client_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `scopes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `oauth_auth_codes`
--

INSERT INTO `oauth_auth_codes` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `expires_at`) VALUES
('14bccc4ada55913cb2788bf34647562cd50181b5907c676af75fc7b1f3a3654d0ee6fb4c9abebc7c', 1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '[]', 0, '2023-09-25 14:49:03'),
('82f6821919050ab92fc5c3d6e94baccc00f815b228c588c027d758186b2114b913145c93bc9f0088', 1, '9a2d4c8a-e0cb-4b6b-99c9-1be1ec6ff2a2', '[]', 1, '2023-09-25 14:50:34'),
('af536051f506b82a1eea84b1ce3ea1d859ed62454f5a4bffd489061692c9f92b9760a5fb094b25e5', 1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '[]', 0, '2023-09-25 14:49:03'),
('c18d372c4a9e389e8e0cf91db890800b5424e418c3b102c9baf81ff2bc0ef1a05747011844df7eb6', 1, '9a2d4c8a-e0cb-4b6b-99c9-1be1ec6ff2a2', '[]', 0, '2023-09-25 14:50:35'),
('f1a7aa22d4208d378f588cacedfd1e5bbb6d6ced8a109e8a0b222ed832ab28a3cf4983998ca06604', 1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '[]', 0, '2023-09-25 14:36:52'),
('f6a1c8161d926b8834bd9aec3131d7a6984a514f7628368f7f24a2748e52c0d0810f93a2d5d7d948', 1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '[]', 0, '2023-09-25 14:43:06'),
('fff4f75b6c1c4ac4db7bbf129ff960719c4f8046b66b2ad7dd047be4e8e8abc6b8047abf4b539a51', 1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '[]', 0, '2023-09-25 14:46:00');

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

--
-- Table structure for table `oauth_clients`
--

CREATE TABLE `oauth_clients` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `secret` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `provider` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `redirect` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `personal_access_client` tinyint(1) NOT NULL,
  `password_client` tinyint(1) NOT NULL,
  `revoked` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `oauth_clients`
--

INSERT INTO `oauth_clients` (`id`, `user_id`, `name`, `secret`, `provider`, `redirect`, `personal_access_client`, `password_client`, `revoked`, `created_at`, `updated_at`) VALUES
('9a2d4aff-6006-40a0-8c27-f18ade35e50b', NULL, 'GX Attendance Personal Access Client', 'RAALNMFHnEthVIxwh5txrNpQQydO3ZUdh8dDwbxD', NULL, 'http://localhost:3005/verify', 1, 0, 0, '2023-09-20 00:00:25', '2023-09-20 00:00:25'),
('9a2d4b00-33b9-4c49-beb0-897385256b26', NULL, 'GX Attendance Password Grant Client', 'tWZN6Q5LZHh3klHPqyHQQGu59u2LpsnZ8RkWhv3l', 'users', 'http://localhost:3005/auth/verify', 0, 1, 0, '2023-09-20 00:00:25', '2023-09-20 00:00:25'),
('9a2d4c8a-e0cb-4b6b-99c9-1be1ec6ff2a2', NULL, 'Local Frontend', 'LiKqxw7lRiCkIap94cORPzpqGWxJV5u7f57Aa1Kv', NULL, 'http://localhost:3005/verify', 0, 0, 0, '2023-09-20 00:04:43', '2023-09-20 00:04:43'),
('9a3c3c87-c569-426d-a30d-add7244eac7a', 1, 'Coba', 'HoNkxyXNcSZM3advG8tGG6dgnKWsxjIsWVZZbmwE', NULL, 'http://localhost:3009/verify', 0, 0, 0, '2023-09-27 17:17:22', '2023-09-27 17:17:22'),
('9a3c3c88-d772-4e32-8acb-b8d5c9262d9c', 1, 'Coba', 'CJrjmQpKAuuwaRLJdSJUYDBPfbTyOk1n3WT2sU53', NULL, 'http://localhost:3009/verify', 0, 0, 0, '2023-09-27 17:17:23', '2023-09-27 17:17:23'),
('9a3c3ce7-9871-4723-b3c2-d5d8d89f2399', 1, 'Coba lagi', 'zQmuXO5y5uP0u7rKDz1zkDeYFd1CecKos1GrzjTt', NULL, 'http://localhost:3002/verify', 0, 0, 0, '2023-09-27 17:18:25', '2023-09-27 17:18:25'),
('9a3c3d65-32e8-4901-acbd-e6eb48466a7d', 1, 'Coba lagi lagi', 'A7O65ss6zZVHlSAblF8WQGTuGdeYAzv6UX01PEQV', NULL, 'http://localhost:3000/verify', 0, 0, 0, '2023-09-27 17:19:47', '2023-09-27 17:19:47'),
('9a3c3dc7-85ad-41b3-9433-6a38ca5b46db', 1, 'Coba lagi lagi lagi', 'h8KQ3cnzhlH0QzO0TdNEUXnbvP6tshYJ5ldGrmHQ', NULL, 'http://localhost:3001/verify', 0, 0, 0, '2023-09-27 17:20:52', '2023-09-27 17:20:52'),
('9a3c3f5b-db86-4cb8-b10f-3cf6a3672902', 1, 'Coba coba aja', 'aO2SlQfXTLHl4O98nyKvvb5J45wrRwGJkhRphN9u', NULL, 'http://localhost:3003/verify', 0, 0, 0, '2023-09-27 17:25:17', '2023-09-27 17:25:17');

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

--
-- Table structure for table `oauth_personal_access_clients`
--

CREATE TABLE `oauth_personal_access_clients` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `client_id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `oauth_personal_access_clients`
--

INSERT INTO `oauth_personal_access_clients` (`id`, `client_id`, `created_at`, `updated_at`) VALUES
(1, '9a2d4aff-6006-40a0-8c27-f18ade35e50b', '2023-09-20 00:00:25', '2023-09-20 00:00:25');

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

--
-- Table structure for table `oauth_refresh_tokens`
--

CREATE TABLE `oauth_refresh_tokens` (
  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `access_token_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `oauth_refresh_tokens`
--

INSERT INTO `oauth_refresh_tokens` (`id`, `access_token_id`, `revoked`, `expires_at`) VALUES
('2bcedb47f19f9b415bb354462b44d9ad54686ab41580a75624ff1edc7fc42db7d87431409e77637b', 'e2dc62550a81771e233fee13418a07e49b4b4da52881c99109bc31969b10387fc6bd09b57a1f9d45', 0, '2024-09-20 08:31:38'),
('2c47c9b3c5c46fb11224c8347d1226a5a3e5a034ca7666467834a8c4633f74c040762b78f9aa0300', '9520121cee16b2f5759f2090efbd2517ab864a7a1ceadf9d6db8c6dbef84c45b2d5a627cbe423a59', 0, '2024-09-25 14:40:40'),
('b5549a0290659d4c5f2aa8cb7496a60fa2f44b599101e2a6a6d1bfc6f24a9fbba14a850031b0e033', '68e76315042b0b4fc9ba4175d03f3e309ed5572782dcda1a3528e83672a1f248b7744bc8900f0ebc', 0, '2024-09-25 14:40:40');

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

--
-- Table structure for table `operational_days`
--

CREATE TABLE `operational_days` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `day` tinyint(3) UNSIGNED NOT NULL,
  `operating` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `operational_days`
--

INSERT INTO `operational_days` (`id`, `day`, `operating`, `created_at`, `updated_at`) VALUES
(1, 0, 0, NULL, NULL),
(2, 1, 1, NULL, NULL),
(3, 2, 1, NULL, NULL),
(4, 3, 1, NULL, NULL),
(5, 4, 1, NULL, NULL),
(6, 5, 1, NULL, NULL),
(7, 6, 1, NULL, '2023-09-28 04:09:05');

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

--
-- Table structure for table `password_resets`
--

CREATE TABLE `password_resets` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `shifts`
--

CREATE TABLE `shifts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `clock_in` time NOT NULL,
  `clock_out` time NOT NULL,
  `default` tinyint(1) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `shifts`
--

INSERT INTO `shifts` (`id`, `name`, `clock_in`, `clock_out`, `default`, `created_at`, `updated_at`) VALUES
(2, 'Shift Malam', '22:00:00', '07:00:00', 0, '2023-09-20 22:37:20', '2023-09-26 16:24:07'),
(3, 'Shift Pagi', '08:00:00', '17:00:00', 1, '2023-09-21 00:37:16', '2023-09-26 16:24:07');

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

--
-- Table structure for table `staff`
--

CREATE TABLE `staff` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nip` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `leave_quota` smallint(6) NOT NULL DEFAULT 5,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `staff`
--

INSERT INTO `staff` (`id`, `name`, `nip`, `leave_quota`, `created_at`, `updated_at`) VALUES
(1, 'Mozell Heath', '694837', 0, '2023-09-20 21:47:40', '2023-09-26 14:06:07'),
(2, 'Miss Luisa Heidenreich DVM', '502181', 4, '2023-09-20 21:47:40', '2023-09-20 21:47:40'),
(3, 'Valerie Carter', '342513', 4, '2023-09-20 21:47:40', '2023-09-20 21:47:40'),
(4, 'Omari Mante', '567680', 4, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(5, 'Kali Kris', '174333', 4, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(6, 'Lola Mante', '522324', 4, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(7, 'Miss Celine Zieme', '227564', 4, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(8, 'Rossie Schmitt', '943856', 4, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(9, 'Josh Weissnat', '798834', 5, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(10, 'Dayne Bauch', '666599', 5, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(11, 'Tracey Dickens', '773315', 5, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(12, 'Emelia Jacobs', '526994', 5, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(13, 'Ruthie Leffler', '945330', 5, '2023-09-20 21:47:41', '2023-09-20 21:47:41'),
(14, 'Melba Blick', '416096', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(15, 'Kennith Johnson', '306657', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(16, 'Jaden Miller MD', '886598', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(17, 'Addie Emard', '501699', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(18, 'Stanford Lakin V', '483062', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(19, 'Kaitlin Fritsch I', '373888', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(20, 'Kelly Upton', '597374', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(21, 'Shawn Wiegand', '954146', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(22, 'Adella Dicki', '785554', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(23, 'Virgie Weimann', '549918', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(24, 'Dr. Jonatan Legros', '866968', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(25, 'Prof. Gennaro Torphy III', '458671', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(26, 'Amya Murray', '845476', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(27, 'Sharon Smitham', '686357', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(28, 'Rosetta Kessler', '335307', 5, '2023-09-20 21:47:42', '2023-09-20 21:47:42'),
(29, 'Miss Una Ondricka Sr.', '201629', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(30, 'Prof. Imani Welch II', '791044', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(31, 'Beatrice Hills DVM', '159245', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(32, 'Josianne Buckridge', '175143', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(33, 'Rosetta Marvin', '960211', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(34, 'Dr. Rodolfo Hansen', '432448', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(35, 'Hester Satterfield', '227312', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(36, 'Alf Rath', '776240', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(37, 'Dr. Carli Ziemann', '901766', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(38, 'Miss Vickie Kohler', '319901', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(39, 'Lee Bogan', '636114', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(40, 'Otilia Kunde', '957856', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(41, 'Murray Price', '810499', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(42, 'Armando Howell', '126582', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(43, 'Prof. Jakayla Wyman', '540175', 5, '2023-09-20 21:47:43', '2023-09-20 21:47:43'),
(44, 'Mr. Alphonso Waters', '266856', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(45, 'Zelda Keebler DVM', '761075', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(46, 'Selina Von', '607120', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(47, 'Bryana Braun II', '883833', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(48, 'Rudy Block', '125599', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(49, 'Dr. Quincy Herzog', '644236', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44'),
(50, 'Oma Greenholt', '879728', 5, '2023-09-20 21:47:44', '2023-09-20 21:47:44');

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

--
-- Table structure for table `staff_has_shift`
--

CREATE TABLE `staff_has_shift` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `staff_id` bigint(20) UNSIGNED NOT NULL,
  `shift_id` bigint(20) UNSIGNED NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `staff_has_shift`
--

INSERT INTO `staff_has_shift` (`id`, `staff_id`, `shift_id`, `date`) VALUES
(1, 1, 3, '2023-09-21'),
(2, 1, 3, '2023-09-22'),
(3, 1, 3, '2023-09-23'),
(5, 2, 3, '2023-09-21'),
(7, 4, 3, '2023-09-21'),
(8, 5, 3, '2023-09-21'),
(10, 7, 2, '2023-09-21'),
(11, 8, 2, '2023-09-21'),
(13, 10, 2, '2023-09-21'),
(14, 2, 2, '2023-09-22'),
(17, 5, 2, '2023-09-27'),
(18, 6, 2, '2023-09-27'),
(20, 7, 3, '2023-09-27'),
(22, 40, 3, '2023-09-27'),
(23, 39, 2, '2023-09-27'),
(24, 38, 2, '2023-09-27'),
(25, 37, 2, '2023-09-27'),
(26, 36, 3, '2023-09-27');

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

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

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'admingx', 'admingx', NULL, '$2y$10$4GOsjZ188JR5Ws8tyA1ZauNWkAi9fGY2.kO.DKLLXzeZG.aXNrsxG', NULL, '2023-09-20 00:01:28', '2023-09-20 00:01:28');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `annual_leaves`
--
ALTER TABLE `annual_leaves`
  ADD PRIMARY KEY (`id`),
  ADD KEY `annual_leaves_staff_id_foreign` (`staff_id`);

--
-- Indexes for table `attendances`
--
ALTER TABLE `attendances`
  ADD PRIMARY KEY (`id`),
  ADD KEY `attendances_staff_id_foreign` (`staff_id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

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

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

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

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

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

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

--
-- Indexes for table `oauth_refresh_tokens`
--
ALTER TABLE `oauth_refresh_tokens`
  ADD PRIMARY KEY (`id`),
  ADD KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`);

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

--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
  ADD KEY `password_resets_email_index` (`email`);

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);

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

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

--
-- Indexes for table `staff_has_shift`
--
ALTER TABLE `staff_has_shift`
  ADD PRIMARY KEY (`id`),
  ADD KEY `staff_has_shift_staff_id_foreign` (`staff_id`),
  ADD KEY `staff_has_shift_shift_id_foreign` (`shift_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `annual_leaves`
--
ALTER TABLE `annual_leaves`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `attendances`
--
ALTER TABLE `attendances`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `national_holidays`
--
ALTER TABLE `national_holidays`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `oauth_personal_access_clients`
--
ALTER TABLE `oauth_personal_access_clients`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `operational_days`
--
ALTER TABLE `operational_days`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `shifts`
--
ALTER TABLE `shifts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `staff`
--
ALTER TABLE `staff`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;

--
-- AUTO_INCREMENT for table `staff_has_shift`
--
ALTER TABLE `staff_has_shift`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `annual_leaves`
--
ALTER TABLE `annual_leaves`
  ADD CONSTRAINT `annual_leaves_staff_id_foreign` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `attendances`
--
ALTER TABLE `attendances`
  ADD CONSTRAINT `attendances_staff_id_foreign` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `staff_has_shift`
--
ALTER TABLE `staff_has_shift`
  ADD CONSTRAINT `staff_has_shift_shift_id_foreign` FOREIGN KEY (`shift_id`) REFERENCES `shifts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `staff_has_shift_staff_id_foreign` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE 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 */;
