-- https://www.phpmyadmin.net/
--
-- Waktu pembuatan: 04 Jun 2026 pada 06.09
-- Versi server: 10.4.32-MariaDB
-- Versi PHP: 8.2.12

START TRANSACTION;



--
-- Database: `absen_pkl`
--

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

--
-- Struktur dari tabel `absensi`
--

CREATE TABLE `absensi` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `waktu` datetime NOT NULL DEFAULT current_timestamp(),
  `latitude` decimal(10,7) DEFAULT NULL,
  `longitude` decimal(10,7) DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  `status` enum('Hadir','Ditolak') NOT NULL DEFAULT 'Ditolak',
  `tipe` varchar(20) DEFAULT NULL,
  `jarak_meter` decimal(10,2) DEFAULT NULL,
  `face_distance` decimal(10,4) DEFAULT NULL,
  `catatan` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Struktur dari tabel `cuti`
--

CREATE TABLE `cuti` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `tipe_cuti` varchar(50) NOT NULL,
  `tanggal_mulai` date NOT NULL,
  `tanggal_selesai` date NOT NULL,
  `alasan` text NOT NULL,
  `status` enum('Menunggu','Disetujui','Ditolak') DEFAULT 'Menunggu',
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `cuti`
--

INSERT INTO `cuti` (`id`, `user_id`, `tipe_cuti`, `tanggal_mulai`, `tanggal_selesai`, `alasan`, `status`, `created_at`) VALUES
(1, 1, 'Libur/Cuti', '2025-05-05', '2000-09-01', 'NTAH', 'Disetujui', '2026-04-17 13:48:22'),
(2, 1, 'Cuti Sakit', '2026-04-21', '2026-05-30', 'sekarat', 'Disetujui', '2026-04-20 12:44:08');

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

--
-- Struktur dari tabel `logs`
--

CREATE TABLE `logs` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `activity` varchar(255) NOT NULL,
  `status` varchar(30) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `logs`
--

INSERT INTO `logs` (`id`, `user_id`, `activity`, `status`, `created_at`) VALUES
(1, 1, 'Absensi MASUK | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-04-20 12:40:58'),
(2, 1, 'Absensi PULANG | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-04-20 15:08:38'),
(3, 5, 'Absensi MASUK | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-04-20 15:14:53'),
(4, 8, 'Absensi MASUK | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-04-20 15:49:30'),
(5, 8, 'Absensi PULANG | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-04-20 15:49:48'),
(6, 1, 'Absensi MASUK | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-04-21 15:01:02'),
(7, 13, 'Absensi MASUK | Wajah tidak cocok (best distance: 0.6831).', 'rejected', '2026-05-04 15:37:25'),
(8, 13, 'Absensi MASUK | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-05-04 15:37:46'),
(9, 13, 'Absensi PULANG | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-05-04 16:16:45'),
(10, 13, 'Absensi PULANG | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-05-04 16:38:47'),
(11, 13, 'Absensi PULANG | Wajah tidak cocok (median distance: 0.5794, best distance: 0.5718, sample cocok: 0/6).', 'rejected', '2026-05-04 16:40:55'),
(12, 13, 'Absensi PULANG | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-05-04 16:42:43'),
(13, 13, 'Absensi MASUK | Wajah tidak cocok (median distance: 0.5282, best distance: 0.5225, sample cocok: 0/4).', 'rejected', '2026-05-05 09:26:28'),
(14, 13, 'Absensi MASUK | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-05-05 09:28:39'),
(15, 14, 'Absensi MASUK | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-05-05 09:38:18'),
(16, 14, 'Absensi PULANG | Wajah tidak cocok (median distance: 0.5519, best distance: 0.5431, sample cocok: 0/6).', 'rejected', '2026-05-05 09:39:17'),
(17, 13, 'Absensi MASUK | Absensi berhasil. Wajah dan lokasi valid.', 'verified', '2026-05-25 11:21:20');

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

