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

START TRANSACTION;



--
-- Database: `pakendal_absensi`
--

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

--
-- Table structure for table `absensi`
--

CREATE TABLE `absensi` (
  `id_absen` int NOT NULL,
  `tgl` date NOT NULL,
  `waktu` time NOT NULL,
  `keterangan` enum('Masuk','Pulang') NOT NULL,
  `id_user` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `divisi`
--

CREATE TABLE `divisi` (
  `id_divisi` smallint NOT NULL,
  `nama_divisi` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `divisi`
--

INSERT INTO `divisi` (`id_divisi`, `nama_divisi`) VALUES
(5, 'Ustadz/Ustadzah');

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

--
-- Table structure for table `jam`
--

CREATE TABLE `jam` (
  `id_jam` tinyint(1) NOT NULL,
  `start` time NOT NULL,
  `finish` time NOT NULL,
  `keterangan` enum('Masuk','Pulang') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `jam`
--

INSERT INTO `jam` (`id_jam`, `start`, `finish`, `keterangan`) VALUES
(1, '15:30:00', '16:15:00', 'Masuk'),
(2, '17:00:00', '18:00:00', 'Pulang');

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

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

CREATE TABLE `users` (
  `id_user` smallint NOT NULL,
  `nik` varchar(20) NOT NULL,
  `nama` varchar(50) NOT NULL,
  `telp` varchar(15) NOT NULL,
  `email` varchar(50) NOT NULL,
  `foto` varchar(20) DEFAULT 'no-foto.png',
  `divisi` smallint DEFAULT NULL,
  `username` varchar(25) NOT NULL,
  `password` varchar(60) NOT NULL,
  `level` enum('Manager','Karyawan') NOT NULL DEFAULT 'Karyawan'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `users` (`id_user`, `nik`, `nama`, `telp`, `email`, `foto`, `divisi`, `username`, `password`, `level`) VALUES
(1, '', 'admin', '6281343021252', 'wachidyunarto28@gmail.com', '1737603562.png', NULL, 'admin', '$2y$10$vkvtyvjsBwaONiZ9uoLYfeI0ekbhaR8hFGPOG3Rq2upY0.U5mtzqC', 'Manager'),
(14, '', 'Diyah Pujiastuti', '-081216174540', 'DiyahPujiastuti@mail', '1737640969.jpg', 5, 'diyah', '$2y$10$zHhPCv.4wTvTZHBXhzVuLedhrAlbMB8ME.goboaFgI/S5burMlFf.', 'Karyawan'),
(15, '-', 'Khusnul Khotimah', '-', 'KhusnulKhotimah@mail', 'no-foto.png', 5, 'khusnul', '$2y$10$vi6BNBDQnAOm7J4WXHnnVuc9re5pv0Buwrwnkpq4X6Qjp6MZ91u36', 'Karyawan'),
(16, '-', 'Sri Sulistiya Handayani', '-', 'SriSulistiyaHandayani@mail', 'no-foto.png', 5, 'yani', '$2y$10$7TBzwtPgqfKAtLCumukXKeUKYZdPAv6UuB6oty.mJH3LsEVpbSpz6', 'Karyawan'),
(17, '-', 'Sri Setyawatiningsih', '-', 'SriSetyawatiningsih@mail', 'no-foto.png', 5, 'wati', '$2y$10$HZZ4pkGn3x70mn0WeowkO.fd26E42E2Gzo9zXOXoyI6Xi9pwhtqju', 'Karyawan'),
(18, '-', 'Ana Widiastuti', '-', 'AnaWidiastuti@mail', 'no-foto.png', 5, 'ana', '$2y$10$.DFM0dD0xUT8hvG3Ff/O8OJB1B8gmqa1ol1YCEE.k741RYRp47iiC', 'Karyawan'),
(19, '-', 'Sugiyanti', '-', 'Sugiyanti@mail', 'no-foto.png', 5, 'yanti', '$2y$10$HwzrlkkshiPKJovPD7OKsOBoUjSzfidE3u0FEsQTpFS.FP7HESfJm', 'Karyawan'),
(20, '-', 'Agestiy Rachmadiyah', '-', 'AgestiyRachmadiyah@mail', 'no-foto.png', 5, 'agestiy', '$2y$10$0ziUqHk53HO59WcXz66nUuu9LR0N2XoSPYlFr.d2Zg0Eglh0zPXwq', 'Karyawan'),
(21, '-', 'Wahyu Hamas Ahmad', '-', 'WahyuHamasAhmad@mail', 'no-foto.png', 5, 'hamas', '$2y$10$6B8uecojwWXqMx0YyqyfQubFCF7ykWFRKNsoJrOUhU1vPUToOGDES', 'Karyawan'),
(22, '-', 'Khoirur Rozikin', '-', 'KhoirurRozikin@mail', 'no-foto.png', 5, 'rozi', '$2y$10$Evk7oXW6ODmjXbzXpbAT7um1iXpTNLZvTcHj9vMpyHaQILZQEneSm', 'Karyawan'),
(23, '-', 'Tes Aplikasi', '-', 'mfahriza88@gmail.com', 'no-foto.png', 5, 'tes', '$2y$10$lLPgYJNPYwiqjzICYWw71eymYAGy8ZqQlc0zwwjYo5HHyHAjrw9C2', 'Karyawan');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `absensi`
--
ALTER TABLE `absensi`
  ADD PRIMARY KEY (`id_absen`);

--
-- Indexes for table `divisi`
--
ALTER TABLE `divisi`
  ADD PRIMARY KEY (`id_divisi`);

--
-- Indexes for table `jam`
--
ALTER TABLE `jam`
  ADD PRIMARY KEY (`id_jam`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `absensi`
--
ALTER TABLE `absensi`
  MODIFY `id_absen` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;

--
-- AUTO_INCREMENT for table `divisi`
--
ALTER TABLE `divisi`
  MODIFY `id_divisi` smallint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `jam`
--
ALTER TABLE `jam`
  MODIFY `id_jam` tinyint(1) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id_user` smallint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
COMMIT;

