-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 07 Jun 2026 pada 10.26
-- Versi server: 10.4.32-MariaDB
-- Versi PHP: 8.0.30

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

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

--
-- Struktur dari tabel `damaged_roads`
--

CREATE TABLE `damaged_roads` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` varchar(50) NOT NULL COMMENT 'Ringan / Sedang / Berat / Kritis',
  `description` text DEFAULT NULL COMMENT 'Keterangan kerusakan',
  `geom` longtext NOT NULL COMMENT 'GeoJSON geometry (Point)',
  `foto` varchar(255) DEFAULT NULL COMMENT 'Nama file foto',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data untuk tabel `damaged_roads`
--

INSERT INTO `damaged_roads` (`id`, `name`, `status`, `description`, `geom`, `foto`, `created_at`) VALUES
(1, 'Kerusakan Jalan Contoh', 'Sedang', 'Aspal berlubang diameter ±50cm, perlu penanganan segera', '{\"type\":\"Point\",\"coordinates\":[109.3420,-0.0210]}', NULL, '2026-06-07 08:20:12');

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

--
-- Struktur dari tabel `parcels`
--

CREATE TABLE `parcels` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` varchar(50) NOT NULL COMMENT 'SHM / HGB / HGU / HP',
  `area_sqm` decimal(15,2) DEFAULT 0.00 COMMENT 'Luas dalam meter persegi',
  `geom` longtext NOT NULL COMMENT 'GeoJSON geometry (Polygon)',
  `foto` varchar(255) DEFAULT NULL COMMENT 'Nama file foto',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data untuk tabel `parcels`
--

INSERT INTO `parcels` (`id`, `name`, `status`, `area_sqm`, `geom`, `foto`, `created_at`) VALUES
(1, 'Persil Tanah SHM Contoh', 'SHM', 4500.00, '{\"type\":\"Polygon\",\"coordinates\":[[[109.3380,-0.0220],[109.3400,-0.0220],[109.3400,-0.0240],[109.3380,-0.0240],[109.3380,-0.0220]]]}', NULL, '2026-06-07 08:20:12');

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

--
-- Struktur dari tabel `roads`
--

CREATE TABLE `roads` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` varchar(50) NOT NULL COMMENT 'Nasional / Provinsi / Kabupaten',
  `length_m` decimal(12,2) DEFAULT 0.00 COMMENT 'Panjang dalam meter',
  `geom` longtext NOT NULL COMMENT 'GeoJSON geometry (LineString)',
  `foto` varchar(255) DEFAULT NULL COMMENT 'Nama file foto',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data untuk tabel `roads`
--

INSERT INTO `roads` (`id`, `name`, `status`, `length_m`, `geom`, `foto`, `created_at`) VALUES
(1, 'Jalan Nasional Contoh', 'Nasional', 1250.00, '{\"type\":\"LineString\",\"coordinates\":[[109.3300,-0.0200],[109.3400,-0.0200],[109.3500,-0.0250]]}', NULL, '2026-06-07 08:20:12'),
(2, 'Jalan Provinsi Contoh', 'Provinsi', 870.50, '{\"type\":\"LineString\",\"coordinates\":[[109.3350,-0.0300],[109.3420,-0.0310]]}', NULL, '2026-06-07 08:20:12');

--
-- Indexes for dumped tables
--

--
-- Indeks untuk tabel `damaged_roads`
--
ALTER TABLE `damaged_roads`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `parcels`
--
ALTER TABLE `parcels`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `roads`
--
ALTER TABLE `roads`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT untuk tabel yang dibuang
--

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

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

--
-- AUTO_INCREMENT untuk tabel `roads`
--
ALTER TABLE `roads`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
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 */;
