-- https://www.phpmyadmin.net/
--
-- Waktu pembuatan: 15 Des 2025 pada 02.34
-- Versi server: 10.4.32-MariaDB
-- Versi PHP: 8.2.12

START TRANSACTION;



--
-- Database: `washpro`
--

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

--
-- Struktur dari tabel `addon_items`
--

CREATE TABLE `addon_items` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `price` int(11) NOT NULL DEFAULT 0,
  `stock` int(11) NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `addon_items`
--

INSERT INTO `addon_items` (`id`, `name`, `price`, `stock`, `is_active`, `created_at`) VALUES
(1, 'Sampo Mobil', 10000, 18, 1, '2025-11-16 22:21:22'),
(2, 'Sampo Motor', 8000, 39, 1, '2025-11-16 22:21:22'),
(3, 'Kit Ban', 8000, 50, 1, '2025-11-16 22:21:22'),
(4, 'Kit Body', 7000, 50, 1, '2025-11-16 22:21:22'),
(5, 'Kanebo', 5000, 50, 1, '2025-11-16 22:21:22'),
(6, 'Lap Microfiber', 4000, 50, 1, '2025-11-16 22:21:22');

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

--
-- Struktur dari tabel `bookings`
--

CREATE TABLE `bookings` (
  `id` int(11) NOT NULL,
  `customer_name` varchar(150) NOT NULL,
  `customer_phone` varchar(30) DEFAULT NULL,
  `vehicle_type` enum('motor','mobil') DEFAULT 'motor',
  `service_id` int(11) DEFAULT NULL,
  `additional_items` text DEFAULT NULL,
  `price` decimal(12,2) NOT NULL,
  `washing_duration` varchar(50) DEFAULT NULL,
  `discount` decimal(12,2) DEFAULT 0.00,
  `final_price` int(11) DEFAULT 0,
  `status` enum('pending','proses','silahkan bawa','sedang dicuci','selesai','batal') NOT NULL DEFAULT 'pending',
  `booked_at` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `age` int(11) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `plate_number` varchar(100) DEFAULT NULL,
  `vehicle_photo` varchar(255) DEFAULT NULL,
  `face_photo` varchar(255) DEFAULT NULL,
  `payment_method` varchar(50) DEFAULT 'cash',
  `payment_status` varchar(30) DEFAULT 'unpaid',
  `payment_txn_id` varchar(100) DEFAULT NULL,
  `payment_proof` varchar(255) DEFAULT NULL,
  `payment_due` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `bookings`
--

INSERT INTO `bookings` (`id`, `customer_name`, `customer_phone`, `vehicle_type`, `service_id`, `additional_items`, `price`, `washing_duration`, `discount`, `final_price`, `status`, `booked_at`, `created_at`, `age`, `address`, `plate_number`, `vehicle_photo`, `face_photo`, `payment_method`, `payment_status`, `payment_txn_id`, `payment_proof`, `payment_due`) VALUES
(93, 'Tes User', '08123456789', 'motor', 1, NULL, 25000.00, NULL, 0.00, 25000, 'batal', '2025-10-14 19:24:33', '2025-10-14 11:24:33', NULL, 'Jl. Uji', 'DD1234AB', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(94, 'Sri Rahayu Rahim', '082158994371', 'motor', 1, '', 20000.00, NULL, 0.00, 20000, 'batal', '2025-10-14 20:03:53', '2025-10-14 12:03:53', 0, '', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(95, 'Muhammad Taufik Kautsar', '085342074849', 'mobil', 4, 'Sampo Mobil (Rp 10.000), Sampo Motor (Rp 8.000), Kit Ban (Rp 8.000), Kit Body (Rp 7.000), Kanebo (Rp 5.000), Lap Microfiber (Rp 4.000)', 97000.00, NULL, 0.00, 97000, 'batal', '2025-10-14 20:14:01', '2025-10-14 12:14:01', 20, 'Pangkajene', 'dp 6996 cj', 'vehicle_1760444041_564787.jpg', 'face_1760444041_8360cf.png', 'cash', 'unpaid', NULL, NULL, NULL),
(96, 'Sri Rahayu Rahim', '082158994371', 'mobil', 3, '', 50000.00, NULL, 0.00, 50000, 'batal', '2025-10-14 20:14:15', '2025-10-14 12:14:15', 0, '', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(97, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, NULL, 0.00, 25000, 'batal', '2025-10-14 20:14:21', '2025-10-14 12:14:21', 0, '', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(98, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, '', 55000.00, NULL, 0.00, 55000, 'batal', '2025-10-14 20:14:26', '2025-10-14 12:14:26', 0, '', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(99, 'Sri Rahayu Rahim', '085342074849', 'mobil', 4, 'Sampo Mobil (Rp 10.000), Sampo Motor (Rp 8.000), Kit Ban (Rp 8.000), Kit Body (Rp 7.000), Kanebo (Rp 5.000), Lap Microfiber (Rp 4.000)', 97000.00, NULL, 0.00, 97000, 'proses', '2025-10-14 20:15:16', '2025-10-14 12:15:16', 20, 'Pangkajene', 'dp 153 tk', 'vehicle_1760444116_34a6c1.jpg', 'face_1760444116_9295b4.png', 'cash', 'unpaid', NULL, NULL, NULL),
(100, 'Muhmmad Taufik Kautsar', '085934791155', 'mobil', 4, 'Sampo Mobil (Rp 10.000), Sampo Motor (Rp 8.000), Kit Ban (Rp 8.000), Kit Body (Rp 7.000), Kanebo (Rp 5.000), Lap Microfiber (Rp 4.000)', 97000.00, NULL, 0.00, 97000, 'batal', '2025-10-15 12:19:54', '2025-10-15 04:19:54', 20, 'Pangkajene', 'dp 1234 tk', 'vehicle_1760501994_e41ab3.png', NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(101, 'Muhmmad Taufik Kautsar', '085342074849', 'motor', 1, 'Sampo Mobil (Rp 10.000), Sampo Motor (Rp 8.000), Kit Ban (Rp 8.000), Kit Body (Rp 7.000), Kanebo (Rp 5.000), Lap Microfiber (Rp 4.000)', 62000.00, NULL, 0.00, 62000, 'batal', '2025-10-15 12:31:52', '2025-10-15 04:31:52', 20, 'Pangkajene', 'dp 1234 tk', 'vehicle_1760502712_35ce7f.jpg', NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(102, 'Muhmmad Taufik Kautsar', '085934791155', 'mobil', 4, 'Sampo Mobil (Rp 10.000), Sampo Motor (Rp 8.000), Kit Ban (Rp 8.000), Kit Body (Rp 7.000), Kanebo (Rp 5.000), Lap Microfiber (Rp 4.000)', 97000.00, NULL, 0.00, 97000, 'batal', '2025-10-15 12:53:42', '2025-10-15 04:53:42', 0, 'Pangkajene', 'dd 2626 tk', 'vehicle_1760504022_8c4e0e.png', NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(103, 'Muhmmad Taufik Kautsar', '085934791155', 'motor', 2, 'Kanebo (Rp 5.000), Lap Microfiber (Rp 4.000)', 34000.00, NULL, 0.00, 34000, 'batal', '2025-10-15 13:27:53', '2025-10-15 05:27:53', 21, 'Rappang', 'dp 1234 tk', 'vehicle_1760506073_836e3e.png', NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(104, 'Muhmmad Taufik Kautsar', '085934791155', 'motor', 1, '', 20000.00, NULL, 0.00, 20000, 'batal', '2025-10-15 13:44:11', '2025-10-15 05:44:11', 0, '', '', 'vehicle_1760507051_b92683.jpg', 'face_1760507051_07247d.png', 'cash', 'unpaid', NULL, NULL, NULL),
(105, 'Muhmmad Taufik Kautsar', '085934791155', 'mobil', 1, '', 20000.00, NULL, 0.00, 20000, 'batal', '2025-10-15 13:44:28', '2025-10-15 05:44:28', 0, '', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(106, 'Sri Rahayu', '082218397317', 'motor', 1, 'Sampo Mobil (Rp 10.000), Sampo Motor (Rp 8.000), Kit Ban (Rp 8.000), Kit Body (Rp 7.000), Kanebo (Rp 5.000), Lap Microfiber (Rp 4.000)', 62000.00, NULL, 0.00, 62000, 'selesai', '2025-10-16 08:46:08', '2025-10-16 00:46:08', 20, 'Akakae', 'd 4567 tk', 'vehicle_1760575568_e10232.jpg', 'face_1760575568_62e643.png', 'cash', 'unpaid', NULL, NULL, NULL),
(107, 'Muhmmad Taufik Kautsar', '085934791155', 'mobil', 4, 'Sampo Mobil (Rp 10.000), Sampo Motor (Rp 8.000), Kit Ban (Rp 8.000), Kit Body (Rp 7.000), Kanebo (Rp 5.000), Lap Microfiber (Rp 4.000)', 97000.00, NULL, 0.00, 97000, 'selesai', '2025-10-16 20:22:04', '2025-10-16 12:22:04', 20, 'Baranti', 'dp 1234 tk', 'vehicle_1760617324_e3bc41.jpg', 'face_1760617324_5b9ce4.png', 'cash', 'unpaid', NULL, NULL, NULL),
(108, 'Muhmmad Taufik', '085939092048', 'mobil', 4, 'Sampo Mobil x5, Sampo Motor x2, Kit Ban x1, Kit Body x3, Kanebo x3, Lap Microfiber x3', 177000.00, NULL, 17700.00, 159300, 'selesai', '2025-10-19 14:56:10', '2025-10-19 06:56:10', 21, 'PAngakejene', 'dd 2626 tk', 'vehicle_1760856970_3edf3c.jpg', 'face_1760856970_279f4f.png', 'cash', 'unpaid', NULL, NULL, NULL),
(109, 'Muhmmad Taufik', '085939092048', 'mobil', 4, 'Sampo Mobil x2, Kit Ban x2, Lap Microfiber x3', 103000.00, NULL, 10300.00, 92700, 'selesai', '2025-10-20 12:24:15', '2025-10-20 04:24:15', 20, 'pinrang', 'dp 6996 cj', 'vehicle_1760934255_94dc28.jpg', 'face_1760934255_4ffe5e.png', 'cash', 'unpaid', NULL, NULL, NULL),
(110, 'Risna Herman', '0895351623764', 'mobil', 4, 'Sampo Mobil x10', 155000.00, NULL, 15500.00, 139500, 'selesai', '2025-10-21 11:52:28', '2025-10-21 03:52:28', 20, 'Pangkajene', 'dp 3456 tk', 'vehicle_1761018748_7e7dc5.jpg', 'face_1761018748_0b113e.png', 'cash', 'unpaid', NULL, NULL, NULL),
(111, 'M Dhiya', '085321604395', 'mobil', 4, 'Sampo Mobil x2, Sampo Motor x1, Kit Ban x1, Kit Body x1, Kanebo x1, Lap Microfiber x1', 107000.00, NULL, 10700.00, 96300, 'selesai', '2025-10-21 12:20:39', '2025-10-21 04:20:39', 21, 'Bendoro', 'dp 1254 tk', 'vehicle_1761020439_a6a9f7.jpg', NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(112, 'Muhmmad Taufik', '085939092048', 'mobil', 4, 'Sampo Mobil x6', 115000.00, NULL, 11500.00, 103500, 'selesai', '2025-10-21 14:34:20', '2025-10-21 06:34:20', 20, 'pkj', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(113, 'Sri Rahayu Rahim1', '082218397317', 'mobil', 4, 'Sampo Mobil x2, Sampo Motor x1, Kit Ban x1, Kit Body x1, Kanebo x1, Lap Microfiber x1', 107000.00, NULL, 10700.00, 96300, 'selesai', '2025-10-21 15:43:07', '2025-10-21 07:43:07', 20, 'pkj', 'dp123dd', 'vehicle_1761032587_9977fc.jpg', 'face_1761032587_0fa042.png', 'cash', 'unpaid', NULL, NULL, NULL),
(114, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, 'Sampo Mobil x5', 105000.00, NULL, 10500.00, 94500, 'selesai', '2025-10-24 23:37:33', '2025-10-24 15:37:33', 0, 'pkj', 'dp 1234 tk', 'vehicle_1761320253_1b6532.jpg', 'face_1761320253_467b4f.png', 'cash', 'unpaid', NULL, NULL, NULL),
(115, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, 'Sampo Mobil x5', 105000.00, NULL, 10500.00, 94500, 'proses', '2025-10-28 09:21:16', '2025-10-28 01:21:16', 200, 'Pangkajene', 'dd 2126 tk', 'vehicle_1761614476_5d1b75.png', 'face_1761614476_a07d7a.png', 'cash', 'unpaid', NULL, NULL, NULL),
(116, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, 'Sampo Mobil x5', 105000.00, NULL, 10500.00, 94500, 'proses', '2025-10-28 09:32:20', '2025-10-28 01:32:20', 300, 'Pangkajene', 'dp 6996 cj', NULL, 'face_1761615140_dbc103.png', 'cash', 'unpaid', NULL, NULL, NULL),
(117, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, 'Sampo Mobil x10', 155000.00, NULL, 15500.00, 139500, 'batal', '2025-10-28 09:34:19', '2025-10-28 01:34:19', 100, 'Pangkajene', 'dp 1234 tk', NULL, 'face_1761615259_565e1c.png', 'cash', 'unpaid', NULL, NULL, NULL),
(118, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, 'Sampo Mobil x5', 105000.00, NULL, 10500.00, 94500, 'selesai', '2025-10-28 10:10:09', '2025-10-28 02:10:09', 21, 'Pangkajene', 'dp123tk', 'vehicle_1761617409_13d2c1.png', 'face_1761617409_c9f554.png', 'cash', 'unpaid', NULL, NULL, NULL),
(119, 'Risna Herman', '085342074849', 'motor', 1, 'Sampo Mobil x1, Kit Ban x1', 38000.00, NULL, 0.00, 38000, 'selesai', '2025-10-28 15:30:00', '2025-10-28 07:30:00', 20, 'pkj', 'dp 1234 tk', 'vehicle_1761636600_cb88df.png', 'face_1761636600_21ce9d.png', 'cash', 'unpaid', NULL, NULL, NULL),
(120, 'Sri Rahayu Rahim', '082158994371', 'motor', 1, '', 20000.00, NULL, 0.00, 20000, 'batal', '2025-10-30 15:29:41', '2025-10-30 07:29:41', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(121, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, NULL, 0.00, 25000, 'batal', '2025-11-02 20:37:38', '2025-11-02 12:37:38', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(122, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, 'Sampo Mobil x5', 105000.00, NULL, 10500.00, 94500, 'proses', '2025-11-02 20:40:37', '2025-11-02 12:40:37', 20, 'Pangkajene', 'dp123tk', 'vehicle_1762087237_50d290.png', NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(123, 'Muhmmad Taufik Kautsar', '085939092048', 'mobil', 4, 'Sampo Mobil x5', 105000.00, '2 jam', 10500.00, 94500, 'selesai', '2025-11-04 01:18:45', '2025-11-03 17:18:45', 20, 'Pangkajene', 'dd 2626 tk', 'vehicle_1762190325_1dc4e7.jpg', 'face_1762190325_9e5a59.png', 'cash', 'unpaid', NULL, NULL, NULL),
(124, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, '', 55000.00, '2 jam', 0.00, 55000, 'batal', '2025-11-07 00:09:02', '2025-11-06 16:09:02', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(125, 'Sri Rahayu Rahim', '082158994371', 'motor', 1, '', 20000.00, '30 menit', 0.00, 20000, 'batal', '2025-11-11 13:22:06', '2025-11-11 05:22:06', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(126, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, '', 55000.00, '2 jam', 0.00, 55000, 'batal', '2025-11-11 13:41:33', '2025-11-11 05:41:33', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(127, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, '', 55000.00, '2 jam', 0.00, 55000, 'batal', '2025-11-11 13:50:32', '2025-11-11 05:50:32', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(128, 'Sri Rahayu Rahim', '082158994371', 'motor', 1, 'Sampo Motor x11', 108000.00, '30 menit', 10800.00, 97200, 'batal', '2025-11-11 13:51:55', '2025-11-11 05:51:55', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(129, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, 'Sampo Motor x51', 433000.00, '50 menit', 43300.00, 389700, 'batal', '2025-11-16 22:22:54', '2025-11-16 14:22:54', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(130, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, 'Kit Ban x50', 425000.00, '50 menit', 42500.00, 382500, 'batal', '2025-11-16 22:39:07', '2025-11-16 14:39:07', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(131, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, 'Sampo Mobil x30', 325000.00, '50 menit', 32500.00, 292500, 'batal', '2025-11-18 08:53:43', '2025-11-18 00:53:43', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(132, 'Sri Rahayu Rahim', '082158994371', '', NULL, '{\"workshop\":{\"type\":\"workshop\",\"id\":2,\"name\":\"Servis #2\",\"kilometer\":\"\",\"complaint\":\"\",\"oil_type\":\"\"},\"addons\":[]}', 0.00, 'Estimasi 1 jam', 0.00, 0, 'batal', '2025-11-25 10:02:09', '2025-11-25 02:02:09', NULL, '', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(133, 'Sri Rahayu Rahim', '082158994371', 'motor', 1, '', 20000.00, '30 menit', 0.00, 20000, 'batal', '2025-11-25 10:02:37', '2025-11-25 02:02:37', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(134, 'Sri Rahayu Rahim', '082158994371', '', NULL, '{\"workshop\":{\"type\":\"workshop\",\"id\":2,\"name\":\"Servis #2\",\"kilometer\":\"\",\"complaint\":\"\",\"oil_type\":\"\"},\"addons\":[]}', 0.00, 'Estimasi 1 jam', 0.00, 0, 'batal', '2025-11-25 10:12:53', '2025-11-25 02:12:53', NULL, '', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(135, 'Sri Rahayu Rahim', '082158994371', '', NULL, '{\"workshop\":{\"type\":\"workshop\",\"id\":2,\"name\":\"Servis #2\",\"kilometer\":\"\",\"complaint\":\"\",\"oil_type\":\"\"},\"addons\":[]}', 0.00, 'Estimasi 1 jam', 0.00, 0, 'batal', '2025-11-25 10:20:56', '2025-11-25 02:20:56', NULL, '', '', NULL, NULL, 'cash', 'unpaid', NULL, NULL, NULL),
(136, 'Sri Rahayu Rahim', '082158994371', 'motor', 1, '', 20000.00, '30 menit', 0.00, 20000, 'batal', '2025-11-25 10:28:24', '2025-11-25 02:28:24', 0, 'Pangkajene', '', NULL, NULL, 'qris', 'pending', NULL, NULL, NULL),
(137, 'Sri Rahayu Rahim', '082158994371', '', NULL, '{\"workshop\":{\"type\":\"workshop\",\"id\":4,\"name\":\"Servis #4\",\"kilometer\":\"\",\"complaint\":\"\",\"oil_type\":\"\"},\"addons\":[]}', 0.00, 'Estimasi 1 jam', 0.00, 0, 'batal', '2025-11-25 10:40:22', '2025-11-25 02:40:22', NULL, '', '', NULL, NULL, 'ewallet', 'unpaid', NULL, NULL, NULL),
(138, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, '', 55000.00, '2 jam', 0.00, 55000, 'batal', '2025-11-25 10:40:53', '2025-11-25 02:40:53', 21, 'Pangkajene', 'dd 2345 ci', NULL, NULL, 'transfer', 'unpaid', NULL, NULL, NULL),
(139, 'Sri Rahayu Rahim', '082158994371', '', NULL, '{\"workshop\":{\"type\":\"workshop\",\"id\":2,\"name\":\"Servis #2\",\"kilometer\":\"\",\"complaint\":\"\",\"oil_type\":\"\"},\"addons\":[]}', 0.00, 'Estimasi 1 jam', 0.00, 0, 'batal', '2025-12-02 11:26:06', '2025-12-02 03:26:06', NULL, '', '', NULL, NULL, 'cash', 'pending', NULL, NULL, NULL),
(140, 'Sri Rahayu Rahim', '082158994371', 'motor', 1, '', 20000.00, '30 menit', 0.00, 20000, 'batal', '2025-12-02 11:26:37', '2025-12-02 03:26:37', 0, 'Pangkajene', '', NULL, NULL, 'bank_transfer', 'pending', NULL, NULL, '2025-12-02 17:26:37'),
(141, 'Sri Rahayu Rahim', '082158994371', '', NULL, '{\"workshop\":{\"type\":\"workshop\",\"id\":1,\"name\":\"Servis #1\",\"kilometer\":\"\",\"complaint\":\"\",\"oil_type\":\"\"},\"addons\":[]}', 0.00, 'Estimasi 1 jam', 0.00, 0, 'batal', '2025-12-02 11:31:31', '2025-12-02 03:31:31', NULL, '', '', NULL, NULL, 'virtual_account', 'pending', NULL, NULL, NULL),
(142, 'Risna Herman', '085342074849', '', NULL, '{\"workshop\":{\"type\":\"workshop\",\"id\":1,\"name\":\"Servis #1\",\"kilometer\":\"\",\"complaint\":\"\",\"oil_type\":\"\"},\"addons\":[\"Sampo Mobil x2\",\"Sampo Motor x1\"]}', 28000.00, 'Estimasi 1 jam', 0.00, 28000, 'batal', '2025-12-02 11:52:14', '2025-12-02 03:52:14', NULL, '', '2345', NULL, NULL, 'bank_transfer', 'pending', NULL, NULL, NULL),
(143, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, 'Sampo Mobil x10', 125000.00, '50 menit', 12500.00, 112500, 'selesai', '2025-12-06 10:53:51', '2025-12-06 02:53:51', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'pending', NULL, NULL, NULL),
(144, 'Sri Rahayu Rahim', '082158994371', 'motor', 1, 'Sampo Mobil x10', 120000.00, '30 menit', 12000.00, 108000, 'batal', '2025-12-06 10:56:45', '2025-12-06 02:56:45', 22, 'Pangkajene', 'dd 2626 tk', 'vehicle_1764989805_34fbc7.jpeg', NULL, 'qris', 'pending', NULL, NULL, NULL),
(145, 'Muhmmad Taufik Kautsar', '085939092048', 'motor', 2, '', 25000.00, '50 menit', 0.00, 25000, 'batal', '2025-12-14 22:29:05', '2025-12-14 14:29:05', 0, 'Pangkajene', '', NULL, NULL, 'bri', 'pending', NULL, NULL, '2025-12-15 04:29:05'),
(146, 'Muhmmad Taufik Kautsar', '085939092048', 'motor', 2, '', 25000.00, '50 menit', 0.00, 25000, 'batal', '2025-12-14 23:16:40', '2025-12-14 15:16:40', 0, 'Pangkajene', '', NULL, NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 02:16:40'),
(147, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 25000, 'batal', '2025-12-15 01:13:20', '2025-12-14 17:13:20', 0, 'Pangkajene', '', NULL, NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 04:13:20'),
(148, 'Sri Rahayu Rahim', '082158994371', 'motor', 1, '', 20000.00, '30 menit', 0.00, 20000, 'proses', '2025-12-15 01:13:44', '2025-12-14 17:13:44', 0, 'Pangkajene', '', 'vehicle_1765732424_01c338.png', NULL, 'cash', 'pending', NULL, NULL, NULL),
(149, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 25000, 'batal', '2025-12-15 01:20:24', '2025-12-14 17:20:24', 0, 'Pangkajene', '', 'vehicle_1765732824_69c918.png', NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 04:20:24'),
(150, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 25000, 'batal', '2025-12-15 01:20:57', '2025-12-14 17:20:57', 0, 'Pangkajene', '', 'vehicle_1765732857_1ef271.png', NULL, 'dana', 'pending', NULL, 'bukti_test.png', '2025-12-15 04:20:57'),
(151, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 25000, 'batal', '2025-12-15 01:28:00', '2025-12-14 17:28:00', 0, 'Pangkajene', '', NULL, NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 04:28:00'),
(152, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 25000, 'batal', '2025-12-15 01:36:00', '2025-12-14 17:36:00', 0, 'Pangkajene', '', 'vehicle_1765733760_a4fffc.png', 'face_1765733760_bf6d66.png', 'dana', 'pending', NULL, NULL, '2025-12-15 04:36:00'),
(153, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, '', 55000.00, '2 jam', 0.00, 55000, 'batal', '2025-12-15 01:39:32', '2025-12-14 17:39:32', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'pending', NULL, NULL, NULL),
(154, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 25000, 'batal', '2025-12-15 01:39:51', '2025-12-14 17:39:51', 0, 'Pangkajene', '', NULL, NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 04:39:51'),
(155, 'Sri Rahayu Rahim', '082158994371', 'motor', 1, '', 20000.00, '30 menit', 0.00, 20000, 'batal', '2025-12-15 01:45:10', '2025-12-14 17:45:10', 0, 'Pangkajene', '', NULL, NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 04:45:10'),
(156, 'Sri Rahayu Rahim', '082158994371', 'mobil', 4, '', 55000.00, '2 jam', 0.00, 55000, 'batal', '2025-12-15 01:53:55', '2025-12-14 17:53:55', 0, 'Pangkajene', '', NULL, NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 04:53:55'),
(157, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 25000, 'batal', '2025-12-15 01:55:58', '2025-12-14 17:55:58', 0, 'Pangkajene', '', NULL, NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 04:55:58'),
(158, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 25000, 'pending', '2025-12-15 08:38:37', '2025-12-15 00:38:37', 0, 'Pangkajene', '', NULL, NULL, 'cash', 'pending', NULL, NULL, NULL),
(159, 'Sri Rahayu Rahim', '082158994371', 'mobil', 3, '', 50000.00, '1 jam', 0.00, 0, 'pending', '2025-12-15 08:39:56', '2025-12-15 00:39:56', 0, 'Pangkajene', '', NULL, NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 11:39:56'),
(160, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 0, 'pending', '2025-12-15 08:55:39', '2025-12-15 00:55:39', 0, 'Pangkajene', '', NULL, NULL, 'bri', 'pending', NULL, NULL, '2025-12-15 14:55:39'),
(161, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 0, 'pending', '2025-12-15 09:00:21', '2025-12-15 01:00:21', 0, 'Pangkajene', '', 'vehicle_1765760421_0a4a1d.png', NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 12:00:21'),
(162, 'Sri Rahayu Rahim', '082158994371', 'motor', 2, '', 25000.00, '50 menit', 0.00, 0, 'pending', '2025-12-15 09:15:00', '2025-12-15 01:15:00', 0, 'Pangkajene', '', NULL, NULL, 'dana', 'pending', NULL, NULL, '2025-12-15 12:15:00');

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

--
-- Struktur dari tabel `payments`
--

CREATE TABLE `payments` (
  `id` int(11) NOT NULL,
  `booking_id` int(11) NOT NULL,
  `method` varchar(50) NOT NULL,
  `amount` int(11) NOT NULL,
  `status` varchar(30) NOT NULL,
  `txn_id` varchar(100) DEFAULT NULL,
  `meta` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`meta`)),
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Struktur dari tabel `reviews`
--

CREATE TABLE `reviews` (
  `id` int(11) NOT NULL,
  `booking_id` int(11) NOT NULL,
  `customer_name` varchar(100) DEFAULT NULL,
  `rating` enum('puas','tidak puas') DEFAULT 'puas',
  `comment` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `reviews`
--

INSERT INTO `reviews` (`id`, `booking_id`, `customer_name`, `rating`, `comment`, `created_at`) VALUES
(2, 106, 'Sri Rahayu', 'puas', 'hasilnya sangat bersih dan tidak ada baret', '2025-10-16 03:15:34'),
(3, 107, 'Muhmmad Taufik Kautsar', 'tidak puas', 'mobil saya lecet', '2025-10-16 12:33:54'),
(4, 108, 'Muhmmad Taufik', 'puas', 'bersih', '2025-10-19 07:33:55'),
(5, 109, 'Muhmmad Taufik', 'puas', 'bersih dan wangi', '2025-10-20 04:25:48'),
(6, 110, 'Risna Herman', 'puas', 'bagus dan bersih', '2025-10-21 03:53:26'),
(7, 111, 'M Dhiya', 'puas', 'bersih', '2025-10-21 04:26:50'),
(8, 112, 'Muhmmad Taufik', 'puas', 'bersih', '2025-10-21 06:36:49'),
(9, 113, 'Sri Rahayu Rahim1', 'tidak puas', 'Kurang Bersi', '2025-10-21 07:46:55'),
(10, 114, 'Sri Rahayu Rahim', 'puas', 'bagus', '2025-10-24 15:42:02'),
(11, 118, 'Sri Rahayu Rahim', 'puas', 'bagus', '2025-10-28 02:25:06'),
(12, 123, 'Muhmmad Taufik Kautsar', 'puas', 'puas', '2025-11-03 17:19:57'),
(13, 143, 'Sri Rahayu Rahim', 'puas', 'bagus', '2025-12-06 02:54:49');

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

--
-- Struktur dari tabel `services`
--

CREATE TABLE `services` (
  `id` int(11) NOT NULL,
  `name` varchar(150) NOT NULL,
  `description` text DEFAULT NULL,
  `price` decimal(12,2) NOT NULL,
  `vehicle_type` enum('motor','mobil') NOT NULL DEFAULT 'motor',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `services`
--

INSERT INTO `services` (`id`, `name`, `description`, `price`, `vehicle_type`, `created_at`) VALUES
(1, 'Cuci Motor Biasa', 'Pencucian Motor Standar', 20000.00, 'motor', '2025-10-14 11:24:23'),
(2, 'Cuci Motor Reguler', 'Pencucian Motor Detail', 25000.00, 'motor', '2025-10-14 11:24:23'),
(3, 'Cuci Mobil Biasa', 'Pencucian Mobil Standar', 50000.00, 'mobil', '2025-10-14 11:24:23'),
(4, 'Cuci Mobil Reguler', 'Pencucian Mobil Detail', 55000.00, 'mobil', '2025-10-14 11:24:23');

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

--
-- Struktur dari tabel `settings`
--

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `key_name` varchar(100) NOT NULL,
  `value_text` text DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `settings`
--

INSERT INTO `settings` (`id`, `key_name`, `value_text`, `updated_at`) VALUES
(1, 'store_name', 'WashPro', '2025-11-07 01:25:45'),
(2, 'store_address', 'Rappang', '2025-11-07 01:25:45'),
(3, 'store_phone', '085342074849', '2025-11-07 01:25:45'),
(4, 'admin_whatsapp', '6285342074849', '2025-11-07 01:25:45'),
(5, 'instagram', 'https://www.instagram.com/reel/DP3two8E-n0/?igsh=ZWIwMHBqdnhpZnhu', '2025-11-07 01:25:45'),
(6, 'tiktok', 'https://www.tiktok.com/@wash_pro021?openExternalBrowser=1', '2025-11-07 01:25:45'),
(7, 'service_status', 'open', '2025-11-25 02:29:13'),
(8, 'max_orders_per_day', '20', '2025-11-25 02:28:42'),
(9, 'theme_mode', 'dark', '2025-11-07 00:49:42'),
(10, 'theme_color', '#0400ff', '2025-11-07 00:49:42');

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

--
-- Struktur dari tabel `transactions`
--

CREATE TABLE `transactions` (
  `id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `service_id` int(11) NOT NULL,
  `vehicle_type` varchar(50) DEFAULT NULL,
  `booking_date` date DEFAULT NULL,
  `booking_time` time DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `total_price` decimal(10,2) DEFAULT NULL,
  `status` enum('pending','completed','cancelled') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for dumped tables
--

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

--
-- Indeks untuk tabel `bookings`
--
ALTER TABLE `bookings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `service_id` (`service_id`);

--
-- Indeks untuk tabel `payments`
--
ALTER TABLE `payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `booking_id` (`booking_id`);

--
-- Indeks untuk tabel `reviews`
--
ALTER TABLE `reviews`
  ADD PRIMARY KEY (`id`),
  ADD KEY `booking_id` (`booking_id`);

--
-- Indeks untuk tabel `services`
--
ALTER TABLE `services`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_service_name_vehicle` (`name`(100),`vehicle_type`);

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

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

--
-- AUTO_INCREMENT untuk tabel yang dibuang
--

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

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

--
-- AUTO_INCREMENT untuk tabel `payments`
--
ALTER TABLE `payments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

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

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

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

--
-- AUTO_INCREMENT untuk tabel `transactions`
--
ALTER TABLE `transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

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

--
-- Ketidakleluasaan untuk tabel `bookings`
--
ALTER TABLE `bookings`
  ADD CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`service_id`) REFERENCES `services` (`id`) ON DELETE CASCADE;

--
-- Ketidakleluasaan untuk tabel `payments`
--
ALTER TABLE `payments`
  ADD CONSTRAINT `fk_payments_booking` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE;

--
-- Ketidakleluasaan untuk tabel `reviews`
--
ALTER TABLE `reviews`
  ADD CONSTRAINT `reviews_ibfk_1` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE CASCADE;
COMMIT;

