-- ========================================================
-- SQL Dump - Website Penjualan Agro Pupuk (Laravel)
-- Generated on: 2026-10-19 11:03:42
-- Compatible with: MySQL / MariaDB / SQLite / PostgreSQL
-- ========================================================

SET FOREIGN_KEY_CHECKS = 0;

-- --------------------------------------------------------
-- Table structure for `users` 
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `users` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `role` varchar(255) NOT NULL DEFAULT 'customer',
  `phone` varchar(255) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `users` 
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `role`, `phone`, `address`, `remember_token`, `created_at`, `updated_at`) VALUES ('1', 'Administrator Agro Pupuk', 'admin@agropupuk.com', NULL, '$2y$12$ImAbIJ4m/6xvUPTJhnb44O7Max8Ou72esn.rVUIEcDw6QDj.1Wjt.', 'admin', '081234567890', 'Jl. Agro Industri Raya No. 45, Kawasan Pertanian Modern, Kendal, Jawa Tengah', 'ViVlfYWslxr5eT4E4uD0LpMmPskyJ9zPAu3qXeJohDgkhpjz0gz6GYu2LP02', '2026-08-07 06:53:16', '2026-08-07 06:53:16');
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `role`, `phone`, `address`, `remember_token`, `created_at`, `updated_at`) VALUES ('2', 'Bapak Pak Tani (Budi Santoso)', 'user@agropupuk.com', NULL, '$2y$12$FxaKPcC6Lkb.zFyN1RJYfuSiwM0gKCLjly94TEfhmrHMV1swKPFf2', 'customer', '085712349876', 'Desa Makmur Jaya RT 03 RW 02, Kec. Subur, Kab. Demak, Jawa Tengah', NULL, '2026-08-07 06:53:16', '2026-08-07 06:53:16');
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `role`, `phone`, `address`, `remember_token`, `created_at`, `updated_at`) VALUES ('3', 'alfin', 'petrukselluler@gmail.com', NULL, '$2y$12$46my70zQkKLyiaN8H9AABu.e968KGoDzZRwLNCuEBswQC2tlIdefy', 'customer', '085647769258', NULL, NULL, '2026-08-07 11:02:28', '2026-08-07 11:02:28');
INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `role`, `phone`, `address`, `remember_token`, `created_at`, `updated_at`) VALUES ('4', 'zvslvthpex', 'lvqvkzsm@immenseignite.info', NULL, '$2y$12$OMu3TknODZheBxF5x2Df7Oqm2xuZvTIl7vAmyMZPeYOVOxNNWCn.a', 'customer', '+1-672-610-9015', NULL, NULL, '2026-08-15 19:39:35', '2026-08-15 19:39:35');

-- --------------------------------------------------------
-- Table structure for `categories` 
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `categories` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `icon` varchar(255) NOT NULL DEFAULT 'fa-leaf',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `categories_slug_unique` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `categories` 
INSERT INTO `categories` (`id`, `name`, `slug`, `description`, `icon`, `created_at`, `updated_at`) VALUES ('1', 'Pupuk NPK & Anorganik', 'pupuk-npk-anorganik', 'Pupuk majemuk kualitas tinggi kaya unsur Nitrogen, Phosfat, dan Kalium untuk percepatan tumbuh tanaman.', 'fa-cubes', '2026-08-07 06:53:16', '2026-08-07 06:53:16');
INSERT INTO `categories` (`id`, `name`, `slug`, `description`, `icon`, `created_at`, `updated_at`) VALUES ('2', 'Pupuk Organik & Hayati', 'pupuk-organik-hayati', 'Pupuk ramah lingkungan penyubur tanah, kaya mikroba baik, dan memperkuat imunitas akar.', 'fa-seedling', '2026-08-07 06:53:16', '2026-08-07 06:53:16');
INSERT INTO `categories` (`id`, `name`, `slug`, `description`, `icon`, `created_at`, `updated_at`) VALUES ('3', 'Pupuk Cair & Pelengkap', 'pupuk-cair-pelengkap', 'Nutrisi cair cepat serap daun & buah untuk hasil panen melimpah dan bebas hama.', 'fa-flask', '2026-08-07 06:53:16', '2026-08-07 06:53:16');
INSERT INTO `categories` (`id`, `name`, `slug`, `description`, `icon`, `created_at`, `updated_at`) VALUES ('4', 'Pembenah Tanah & Dolomit', 'pembenah-tanah-dolomit', 'Menetralkan pH tanah asam, menambah kapur magnesium, dan menggemburkan lahan kering.', 'fa-mountain', '2026-08-07 06:53:16', '2026-08-07 06:53:16');

