﻿-- MySQL dump 10.13  Distrib 8.0.46, for Linux (x86_64)
--
-- Host: localhost    Database: kemiskinan_ibadah
-- ------------------------------------------------------
-- Server version	8.0.46

/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `histori_bantuan`
--

DROP TABLE IF EXISTS `histori_bantuan`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `histori_bantuan` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kemiskinan_id` int NOT NULL,
  `jenis_bantuan` varchar(150) NOT NULL,
  `tanggal` date NOT NULL,
  `keterangan` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `kemiskinan_id` (`kemiskinan_id`),
  CONSTRAINT `histori_bantuan_ibfk_1` FOREIGN KEY (`kemiskinan_id`) REFERENCES `kemiskinan` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `histori_bantuan`
--

LOCK TABLES `histori_bantuan` WRITE;
/*!40000 ALTER TABLE `histori_bantuan` DISABLE KEYS */;
/*!40000 ALTER TABLE `histori_bantuan` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `kemiskinan`
--

DROP TABLE IF EXISTS `kemiskinan`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `kemiskinan` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama_kk` varchar(200) NOT NULL,
  `tanggal_lahir` date DEFAULT NULL,
  `pendidikan` varchar(100) DEFAULT NULL,
  `riwayat_penyakit` text,
  `jumlah_kk` int NOT NULL DEFAULT '1',
  `alamat` text NOT NULL,
  `status_penanganan` enum('Belum Ditangani','Diproses','Sudah Ditangani') NOT NULL DEFAULT 'Belum Ditangani',
  `lat` decimal(10,7) NOT NULL,
  `lng` decimal(10,7) NOT NULL,
  `kondisi_rumah` varchar(50) DEFAULT 'Sedang',
  `akses_air_bersih` tinyint(1) DEFAULT '0',
  `akses_listrik` tinyint(1) DEFAULT '0',
  `akses_kesehatan` tinyint(1) DEFAULT '0',
  `anak_putus_sekolah` tinyint(1) DEFAULT '0',
  `surveyor` varchar(100) DEFAULT NULL,
  `keterangan` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `kemiskinan`
--

