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

START TRANSACTION;



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

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

CREATE TABLE `absensi` (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_anggota` varchar(30) NOT NULL,
  `tanggal` datetime DEFAULT (now()),
  `waktu_masuk` datetime DEFAULT (now()),
  `status` varchar(20) NOT NULL,
  `keterangan` text,
  `foto` longtext,
  `tanda_tangan` longtext,
  `latitude` varchar(50) DEFAULT NULL,
  `longitude` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `jabatan`
--

CREATE TABLE `jabatan` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `nama` (`nama`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `jabatan`
--

INSERT INTO `jabatan` (`nama`) VALUES
('Kapolda'), ('Wakapolda'), ('Irwasda'), ('Karo Ops'), ('Karo SDM'), ('Karo Log'), ('Karo Rena'), 
('Dirintelkam'), ('Dirreskrimum'), ('Dirreskrimsus'), ('Dirresnarkoba'), ('Dirbinmas'), 
('Dirsamapta'), ('Dirlantas'), ('Dirpamobvit'), ('Dirpolairud'), ('Kabid Humas'), 
('Kabid Propam'), ('Kabid Kum'), ('Kabid TI'), ('Kabid Dokkes'), ('Kabid Keu'), 
('Dansat Brimob'), ('Kepala SPN');

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

--
-- Table structure for table `pangkat`
--

CREATE TABLE `pangkat` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `nama` (`nama`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `pangkat`
--

INSERT INTO `pangkat` (`nama`) VALUES
('Jenderal Polisi'), ('Komisaris Jenderal Polisi'), ('Inspektur Jenderal Polisi'), ('Brigadir Jenderal Polisi'),
('Komisaris Besar Polisi'), ('Ajun Komisaris Besar Polisi'), ('Komisaris Polisi'),
('Ajun Komisaris Polisi'), ('Inspektur Polisi Satu'), ('Inspektur Polisi Dua'),
('Ajun Inspektur Polisi Satu'), ('Ajun Inspektur Polisi Dua'),
('Brigadir Polisi Kepala'), ('Brigadir Polisi'), ('Brigadir Polisi Satu'), ('Brigadir Polisi Dua'),
('Ajun Brigadir Polisi'), ('Ajun Brigadir Polisi Satu'), ('Ajun Brigadir Polisi Dua'),
('Bhayangkara Kepala'), ('Bhayangkara Satu'), ('Bhayangkara Dua');

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

--
-- Table structure for table `pengaturan`
--

CREATE TABLE `pengaturan` (
  `kunci` varchar(50) NOT NULL,
  `nilai` text NOT NULL,
  PRIMARY KEY (`kunci`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `pengaturan`
--

INSERT INTO `pengaturan` (`kunci`, `nilai`) VALUES
('jam_masuk_normal', '08:00'),
('jam_masuk_jumat', '07:30'),
('polda_lat', '-3.4883075'),
('polda_lon', '114.8307329'),
('geofence_radius', '200');

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

--
-- Table structure for table `cuti`
--

CREATE TABLE `cuti` (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_anggota` varchar(30) NOT NULL,
  `tanggal_mulai` datetime NOT NULL,
  `tanggal_selesai` datetime NOT NULL,
  `jenis_cuti` varchar(50) NOT NULL,
  `keterangan` text,
  `status` varchar(20) DEFAULT 'Pending',
  `created_at` datetime DEFAULT (now()),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

COMMIT;