-- --------------------------------------------------------
-- Table structure for `products` 
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `products` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `category_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `price` decimal(12,2) NOT NULL,
  `weight_kg` decimal(8,2) NOT NULL DEFAULT 1.00,
  `stock` int(11) NOT NULL DEFAULT 100,
  `badge` varchar(255) DEFAULT NULL,
  `composition` text DEFAULT NULL,
  `usage_instructions` text DEFAULT NULL,
  `description` text NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `products_slug_unique` (`slug`),
  KEY `products_category_id_foreign` (`category_id`),
  CONSTRAINT `products_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `products` 
INSERT INTO `products` (`id`, `category_id`, `name`, `slug`, `price`, `weight_kg`, `stock`, `badge`, `composition`, `usage_instructions`, `description`, `image`, `is_active`, `created_at`, `updated_at`) VALUES ('1', '1', 'Pupuk NPK Formula 16-16-16 Super Granul (50 Kg)', 'pupuk-npk-formula-16-16-16-super-granul-50kg', '485000', '50', '133', 'Best Seller', 'Nitrogen (N) 16%, Phosphate (P2O5) 16%, Potassium (K2O) 16%, Trace Elements Ca & Mg 2%', 'Taburkan 20-30 gram per rumpun tanaman padi/jagung atau 500 gram per batang pohon buah dewasa setiap 3 bulan.', 'Pupuk NPK 16-16-16 Super Granul merupakan formulasi seimbang terbaik untuk meningkatkan bobot buah, mengokohkan batang, dan melipatgandakan hasil panen hingga 40%. Mudah larut dalam air dan ramah terhadap mikroba tanah.', 'images/products/npk_granul.jpg', '1', '2026-08-07 06:53:16', '2026-08-21 05:08:30');
INSERT INTO `products` (`id`, `category_id`, `name`, `slug`, `price`, `weight_kg`, `stock`, `badge`, `composition`, `usage_instructions`, `description`, `image`, `is_active`, `created_at`, `updated_at`) VALUES ('2', '2', 'POC Agro Super Organik Cair (1 Liter)', 'poc-agro-super-organik-cair-1-liter', '75000', '1.2', '84', 'Organik Sertifikasi', 'Unsur Makro & Mikro Organik, Asam Humat 15%, ZPT Auxin & Giberelein, Konsentrasi Asam Amino 10%', 'Larutkan 2-4 ml POC Agro Super dalam 1 liter air. Semprotkan secara merata ke permukaan bawah daun setiap 7-10 hari sekali.', 'Pupuk Organik Cair (POC) Agro Super diformulasikan dari hasil fermentasi bahan alami murni. Mampu mempercepat pembentukan tunas baru, melebarkan daun, serta membuat rasa buah lebih manis dan tahan simpan lama.', 'images/products/organik_cair.jpg', '1', '2026-08-07 06:53:16', '2026-08-07 06:58:32');
INSERT INTO `products` (`id`, `category_id`, `name`, `slug`, `price`, `weight_kg`, `stock`, `badge`, `composition`, `usage_instructions`, `description`, `image`, `is_active`, `created_at`, `updated_at`) VALUES ('3', '2', 'Agro Bio-Booster Mikroba Hayati (5 Kg)', 'agro-bio-booster-mikroba-hayati-5kg', '135000', '5', '57', 'Teknologi Bio', 'Trichoderma sp, Rhizobium, Azotobacter, Konsorsium Bakteri Pelarut Fosfat 1x10^9 CFU/g', 'Campurkan 1 kg Bio-Booster dengan 50 kg pupuk kandang/kompos saat pengolahan tanah awal sebelum tanam.', 'Inokulan mikroba hayati pengaktif tanah keras. Mencegah penyakit layu fusarium, akar gada, dan jamur patogen pada tanaman holtikultura & perkebunan.', 'images/products/hayati_booster.jpg', '1', '2026-08-07 06:53:16', '2026-08-08 09:57:54');
INSERT INTO `products` (`id`, `category_id`, `name`, `slug`, `price`, `weight_kg`, `stock`, `badge`, `composition`, `usage_instructions`, `description`, `image`, `is_active`, `created_at`, `updated_at`) VALUES ('4', '1', 'Pupuk Urea Nitro-Max Ultra 46% N (50 Kg)', 'pupuk-urea-nitro-max-ultra-46-n-50-kg-4', '108000', '50', '10', 'Hemat Panen', 'Nitrogen Total (N) 46.0%, Kadar Biuret Max 1.0%, Moisture 0.5%', 'Aplikasi vegetatif pertama umur 14 HST dan vegetatif kedua umur 30 HST pada lahan sawah tergenang tipis.', 'Pupuk Urea prill berkualitas ekspor dengan salut uretan pelambat penguapan. Daun tanaman jadi lebih hijau segar, fotosintesis optimal, dan batang lebih kokoh tahan rebah.', 'images/products/npk_granul.jpg', '1', '2026-08-07 06:53:16', '2026-08-09 14:02:22');