LOCK TABLES `kemiskinan` WRITE;
/*!40000 ALTER TABLE `kemiskinan` DISABLE KEYS */;
INSERT INTO `kemiskinan` VALUES (12,'Budi Santoso','1980-05-12','SD','Hipertensi',4,'Jl. Komyos Sudarso, Sungai Jawi, Pontianak Barat','Sudah Ditangani',-0.0285000,109.3158000,'Buruk',1,1,0,1,'Surveyor A','Butuh bedah rumah','2026-06-08 03:53:39','2026-06-08 10:07:45'),(13,'Siti Aminah','1975-08-22','SMP','Tidak Ada',3,'Jl. Tanjung Raya II, Pontianak Timur','Belum Ditangani',-0.0415000,109.3625000,'Sedang',0,1,1,0,'Surveyor B','Bantuan Sembako','2026-06-08 03:53:40','2026-06-08 03:57:09'),(14,'Ahmad Hidayat','1982-11-03','Tidak Sekolah','Asma',5,'Jl. Ya\' M. Sabran, Pontianak Timur','Belum Ditangani',-0.0355000,109.3710000,'Buruk',0,0,0,2,'Surveyor A','Miskin Ekstrem','2026-06-08 03:53:40','2026-06-08 03:57:09'),(15,'Rina Wati','1990-01-15','SMA','Tidak Ada',2,'Jl. Khatulistiwa, Siantan, Pontianak Utara','Belum Ditangani',-0.0085000,109.3390000,'Sedang',1,1,1,0,'Surveyor C','Bantuan Tunai','2026-06-08 03:53:40','2026-06-08 03:57:09'),(16,'Hasan Basri','1978-04-10','SD','Diabetes',6,'Jl. Apel, Sungai Beliung, Pontianak Barat','Diproses',-0.0190000,109.3120000,'Buruk',1,1,1,1,'Surveyor A','Bantuan PKH','2026-06-08 03:53:40','2026-06-08 07:28:22'),(17,'Sujono','1985-09-30','SMP','Tidak Ada',4,'Jl. Budi Utomo, Siantan Tengah, Pontianak Utara','Belum Ditangani',-0.0075000,109.3320000,'Sedang',1,1,1,0,'Surveyor C','Bantuan Modal Usaha','2026-06-08 03:53:40','2026-06-08 03:57:09'),(18,'Maimunah','1970-12-12','SD','Reumatik',3,'Jl. Panglima Aim, Dalam Bugis, Pontianak Timur','Belum Ditangani',-0.0335000,109.3675000,'Buruk',0,1,0,1,'Surveyor B','Bantuan Sembako','2026-06-08 03:53:40','2026-06-08 03:57:09'),(19,'Supriadi','1988-02-25','SMA','Tidak Ada',5,'Jl. Tabrani Ahmad, Sungai Beliung, Pontianak Barat','Belum Ditangani',-0.0440000,109.3055000,'Sedang',1,1,1,0,'Surveyor A','Bantuan Pendidikan','2026-06-08 03:53:40','2026-06-08 03:57:09'),(20,'Fitriani','1992-07-08','SMP','Maag',4,'Jl. Purnama, Benua Melayu Laut, Pontianak Selatan','Belum Ditangani',-0.0535000,109.3295000,'Buruk',1,1,1,0,'Surveyor D','Bantuan Bedah Rumah','2026-06-08 03:53:40','2026-06-08 03:57:09'),(21,'Kusnadi','1983-06-18','SD','Hipertensi',5,'Jl. Perdana, Bangka Belitung, Pontianak Tenggara','Belum Ditangani',-0.0610000,109.3510000,'Buruk',1,0,1,2,'Surveyor D','Miskin Ekstrem','2026-06-08 03:53:40','2026-06-08 03:57:09'),(23,'Ahmad',NULL,'','aa',5,'Jalan Rajawali, Tengah, Pontianak Kota, Pontianak, Kalimantan Barat, Kalimantan, 78112, Indonesia','Belum Ditangani',-0.0218230,109.3347359,'Sedang',0,0,1,0,'iman','-','2026-06-08 03:59:49','2026-06-08 03:59:49'),(25,'anto',NULL,'','Sehat',4,'Jalan Kutilang, Tengah, Pontianak Kota, Pontianak, Kalimantan Barat, Kalimantan, 78112, Indonesia','Belum Ditangani',-0.0236190,109.3321609,'Buruk',1,0,0,0,'aji','-','2026-06-08 04:03:21','2026-06-08 04:03:21'),(26,'Azman','2026-06-05','','Sehat',5,'Akcaya, Pontianak Selatan, Pontianak, Kalimantan Barat, Kalimantan, 78116, Indonesia','Belum Ditangani',-0.0434580,109.3264960,'Buruk',0,0,0,1,'ojan','-','2026-06-08 04:11:58','2026-06-08 04:12:29'),(28,'Azman','2026-06-05','SMA/Sederajat','',1,'Jalan Cendrawasih, Tengah, Pontianak Kota, Pontianak, Kalimantan Barat, Kalimantan, 78112, Indonesia','Belum Ditangani',-0.0251649,109.3321609,'Sedang',1,0,0,0,'','','2026-06-08 10:18:06','2026-06-08 10:18:06'),(29,'',NULL,'','',1,'','Belum Ditangani',0.0000000,0.0000000,'Sedang',0,0,0,0,'','','2026-06-08 14:49:14','2026-06-08 14:49:14'),(30,'anton','1994-03-02','','',1,'Tengah, Pontianak Kota, Pontianak, Kalimantan Barat, Kalimantan, 78244, Indonesia','Belum Ditangani',-0.0249931,109.3269253,'Sedang',0,0,0,0,'','','2026-06-08 15:55:01','2026-06-08 15:55:01'),(31,'salim','2026-06-08','SMA/Sederajat','Sehat',1,'Sungai Jawi Dalam, Pontianak Barat, Pontianak, Kalimantan Barat, Kalimantan, 78244, Indonesia','Belum Ditangani',-0.0186382,109.3237495,'Sedang',1,0,0,0,'xx','','2026-06-08 16:14:21','2026-06-08 16:14:21');
/*!40000 ALTER TABLE `kemiskinan` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `laporan_masyarakat`
--

DROP TABLE IF EXISTS `laporan_masyarakat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `laporan_masyarakat` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama_pelapor` varchar(150) NOT NULL,
  `kontak` varchar(50) DEFAULT NULL,
  `deskripsi_laporan` text NOT NULL,
  `alamat` text,
  `foto` varchar(255) DEFAULT NULL,
  `status` enum('menunggu','diproses','selesai') NOT NULL DEFAULT 'menunggu',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `laporan_masyarakat`
--

LOCK TABLES `laporan_masyarakat` WRITE;
/*!40000 ALTER TABLE `laporan_masyarakat` DISABLE KEYS */;
INSERT INTO `laporan_masyarakat` VALUES (2,'FIRA','-','Meminta bantuan',NULL,'','menunggu','2026-06-08 05:40:22','2026-06-08 05:40:22');
/*!40000 ALTER TABLE `laporan_masyarakat` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `rumah_ibadah`
--

DROP TABLE IF EXISTS `rumah_ibadah`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `rumah_ibadah` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nama_rumah_ibadah` varchar(200) NOT NULL,
  `jenis` varchar(50) DEFAULT 'Masjid',
  `penanggung_jawab` varchar(200) NOT NULL,
  `alamat` text NOT NULL,
  `radius` int NOT NULL DEFAULT '500',
  `lat` decimal(10,7) NOT NULL,
  `lng` decimal(10,7) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `rumah_ibadah`
--

LOCK TABLES `rumah_ibadah` WRITE;
/*!40000 ALTER TABLE `rumah_ibadah` DISABLE KEYS */;
INSERT INTO `rumah_ibadah` VALUES (1,'Masjid Raya Mujahidin Pontianak','Masjid','Yayasan Mujahidin','Jl. Jenderal Ahmad Yani, Pontianak Selatan',1000,-0.0427000,109.3372000,'2026-06-08 03:48:27','2026-06-08 03:48:27'),(2,'Masjid Jami\' Kesultanan Pontianak','Masjid','Kesultanan Kadriah','Dalam Bugis, Pontianak Timur',800,-0.0267380,109.3476780,'2026-06-08 03:48:27','2026-06-08 03:48:27'),(3,'Gereja Katedral St. Yosef Pontianak','Masjid','Keuskupan Agung Pontianak','Jl. Pattimura, Darat Sekip, Pontianak Kota',1000,-0.0275620,109.3385680,'2026-06-08 03:48:27','2026-06-08 03:48:27'),(4,'Vihara Bodhisatva Karaniya Metta','Masjid','Yayasan Kelenteng Tiga','Jl. Kapten Marsan No.33, Darat Sekip, Pontianak Kota',600,-0.0236640,109.3421820,'2026-06-08 03:48:27','2026-06-08 03:48:27'),(5,'Kelenteng Kwan Tie Bio','Masjid','Yayasan Kwan Tie Bio','Jl. Diponegoro No. 104, Pontianak Selatan',500,-0.0205600,109.3413900,'2026-06-08 03:50:31','2026-06-08 03:50:31'),(6,'Maha Vihara Maitreya','Masjid','Yayasan Maitreya Pontianak','Jl. Jend. A. Yani II, Kubu Raya / Pontianak',1200,-0.0732660,109.3649050,'2026-06-08 03:50:31','2026-06-08 03:50:31'),(7,'Gereja HKBP Pontianak','Masjid','Resort Pontianak','Jl. Pulau We No. 181, Pontianak Selatan',700,-0.0480550,109.3197220,'2026-06-08 03:50:31','2026-06-08 03:50:31'),(8,'Masjid Jami\' At-Taqwa','Masjid','Pengurus Masjid At-Taqwa','Jl. Gusti Situt Mahmud, Pontianak Utara',800,-0.0186000,109.3480000,'2026-06-08 03:50:31','2026-06-08 03:50:31'),(9,'Masjid Al-Jihad','Masjid','Pengurus Masjid Al-Jihad','Jl. Gusti Johan Idrus, Pontianak Selatan',800,-0.0391660,109.3286110,'2026-06-08 03:51:56','2026-06-08 03:51:56'),(10,'Gereja Katolik Keluarga Kudus','Masjid','Paroki Kota Baru','Jl. Sutan Syahrir No. 1, Pontianak Selatan',900,-0.0435000,109.3235000,'2026-06-08 03:51:56','2026-06-08 03:51:56'),(11,'Vihara Paticca Samuppada','Masjid','Pengurus Kelenteng Gang Waru','Jl. WR Supratman, Pontianak Selatan',600,-0.0322220,109.3363890,'2026-06-08 03:51:56','2026-06-08 03:51:56'),(12,'Pura Giripati Mulawarman','Masjid','Banjar Pontianak','Jl. Adi Sucipto, Sungai Raya',1500,-0.0833000,109.3833000,'2026-06-08 03:51:56','2026-06-08 03:51:56'),(13,'masjid','Masjid','destra','Gang Muria, Sungai Jawi Dalam, Pontianak Barat, Pontianak, Kalimantan Barat, Kalimantan, 78244, Indonesia',800,-0.0186830,109.3264850,'2026-06-08 16:14:42','2026-06-08 16:14:42');
/*!40000 ALTER TABLE `rumah_ibadah` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `password` varchar(255) NOT NULL,
  `nama_lengkap` varchar(200) NOT NULL,
  `role` enum('admin','operator','walikota') NOT NULL DEFAULT 'operator',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'admin','$2y$10$1aCT/zR0YCQnKHI9NrXaj.jkBkfajJCx2GXzkpsI7MUVY8GKE.pim','Admin','admin','2026-05-28 11:34:06'),(2,'walikota','$2y$10$1aCT/zR0YCQnKHI9NrXaj.jkBkfajJCx2GXzkpsI7MUVY8GKE.pim','Walikota Pontianak','walikota','2026-05-30 06:29:29'),(4,'operator','$2y$10$1aCT/zR0YCQnKHI9NrXaj.jkBkfajJCx2GXzkpsI7MUVY8GKE.pim','Operator','operator','2026-06-09 05:30:25');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `warga`
--

DROP TABLE IF EXISTS `warga`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `warga` (
  `id` int NOT NULL AUTO_INCREMENT,
  `kemiskinan_id` int NOT NULL,
  `nik` varchar(50) DEFAULT NULL,
  `nama_warga` varchar(200) NOT NULL,
  `hubungan_keluarga` varchar(100) DEFAULT NULL,
  `tanggal_lahir` date DEFAULT NULL,
  `pendidikan` varchar(100) DEFAULT NULL,
  `riwayat_penyakit` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `kemiskinan_id` (`kemiskinan_id`),
  CONSTRAINT `warga_ibfk_1` FOREIGN KEY (`kemiskinan_id`) REFERENCES `kemiskinan` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `warga`
--

LOCK TABLES `warga` WRITE;
/*!40000 ALTER TABLE `warga` DISABLE KEYS */;
INSERT INTO `warga` VALUES (10,12,NULL,'Budi Santoso','Kepala Keluarga','1980-05-12','SD','Hipertensi','2026-06-08 03:53:39','2026-06-08 03:53:39'),(11,13,NULL,'Siti Aminah','Kepala Keluarga','1975-08-22','SMP','Tidak Ada','2026-06-08 03:53:40','2026-06-08 03:53:40'),(12,14,NULL,'Ahmad Hidayat','Kepala Keluarga','1982-11-03','Tidak Sekolah','Asma','2026-06-08 03:53:40','2026-06-08 03:53:40'),(13,15,NULL,'Rina Wati','Kepala Keluarga','1990-01-15','SMA','Tidak Ada','2026-06-08 03:53:40','2026-06-08 03:53:40'),(14,16,NULL,'Hasan Basri','Kepala Keluarga','1978-04-10','SD','Diabetes','2026-06-08 03:53:40','2026-06-08 03:53:40'),(15,17,NULL,'Sujono','Kepala Keluarga','1985-09-30','SMP','Tidak Ada','2026-06-08 03:53:40','2026-06-08 03:53:40'),(16,18,NULL,'Maimunah','Kepala Keluarga','1970-12-12','SD','Reumatik','2026-06-08 03:53:40','2026-06-08 03:53:40'),(17,19,NULL,'Supriadi','Kepala Keluarga','1988-02-25','SMA','Tidak Ada','2026-06-08 03:53:40','2026-06-08 03:53:40'),(18,20,NULL,'Fitriani','Kepala Keluarga','1992-07-08','SMP','Maag','2026-06-08 03:53:40','2026-06-08 03:53:40'),(19,21,NULL,'Kusnadi','Kepala Keluarga','1983-06-18','SD','Hipertensi','2026-06-08 03:53:40','2026-06-08 03:53:40'),(21,23,NULL,'Ahmad','Kepala Keluarga',NULL,'','aa','2026-06-08 03:59:49','2026-06-08 03:59:49'),(22,25,NULL,'anto','Kepala Keluarga',NULL,'','Sehat','2026-06-08 04:03:21','2026-06-08 04:03:21'),(23,26,NULL,'Azman','Kepala Keluarga',NULL,'','Sehat','2026-06-08 04:11:58','2026-06-08 04:11:58'),(25,28,NULL,'Azman','Kepala Keluarga','2026-06-05','SMA/Sederajat','','2026-06-08 10:18:06','2026-06-08 10:18:06'),(26,29,NULL,'','Kepala Keluarga',NULL,'','','2026-06-08 14:49:14','2026-06-08 14:49:14'),(27,30,NULL,'anton','Kepala Keluarga','1994-03-02','','','2026-06-08 15:55:01','2026-06-08 15:55:01'),(28,31,NULL,'salim','Kepala Keluarga','2026-06-08','SMA/Sederajat','Sehat','2026-06-08 16:14:21','2026-06-08 16:14:21');
/*!40000 ALTER TABLE `warga` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2026-06-09 12:21:11