--
-- Struktur dari tabel `presensi`
--

CREATE TABLE `presensi` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `tanggal` date NOT NULL,
  `jam_masuk` time NOT NULL,
  `jam_pulang` time DEFAULT NULL,
  `status` enum('Tepat Waktu','Terlambat','Izin','Alpha') NOT NULL DEFAULT 'Tepat Waktu'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `presensi`
--

INSERT INTO `presensi` (`id`, `user_id`, `tanggal`, `jam_masuk`, `jam_pulang`, `status`) VALUES
(1, 1, '2023-10-21', '07:50:00', '17:30:00', 'Tepat Waktu'),
(2, 1, '2023-10-22', '08:15:00', '17:00:00', 'Terlambat'),
(3, 1, '2023-10-23', '07:45:00', '17:45:00', 'Tepat Waktu');

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

--
-- Struktur dari tabel `system_settings`
--

CREATE TABLE `system_settings` (
  `id` int(11) NOT NULL,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `system_settings`
--

INSERT INTO `system_settings` (`id`, `setting_key`, `setting_value`, `created_at`, `updated_at`) VALUES
(1, 'ABSEN_OFFICE_LAT', '-5.420168', '2026-04-17 08:26:33', '2026-04-20 08:13:56'),
(2, 'ABSEN_OFFICE_LNG', '105.260783', '2026-04-17 08:26:33', '2026-04-20 08:13:56'),
(3, 'ABSEN_OFFICE_RADIUS', '100', '2026-04-17 08:26:33', '2026-04-20 08:13:56'),
(4, 'ABSEN_FACE_THRESHOLD', '0.38', '2026-04-17 08:26:33', '2026-05-04 16:21:11'),
(5, 'ABSEN_JAM_MASUK', '16:00', '2026-04-17 08:58:12', '2026-04-20 08:13:56'),
(6, 'ABSEN_JAM_PULANG', '17:00', '2026-04-17 08:58:12', '2026-04-20 08:13:56');

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

--
-- Struktur dari tabel `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `nama` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `phone_number` varchar(25) DEFAULT NULL,
  `requires_verification` tinyint(1) NOT NULL DEFAULT 0,
  `email_verified_at` datetime DEFAULT NULL,
  `phone_verified_at` datetime DEFAULT NULL,
  `is_approved` tinyint(1) NOT NULL DEFAULT 1,
  `admin_approved_at` datetime DEFAULT NULL,
  `admin_approved_by` int(11) DEFAULT NULL,
  `rejected_at` datetime DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `role` enum('admin','siswa') NOT NULL DEFAULT 'siswa',
  `foto` varchar(255) DEFAULT 'default.png',
  `face_descriptor` longtext DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `users`
--

INSERT INTO `users` (`id`, `nama`, `email`, `phone_number`, `requires_verification`, `email_verified_at`, `phone_verified_at`, `is_approved`, `admin_approved_at`, `admin_approved_by`, `rejected_at`, `password`, `role`, `foto`, `face_descriptor`, `created_at`) VALUES
(1, 'Yona Amalia', 'yona@gmail.com', NULL, 0, NULL, NULL, 1, NULL, NULL, NULL, '$2y$10$.5Elh8fgxypNUWhpUUr/xOa2sZm0VIaE0qWuGGl9otUfobb46T1Pq', 'siswa', '/uploads/users/1776413560_52d8036302991e9a77e5.jpg', '[-0.12949033826589584,0.08415038585662842,-0.0237756434828043,-0.12881447076797486,-0.1263991490006447,-0.04127000272274017,-0.04213499650359154,-0.16177915334701537,0.14916018545627593,-0.1085315078496933,0.26467955112457275,-0.09284720867872238,-0.25552687644958494,-0.16759629249572755,-0.08953499644994736,0.21198073923587799,-0.2266083151102066,-0.16728288531303406,-0.009703115152660757,-0.07254223972558975,0.004323678906075656,-0.04961645230650902,0.060725627839565276,0.15798270404338838,-0.08162705600261688,-0.3601755440235138,-0.05895272418856621,-0.14365644752979279,-0.05952487140893936,-0.10107091069221497,-0.045908821374177934,0.06124792695045471,-0.19433950185775756,-0.08860027641057969,-0.03239952586591244,0.1224957749247551,-0.02769169770181179,-0.02549290210008621,0.19168381989002228,0.007063965185079723,-0.15382568836212157,0.00549104962265119,-0.012923376960679888,0.303950297832489,0.20815539360046387,0.03446046970784664,0.012932843714952468,-0.08302755057811737,0.13556021749973296,-0.21308295726776122,0.03520615696907044,0.12060271054506302,0.08156538605690003,-0.06486437395215035,0.010730346292257309,-0.10138186663389206,-0.014454372972249985,0.1460130512714386,-0.1631523460149765,0.0428081214427948,0.045154524594545366,-0.08759688436985016,-0.009461542312055825,-0.10779138803482055,0.2814549446105957,0.10457058548927307,-0.12645168155431746,-0.09898522645235061,0.16120266914367676,-0.1307880237698555,-0.08436292558908462,0.023981481790542603,-0.1261473447084427,-0.2056446462869644,-0.29679266214370725,0.04133601263165474,0.41465003490448,0.13230583518743516,-0.2022254526615143,0.018733921460807323,-0.05421231240034104,-0.023772296402603386,0.1316419929265976,0.10452206283807755,-0.04043244644999504,0.023560905829072,-0.16229420006275178,-0.017753403075039385,0.18150019347667695,-0.03189594857394695,-0.07082719057798385,0.24454580545425414,-0.05510884150862694,0.09782586991786957,0.08635538071393967,0.005617774510756135,-0.10100460648536683,0.0748921126127243,-0.17007631659507752,-0.00221034346614033,0.018899659067392348,-0.0811333104968071,-0.014537317492067815,0.03606519065797329,-0.08619623035192489,0.06910939887166023,-0.03334374912083149,0.027138276770710946,-0.07186839878559112,-0.01188603979535401,-0.15285802781581878,-0.06610659062862397,0.19048672914505005,-0.21031037867069244,0.18728342652320862,0.1736354112625122,0.07619100660085679,0.16298627555370332,0.1541549563407898,0.03171559162437916,-0.013147228956222534,-0.051104122400283815,-0.16851170361042023,-0.011749124061316252,0.14217559695243837,-0.05477917715907097,0.18293172419071196,0.026234111189842223]', '2023-10-24 08:00:00'),
(2, 'Administrator', 'admin@observatory.io', NULL, 0, NULL, NULL, 1, NULL, NULL, NULL, '$2y$10$.5Elh8fgxypNUWhpUUr/xOa2sZm0VIaE0qWuGGl9otUfobb46T1Pq', 'admin', 'default.png', NULL, '2023-10-24 08:00:00'),
(3, 'ripki aja', 'ripki@gmail.com', NULL, 0, NULL, NULL, 1, NULL, NULL, NULL, '$2y$10$eQ2Vf5iu2PepB2i2c3LHXuDi70K4ctmOiFTj6rATWXQOcA0MZHsL.', 'siswa', '/uploads/users/1776418037_40f16f26cf42c98e249a.jpg', NULL, '2026-04-17 09:27:17'),
(4, 'ripkirr', 'ripki12@gmail.com', NULL, 0, '2026-04-17 09:39:25', NULL, 1, '2026-04-17 09:39:25', 2, NULL, '$2y$10$n8SUh/h6N28W7S68go7oyekOMIonomfU1Q.lo/TEo5/zKJL3J9AHS', 'siswa', 'default.png', NULL, '2026-04-17 09:39:25'),
(5, 'saya', 'aaa@gmail.com', NULL, 0, '2026-04-20 08:11:35', NULL, 1, '2026-04-20 08:11:35', 2, NULL, '$2y$10$cikIIRme.DtbacJdrUDkIu4TK9pVi7oYoMBzlQXpMSKRqgWEmlMmW', 'siswa', '/uploads/users/1776672771_86c8d0a80456789e776f.jpg', '[-0.1199370950460434,0.08009251356124877,-0.012863316759467124,-0.09511420726776124,-0.10006188154220581,-0.047502417117357254,-0.016513645462691785,-0.16306326687335967,0.18054090142250062,-0.10144917368888855,0.29818782210350037,-0.06056198328733444,-0.25885612666606905,-0.1688243955373764,-0.05750360265374184,0.17824630439281464,-0.1954030930995941,-0.14643853306770324,-0.0074603136046789585,-0.04137019254267216,0.06197645664215088,-0.0366779413074255,0.06450456529855728,0.11999039947986603,-0.09470607042312622,-0.31874375939369204,-0.06727835834026337,-0.09632645398378373,-0.03754147104918957,-0.10891698598861695,-0.04678241163492203,0.04793645814061165,-0.2175693243741989,-0.09115100055932998,0.0011978751979768276,0.1101287692785263,-0.045497027784585954,-0.04715501442551613,0.21993023455142974,0.01958732455968857,-0.16547519564628602,-0.03148435242474079,-0.014491523429751397,0.28340086340904236,0.2425583928823471,0.01747992788441479,-0.0018225107807666064,-0.11558813452720643,0.12144659161567688,-0.17249405682086943,0.004187942366115749,0.12661322355270385,0.10398022234439849,-0.04515635371208191,0.04196806214749813,-0.15288166105747222,-0.01568113169632852,0.15497938692569732,-0.12572821229696274,0.005463834060356021,0.017627443093806504,-0.11425984054803848,0.007119102566502988,-0.10053461492061615,0.28415900468826294,0.023312458023428916,-0.13073155879974366,-0.11155466437339782,0.15727904736995696,-0.08690698295831681,-0.07483559399843216,0.08552728742361068,-0.14206589460372926,-0.23661835193634034,-0.2828878402709961,0.03634122535586357,0.41668919324874876,0.11529023796319962,-0.227031147480011,0.053810065239667894,-0.04162559024989605,-0.035007911175489424,0.13213467597961426,0.14621222019195557,-0.010015188599936664,0.053704023361206055,-0.15891995429992675,-0.018375335820019247,0.1799505352973938,-0.04273970350623131,-0.06524522751569747,0.24607112109661103,-0.07850529104471207,0.09568488001823425,0.07211296856403351,-0.04048096165060997,-0.08737562447786332,0.0989925891160965,-0.1622740387916565,-0.04495369121432304,0.027114657685160637,-0.07169797122478486,0.0070490952581167225,0.06390034034848213,-0.11097180098295212,0.0491735503077507,-0.015597727429121733,0.027926138043403624,-0.08045661598443984,-0.08576918840408325,-0.12948209345340728,-0.015333812427707016,0.1520331621170044,-0.28560889363288877,0.20568190217018129,0.14916809201240538,0.06220846772193909,0.1696491152048111,0.1371734470129013,0.03051445186138153,0.013734782114624977,-0.033777904510498044,-0.17319928109645844,0.02032237909734249,0.12569734454154968,-0.04885045289993286,0.21012168526649475,-0.00795627636834979]', '2026-04-20 08:11:35'),
(6, 'haaaa', 'aaa3@gmail.com', '+62822222222', 1, NULL, NULL, 0, NULL, NULL, NULL, '$2y$10$db7wT81c8EHf3Kn6Jos1.upuQ0/D6dpoZlAQagIlA7W./vYyRoOyi', 'siswa', '/uploads/users/1776674163_b90163fa9a08c578e5d9.jpg', NULL, '2026-04-20 08:36:03'),
(7, 'akun2', 'aaa1@gmail.com', '+6282289424921', 1, NULL, NULL, 0, NULL, NULL, NULL, '$2y$10$BuIfGiPe8w2CnJBs7w.iEORzU1u56ztrO0dsuMTvrccSyMjc.oMLK', 'siswa', '/uploads/users/1776674244_773a8400cbac82889dc5.jpg', NULL, '2026-04-20 08:37:24'),
(11, 'yonaa', 'yonaamalia30@gmail.com', '+6298233333333', 1, NULL, NULL, 0, NULL, NULL, NULL, '$2y$10$RyKmmYmiEQPWL1WwRXKAHeeCGmtwhndd4/zZ30ztQxOuUgwpJSuqy', 'siswa', '/uploads/users/1776677345_cba8fe32cd24727be508.jpg', NULL, '2026-04-20 09:29:05'),
(14, 'herwan arifal', 'arifalherwan@gmail.com', '+6282626518638', 1, '2026-05-05 02:35:25', '2026-05-05 02:35:25', 1, '2026-05-05 02:35:25', 2, NULL, '$2y$10$U1VSPOJWtMktpluIT6fPSee7plxJo9xUqMKGTlsgP0WZP5HnwGf1m', 'siswa', '/uploads/users/1777948403_6071f3a0552efa9120cd.jpg', '[-0.08848470151424408,0.11011776328086853,0.09578912705183029,-0.020849865581840276,-0.02409969046711922,-0.0648008331656456,-0.0034143527562264355,-0.13310312628746032,0.19633771181106568,-0.05174637660384178,0.2303304821252823,-0.021782778017222882,-0.21925071775913238,-0.16591934561729432,0.030111584067344665,0.14368991553783417,-0.14322455525398253,-0.06504857763648034,-0.08155671209096908,-0.0345578134059906,0.06015844345092773,0.019802140817046166,0.1314134806394577,0.06904702335596084,-0.12947002798318863,-0.39114299416542053,-0.07442589029669762,-0.08604468256235123,-0.004691276606172324,-0.05364445075392723,-0.08373324126005173,0.07586585730314255,-0.1743876427412033,-0.06430922374129296,-0.029631000757217408,0.12510956674814225,-0.027889381535351275,-0.07160274982452393,0.22496133744716645,-0.015000107418745755,-0.17310864329338074,-0.024173247069120406,-0.0288377083837986,0.22719625234603882,0.216325980424881,0.025453476049005986,0.051224179565906525,-0.06209137886762619,0.0778455376625061,-0.197042253613472,0.039934832602739334,0.13508076071739197,0.00959665242698975,-0.010071570286527276,0.060283887386322024,-0.14179448187351226,-0.021401719003915787,0.05614514946937561,-0.12792133539915085,-0.029312382265925408,0.01380667621269822,-0.1236447811126709,-0.06535079404711723,-0.05576905831694603,0.20579453706741332,0.10897354930639266,-0.07056913375854493,-0.09539400786161423,0.11736801713705063,-0.13578273952007294,-0.027070918679237367,0.048625006526708606,-0.18884657323360443,-0.16740764677524567,-0.3473878502845764,0.04884868487715721,0.4017147898674011,0.09880086332559586,-0.19479297399520873,0.0026883516926318406,-0.0587556391954422,0.016226910380646588,0.13125449270009995,0.09091546386480331,-0.07758647501468659,0.04881027117371559,-0.14619797170162202,0.0868383452296257,0.17090710401535034,-0.05077020525932312,-0.06852739229798317,0.2203134626150131,0.00029227072081994265,0.08716554939746857,0.01825058236718178,-0.03623891621828079,-0.018391453986987473,0.04818184077739716,-0.16025463938713075,0.03188621774315834,0.17319624423980712,-0.03461142405867577,0.027185942977666855,0.12111447006464005,-0.18324486315250396,0.036666297167539594,0.02161599285900593,-0.03824273347854614,0.06008487492799759,-0.029356703534722327,-0.1876629114151001,-0.07834414690732956,0.17311921417713166,-0.18208062648773193,0.16821990311145782,0.20100988149642945,0.014450354967266321,0.13591625094413756,0.07847186625003814,0.09323801100254059,-0.024939579889178276,0.007435520924627781,-0.14546915590763093,0.02033511959016323,0.13194590657949448,0.027266427502036096,0.11592281311750412,0.014318657759577035]', '2026-05-05 02:33:23');

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

--
-- Struktur dari tabel `user_verification_codes`
--

CREATE TABLE `user_verification_codes` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `channel` enum('email','phone') NOT NULL,
  `code_hash` varchar(255) NOT NULL,
  `expires_at` datetime NOT NULL,
  `verified_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `user_verification_codes`
--

INSERT INTO `user_verification_codes` (`id`, `user_id`, `channel`, `code_hash`, `expires_at`, `verified_at`, `created_at`) VALUES
(1, 6, 'email', '$2y$10$OLhiv.b1iZfob6xMc7162.ihoBCSE56lt.w5eDyWosdpXg/zK72kq', '2026-04-20 08:46:03', NULL, '2026-04-20 08:36:04'),
(2, 6, 'phone', '$2y$10$Wdh63LuaKyAcQMo0psrYxuF3Dd.4n3xH1m0yGM3OJowBULnmSuRXS', '2026-04-20 08:46:04', NULL, '2026-04-20 08:36:04'),
(3, 7, 'email', '$2y$10$I4syQmG3M.RS/nV1fjMI6uLMe3QJTIfWMHjiyAu5exn/2ZawP6fvq', '2026-04-20 08:47:24', NULL, '2026-04-20 08:37:24'),
(4, 7, 'phone', '$2y$10$zKcJWYkQL/N83w3jqx9L3.h9I8DSZli3Wrn/lbhzuuvq.ZF6mihWG', '2026-04-20 08:47:24', NULL, '2026-04-20 08:37:24'),
(5, 7, 'email', '$2y$10$b0ufVq8rVjcPtf1uByOkCuqepHOZHmRLMSssIOIQcYPBukee/3KPu', '2026-04-20 08:47:46', NULL, '2026-04-20 08:37:46'),
(6, 7, 'phone', '$2y$10$Ao/XdPP1PRKKwmQntJ/rYOA/hC.QKhzSggvP4wJZiSDE6wbX4Z8Uu', '2026-04-20 08:47:46', NULL, '2026-04-20 08:37:46'),
(7, 8, 'email', '$2y$10$W98gVwImVCgH7l.c2q4H4OUxaxEeTkg4fVnCZdVRtqk/8oC2wutRy', '2026-04-20 08:49:10', '2026-04-20 08:40:42', '2026-04-20 08:39:10'),
(8, 8, 'phone', '$2y$10$KZBmAHpyly1a8YsiJkNO9u0SF3eu8IqIo41aFKFfIyGrgUWdoh5ui', '2026-04-20 08:49:10', '2026-04-20 08:40:42', '2026-04-20 08:39:10'),
(9, 9, 'email', '$2y$10$hIK0zEfjkKHUz8BULEeAseNo8FBM2rxEuybnxAKR/2P3Y0JwfODGS', '2026-04-20 09:21:40', NULL, '2026-04-20 09:11:41'),
(10, 9, 'phone', '$2y$10$0u1xl8q2W/R1iZ.nCsyL2.A1QFPss3DEbiAYfVf9qxpLO0YWRyVFi', '2026-04-20 09:21:41', NULL, '2026-04-20 09:11:41'),
(11, 9, 'email', '$2y$10$GG3n50P.NIsDAqsV9ZZSeeqA0XU03RTUcwSFNydhLWxR3TPFuNg/S', '2026-04-20 09:28:50', NULL, '2026-04-20 09:18:50'),
(12, 9, 'phone', '$2y$10$4mo3fZHPXRucHhk4ecEuKeFvV8.fg9w4BdEd.jbbb5HGtOWG9k16G', '2026-04-20 09:28:50', NULL, '2026-04-20 09:18:50'),
(13, 9, 'email', '$2y$10$XBxiYDI2bP3R65Ywr56K/e8NKvYR9W59tsBOLbiqYvL2aHDRsZwjm', '2026-04-20 09:30:54', NULL, '2026-04-20 09:20:54'),
(14, 9, 'phone', '$2y$10$Ww7uE.PgXB6rOK47luUAfOCO0yfemhnzuqhVAMpNY5HbxsCtJAvIC', '2026-04-20 09:30:54', NULL, '2026-04-20 09:20:54'),
(15, 9, 'email', '$2y$10$UuYbPPac7lVYlbn41tFNT.Ha9fhnP57C0W7jB076RcXrpbYvfnNOO', '2026-04-20 09:31:32', NULL, '2026-04-20 09:21:32'),
(16, 9, 'phone', '$2y$10$WkKkFyekQM0cARkwfYzqjOzy1Pq.MyKk6k00ISW9WVZtowfd8YkVO', '2026-04-20 09:31:32', NULL, '2026-04-20 09:21:32'),
(17, 9, 'email', '$2y$10$QJcDn5gU1FKDBgUi8sFOQuAWyGCy.njgS5H7fXn6gmkY77y.XGEGK', '2026-04-20 09:31:58', NULL, '2026-04-20 09:21:58'),
(18, 9, 'phone', '$2y$10$7eL1dGguxZGjNLMWMBeHQujO4b.32s7RW3QKEhH20oKVThFw/BI8u', '2026-04-20 09:31:58', NULL, '2026-04-20 09:21:58'),
(19, 10, 'email', '$2y$10$RilS11jAxTkeLbKWZK9rzuK9oOTMG9ju39v/hkd9gZYDI.tf/0nN6', '2026-04-20 09:33:49', NULL, '2026-04-20 09:23:49'),
(20, 10, 'phone', '$2y$10$gWzcUViCP1KC6xssyViOoO1pMefLhu..e8mOUEinQ5c1GKGm2Q3uG', '2026-04-20 09:33:49', NULL, '2026-04-20 09:23:50'),
(21, 10, 'email', '$2y$10$c5FgRr7L3w.KClK7h2YmzOgV42zH5KijwBiuRxBgnYjLqWvZjoAby', '2026-04-20 09:37:05', NULL, '2026-04-20 09:27:05'),
(22, 10, 'phone', '$2y$10$uuvo3xEWeoc3KlRMRoKe4ujWZ59O0XGm5Nae4DktuCxeTpulquvbO', '2026-04-20 09:37:05', NULL, '2026-04-20 09:27:05'),
(23, 11, 'email', '$2y$10$2eADdTS1ixPgLSviQ5QHFOEQ5ePVpFbqfs97N7ONTe8cCYzqMkEim', '2026-04-20 09:39:05', NULL, '2026-04-20 09:29:05'),
(24, 11, 'phone', '$2y$10$Bf9jSsEBOWjc6Ngu7xnlxu5qzq8EwEcWKXrof2s86eHEQ23v6.dqy', '2026-04-20 09:39:05', NULL, '2026-04-20 09:29:06'),
(25, 12, 'email', '$2y$10$zktL7g2VOUbVWcEqCV3fGO3I.IwIFFg7e0.Vd8Pb6SHAC.WM9UcV.', '2026-04-20 09:47:49', NULL, '2026-04-20 09:37:49'),
(26, 12, 'phone', '$2y$10$wi8OQDC3EQHyeQJq7RUnsOJ5xFA1KJtwdQ/mW1vjOZcqdPKCV28mG', '2026-04-20 09:47:49', NULL, '2026-04-20 09:37:49'),
(27, 12, 'email', '$2y$10$FCKjbrj4WFnJZ6ds3xx7n.4lEDfrvSQeXfqiwIV5v4U8TJv78GUGC', '2026-04-20 09:48:36', NULL, '2026-04-20 09:38:36'),
(28, 12, 'phone', '$2y$10$r5xq0Lp7ZJDBE363K38zdeBeLCOiEGB4ljJToCGYub9et83BDpIfe', '2026-04-20 09:48:36', NULL, '2026-04-20 09:38:37'),
(29, 13, 'email', '$2y$10$Md0b8a8w/CnzJO1uFnP6u.i3tnNzuRo0FlCCboLbu8yeIa4TpqoeG', '2026-05-04 08:20:28', NULL, '2026-05-04 08:10:28'),
(30, 13, 'phone', '$2y$10$QveO.C4sQKxZQonmHTLLYOS6U.LrnTinUihxZORiORGaRqnV1QDc.', '2026-05-04 08:20:28', NULL, '2026-05-04 08:10:29'),
(31, 14, 'email', '$2y$10$.ppiC4lPKpUD15y.OO4S.Ozfsw80nnF/4QFe0qFR0NuOq9gJ5MbDK', '2026-05-05 02:43:23', NULL, '2026-05-05 02:33:24'),
(32, 14, 'phone', '$2y$10$F1Zq91ZhFHHQDJLbq/E95ejuE5CYdLuuRDphlpxLubfkoc144n.F2', '2026-05-05 02:43:24', NULL, '2026-05-05 02:33:24'),
(33, 14, 'email', '$2y$10$CMA9cdK/vywAGvJFWnJ/Rek5w0UkrNvPXGNH2Pz3zVFX4Z4TNWspC', '2026-05-05 02:43:47', NULL, '2026-05-05 02:33:48'),
(34, 14, 'phone', '$2y$10$dY5TYZZANDgH/dS1uJvzbut0Hn3kSFf3DyjVCj4L487TXkEBw6aRu', '2026-05-05 02:43:48', NULL, '2026-05-05 02:33:48');

--
-- Indexes for dumped tables
--

--
-- Indeks untuk tabel `absensi`
--
ALTER TABLE `absensi`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_absensi_user_waktu` (`user_id`,`waktu`);

--
-- Indeks untuk tabel `cuti`
--
ALTER TABLE `cuti`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indeks untuk tabel `logs`
--
ALTER TABLE `logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_logs_user_created` (`user_id`,`created_at`);

--
-- Indeks untuk tabel `presensi`
--
ALTER TABLE `presensi`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indeks untuk tabel `system_settings`
--
ALTER TABLE `system_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uq_setting_key` (`setting_key`);

--
-- Indeks untuk tabel `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`);

--
-- Indeks untuk tabel `user_verification_codes`
--
ALTER TABLE `user_verification_codes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_uvc_user_channel` (`user_id`,`channel`,`created_at`);

--
-- AUTO_INCREMENT untuk tabel yang dibuang
--

--
-- AUTO_INCREMENT untuk tabel `absensi`
--
ALTER TABLE `absensi`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT untuk tabel `cuti`
--
ALTER TABLE `cuti`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT untuk tabel `logs`
--
ALTER TABLE `logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT untuk tabel `presensi`
--
ALTER TABLE `presensi`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT untuk tabel `system_settings`
--
ALTER TABLE `system_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT untuk tabel `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT untuk tabel `user_verification_codes`
--
ALTER TABLE `user_verification_codes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;

--
-- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
--

--
-- Ketidakleluasaan untuk tabel `cuti`
--
ALTER TABLE `cuti`
  ADD CONSTRAINT `cuti_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Ketidakleluasaan untuk tabel `presensi`
--
ALTER TABLE `presensi`
  ADD CONSTRAINT `presensi_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