-- --------------------------------------------------------
-- Table structure for `comments` 
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `comments` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `author_name` varchar(255) NOT NULL,
  `author_email` varchar(255) DEFAULT NULL,
  `rating` int(11) NOT NULL DEFAULT 5,
  `content` text NOT NULL,
  `is_approved` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `comments_product_id_foreign` (`product_id`),
  KEY `comments_user_id_foreign` (`user_id`),
  CONSTRAINT `comments_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  CONSTRAINT `comments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `comments` 
INSERT INTO `comments` (`id`, `product_id`, `user_id`, `author_name`, `author_email`, `rating`, `content`, `is_approved`, `created_at`, `updated_at`) VALUES ('1', '1', '2', 'Pak Budi Santoso (Petani Padi)', 'user@agropupuk.com', '5', 'Hasil panen padi saya musim ini naik dari 6 ton jadi 8.2 ton per hektar pakai NPK 16-16-16 ini! Bulir padi berisikan penuh sampai pangkal. Mantap Agro Pupuk!', '1', '2026-08-07 06:53:16', '2026-08-07 06:53:16');

-- --------------------------------------------------------
-- Table structure for `orders` 
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `orders` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `invoice_number` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_name` varchar(255) NOT NULL,
  `customer_email` varchar(255) DEFAULT NULL,
  `customer_phone` varchar(255) NOT NULL,
  `shipping_address` text NOT NULL,
  `subtotal` decimal(12,2) NOT NULL,
  `shipping_cost` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_amount` decimal(12,2) NOT NULL,
  `payment_status` enum('pending','paid','failed') NOT NULL DEFAULT 'paid',
  `shipping_status` enum('processing','shipped','completed','cancelled') NOT NULL DEFAULT 'processing',
  `payment_method` varchar(255) NOT NULL DEFAULT 'Transfer Bank / QRIS',
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `orders_invoice_number_unique` (`invoice_number`),
  KEY `orders_user_id_foreign` (`user_id`),
  CONSTRAINT `orders_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `orders` 
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('1', 'INV-AGRO-20260807-001', '2', 'Bapak Pak Tani (Budi Santoso)', 'user@agropupuk.com', '085712349876', 'Desa Makmur Jaya RT 03 RW 02, Kec. Subur, Kab. Demak, Jawa Tengah 59551', '1045000', '50000', '1095000', 'paid', 'completed', 'Transfer Bank Mandiri', 'Tolong kirim dengan truk angkutan pupuk langsung ke gudang desa.', '2026-08-07 06:53:16', '2026-08-07 06:53:16');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('2', 'INV-AGRO-20260807-002', NULL, 'H. Mulyadi (Kelompok Tani Makmur)', 'mulyadi@farm.co.id', '081399887766', 'Jl. Raya Agro Km 12, Sukorejo, Kendal', '2425000', '100000', '2525000', 'paid', 'processing', 'QRIS Instant', 'Konfirmasi pembayaran telah diverifikasi.', '2026-08-07 06:53:16', '2026-08-07 06:53:16');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('3', 'INV-AGRO-20260807-981', NULL, 'alfin', 'petrukselluler@gmail.com', '085701069322', 'nalumsari', '75000', '50000', '125000', 'paid', 'processing', 'Bayar di Gudang (Cod)', NULL, '2026-08-07 06:58:32', '2026-08-07 06:58:32');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('4', 'INV-AGRO-20260807-390', NULL, 'alsi', 'alfin738785@gmail.com', '085647769258', 'nalumsari', '415000', '50000', '465000', 'paid', 'processing', 'Transfer Bank Mandiri', NULL, '2026-08-07 10:55:31', '2026-08-07 10:55:31');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('5', 'INV-AGRO-20260807-114', '3', 'alfin', 'petrukselluler@gmail.com', '085647769258', 'nalumsari', '485000', '50000', '535000', 'paid', 'processing', 'QRIS Instant', NULL, '2026-08-07 11:03:06', '2026-08-07 11:03:06');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('6', 'INV-AGRO-20260808-552', NULL, 'alfin', 'petrukselluler@gmail.com', '085647769258', 'nalumsari', '970000', '50000', '1020000', 'paid', 'processing', 'QRIS Instant', NULL, '2026-08-08 03:35:53', '2026-08-08 03:35:53');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('7', 'INV-AGRO-20260808-982', NULL, 'hjxdu', 'petrukselluler@gmail.com', '9041', 'bkjigwgahb', '20000', '50000', '70000', 'paid', 'processing', 'Bayar di Gudang (Cod)', NULL, '2026-08-08 04:15:54', '2026-08-08 04:15:54');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('8', 'INV-AGRO-20260808-689', '2', 'Bapak Pak Tani (Budi Santoso)', 'user@agropupuk.com', '085712349876', 'Desa Makmur Jaya RT 03 RW 02, Kec. Subur, Kab. Demak, Jawa Tengah', '155000', '0', '155000', 'paid', 'processing', 'Transfer Bank Mandiri', NULL, '2026-08-08 04:33:35', '2026-08-08 04:33:35');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('9', 'INV-AGRO-20260808-467', '2', 'Bapak Pak Tani (Budi Santoso)', 'user@agropupuk.com', '085712349876', 'Desa Makmur Jaya RT 03 RW 02, Kec. Subur, Kab. Demak, Jawa Tengah', '20000', '0', '20000', 'paid', 'processing', 'Order via WhatsApp', NULL, '2026-08-08 04:36:42', '2026-08-08 04:36:42');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('10', 'INV-AGRO-20260808-911', NULL, 'Bapak Pak Tani (Budi Santoso)', 'user@agropupuk.com', '085712349876', 'nalumsari', '20000', '0', '20000', 'paid', 'processing', 'Order via WhatsApp', NULL, '2026-08-08 04:37:16', '2026-08-08 04:37:16');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('11', 'INV-AGRO-20260808-140', NULL, 'muhammad alfin alaudin', 'petrukselluler@gmail.com', '085647769258', 'nalumsari', '20000', '0', '20000', 'paid', 'processing', 'Order via WhatsApp', NULL, '2026-08-08 04:41:04', '2026-08-08 04:41:04');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('12', 'INV-AGRO-20260808-188', NULL, 'muhammad alfin alaudin', 'petrukselluler@gmail.com', '19393', 'nalumsari', '135000', '0', '135000', 'paid', 'processing', 'Order via WhatsApp', NULL, '2026-08-08 05:56:50', '2026-08-08 05:56:50');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('13', 'INV-AGRO-20260808-232', NULL, 'Nian', 'niamxfriendsbstrd@gmail.com', '0383848', 'Disini', '415000', '0', '415000', 'paid', 'processing', 'Order via WhatsApp', NULL, '2026-08-08 08:35:39', '2026-08-08 08:35:39');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('14', 'INV-AGRO-20260808-191', NULL, 'Ipin', 'ipin@gmail.com', '086726252782', 'Karpan city', '6063000', '0', '6063000', 'paid', 'processing', 'Order via WhatsApp', NULL, '2026-08-08 09:57:54', '2026-08-08 09:57:54');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('15', 'INV-AGRO-20260809-610', NULL, 'Alfiana Rahmawati', 'fiarahma958@gmail.com', '089529093330', 'Besito anake moden', '593000', '0', '593000', 'paid', 'processing', 'Order via WhatsApp', 'Anak moden', '2026-08-09 14:02:22', '2026-08-09 14:02:22');
INSERT INTO `orders` (`id`, `invoice_number`, `user_id`, `customer_name`, `customer_email`, `customer_phone`, `shipping_address`, `subtotal`, `shipping_cost`, `total_amount`, `payment_status`, `shipping_status`, `payment_method`, `notes`, `created_at`, `updated_at`) VALUES ('16', 'INV-AGRO-20260821-566', '1', 'Administrator Agro Pupuk', 'admin@agropupuk.com', '081234567890', 'Jl. Agro Industri Raya No. 45, Kawasan Pertanian Modern, Kendal, Jawa Tengah', '485000', '0', '485000', 'paid', 'processing', 'Order via WhatsApp', 'Nalumsari', '2026-08-21 05:08:30', '2026-08-21 05:08:30');

-- --------------------------------------------------------
-- Table structure for `order_items` 
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `order_items` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_name` varchar(255) NOT NULL,
  `price` decimal(12,2) NOT NULL,
  `quantity` int(11) NOT NULL,
  `subtotal` decimal(12,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `order_items_order_id_foreign` (`order_id`),
  KEY `order_items_product_id_foreign` (`product_id`),
  CONSTRAINT `order_items_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE,
  CONSTRAINT `order_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dumping data for table `order_items` 
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('1', '1', '1', 'Pupuk NPK Formula 16-16-16 Super Granul (50 Kg)', '485000', '2', '970000', '2026-08-07 06:53:16', '2026-08-07 06:53:16');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('2', '1', '2', 'POC Agro Super Organik Cair (1 Liter)', '75000', '1', '75000', '2026-08-07 06:53:16', '2026-08-07 06:53:16');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('3', '2', '1', 'Pupuk NPK Formula 16-16-16 Super Granul (50 Kg)', '485000', '5', '2425000', '2026-08-07 06:53:16', '2026-08-07 06:53:16');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('4', '3', '2', 'POC Agro Super Organik Cair (1 Liter)', '75000', '1', '75000', '2026-08-07 06:58:32', '2026-08-07 06:58:32');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('5', '4', '4', 'Pupuk Urea Nitro-Max Ultra 46% N (50 Kg)', '395000', '1', '395000', '2026-08-07 10:55:31', '2026-08-07 10:55:31');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('6', '4', NULL, 'sayuran', '20000', '1', '20000', '2026-08-07 10:55:31', '2026-08-07 10:55:31');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('7', '5', '1', 'Pupuk NPK Formula 16-16-16 Super Granul (50 Kg)', '485000', '1', '485000', '2026-08-07 11:03:06', '2026-08-07 11:03:06');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('8', '6', '1', 'Pupuk NPK Formula 16-16-16 Super Granul (50 Kg)', '485000', '2', '970000', '2026-08-08 03:35:53', '2026-08-08 03:35:53');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('9', '7', NULL, 'sayuran', '20000', '1', '20000', '2026-08-08 04:15:54', '2026-08-08 04:15:54');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('10', '8', NULL, 'sayuran', '20000', '1', '20000', '2026-08-08 04:33:35', '2026-08-08 04:33:35');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('11', '8', '3', 'Agro Bio-Booster Mikroba Hayati (5 Kg)', '135000', '1', '135000', '2026-08-08 04:33:35', '2026-08-08 04:33:35');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('12', '9', NULL, 'sayuran', '20000', '1', '20000', '2026-08-08 04:36:42', '2026-08-08 04:36:42');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('13', '10', NULL, 'sayuran', '20000', '1', '20000', '2026-08-08 04:37:16', '2026-08-08 04:37:16');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('14', '11', NULL, 'sayuran', '20000', '1', '20000', '2026-08-08 04:41:04', '2026-08-08 04:41:04');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('15', '12', '3', 'Agro Bio-Booster Mikroba Hayati (5 Kg)', '135000', '1', '135000', '2026-08-08 05:56:50', '2026-08-08 05:56:50');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('16', '13', '4', 'Pupuk Urea Nitro-Max Ultra 46% N (50 Kg)', '395000', '1', '395000', '2026-08-08 08:35:39', '2026-08-08 08:35:39');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('17', '13', NULL, 'sayuran', '20000', '1', '20000', '2026-08-08 08:35:39', '2026-08-08 08:35:39');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('18', '14', '1', 'Pupuk NPK Formula 16-16-16 Super Granul (50 Kg)', '485000', '12', '5820000', '2026-08-08 09:57:54', '2026-08-08 09:57:54');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('19', '14', '3', 'Agro Bio-Booster Mikroba Hayati (5 Kg)', '135000', '1', '135000', '2026-08-08 09:57:54', '2026-08-08 09:57:54');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('20', '14', '4', 'Pupuk Urea Nitro-Max Ultra 46% N (50 Kg)', '108000', '1', '108000', '2026-08-08 09:57:54', '2026-08-08 09:57:54');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('21', '15', '1', 'Pupuk NPK Formula 16-16-16 Super Granul (50 Kg)', '485000', '1', '485000', '2026-08-09 14:02:22', '2026-08-09 14:02:22');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('22', '15', '4', 'Pupuk Urea Nitro-Max Ultra 46% N (50 Kg)', '108000', '1', '108000', '2026-08-09 14:02:22', '2026-08-09 14:02:22');
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `product_name`, `price`, `quantity`, `subtotal`, `created_at`, `updated_at`) VALUES ('23', '16', '1', 'Pupuk NPK Formula 16-16-16 Super Granul (50 Kg)', '485000', '1', '485000', '2026-08-21 05:08:30', '2026-08-21 05:08:30');

SET FOREIGN_KEY_CHECKS = 1;
