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

START TRANSACTION;



--
-- Database: `e_commerce_mid`
--

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

--
-- Table structure for table `brands`
--

CREATE TABLE `brands` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `brands`
--

INSERT INTO `brands` (`id`, `name`, `slug`, `description`, `created_at`, `updated_at`) VALUES
(1, 'So Good', 'so-good', 'Premium frozen food products', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(2, 'Kanzler', 'kanzler', 'Premium beef and chicken frozen products', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(3, 'Fiesta', 'fiesta', 'Quality frozen food with international taste', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(4, 'Champ', 'champ', 'Frozen chicken products for everyday meals', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(5, 'Belva', 'belva', 'Traditional Indonesian frozen snacks', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(6, 'Finna', 'finna', 'Seafood-based frozen traditional food', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(7, 'Cedea', 'cedea', 'Chinese-style frozen dimsum and snacks', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(8, 'Otak-Otak Cap Jempol', 'otak-otak-cap-jempol', 'Traditional Indonesian otak-otak ikan', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(9, 'Golden Wheat', 'golden-wheat', 'Premium frozen potato products', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(10, 'Wall\'s', 'walls', 'World-famous ice cream and frozen desserts', '2026-06-16 05:55:51', '2026-06-16 05:55:51');

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

--
-- Table structure for table `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `name`, `slug`, `description`, `created_at`, `updated_at`) VALUES
(11, 'Sayuran Beku', 'sayuran-beku', 'Frozen vegetables seperti kentang, brokoli, dan mix sayuran', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(12, 'Daging & Ayam Beku', 'daging-ayam-beku', 'Frozen meat and chicken products seperti sosis, nugget, dan wings', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(13, 'Makanan Laut Beku', 'makanan-laut-beku', 'Frozen seafood seperti otak-otak, fish finger, dan tempura udang', '2026-06-16 05:55:51', '2026-06-16 05:55:51'),
(14, 'Camilan Beku', 'camilan-beku', 'Frozen snacks seperti dimsum, lumpia, pisang goreng, dan tahu isi', '2026-06-16 05:55:51', '2026-06-16 05:55:51');

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2024_11_07_133714_create_categories', 1),
(5, '2024_11_07_133837_create_products', 1),
(6, '2024_11_07_134744_create_orders', 1),
(7, '2024_11_07_135133_create_order_items', 1),
(8, '2024_11_08_000001_create_brands', 2),
(9, '2024_11_08_000002_add_brand_id_to_products_table', 2),
(10, '2024_11_08_000003_create_otp_codes_table', 3),
(11, '2024_11_09_000001_create_shipping_costs_table', 4),
(12, '2024_11_09_000002_modify_orders_table', 4),
(13, '2024_11_09_000003_modify_users_role', 4);

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

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `order_code` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `total_amount` decimal(15,2) NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'unpaid',
  `shipping_cost_id` bigint(20) UNSIGNED DEFAULT NULL,
  `payment_method` varchar(255) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `shipping_address` text NOT NULL,
  `midtrans_transaction_id` varchar(255) DEFAULT NULL,
  `midtrans_payment_type` varchar(255) DEFAULT NULL,
  `snap_token` varchar(255) DEFAULT NULL,
  `resi_code` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `orders`
--

INSERT INTO `orders` (`id`, `order_code`, `user_id`, `total_amount`, `status`, `shipping_cost_id`, `payment_method`, `notes`, `shipping_address`, `midtrans_transaction_id`, `midtrans_payment_type`, `snap_token`, `resi_code`, `created_at`, `updated_at`) VALUES
(1, 'ORDE260616141830001', 15, 100000.00, 'dikirim', 1, 'cod', 'kirim segera', 'surabaya', NULL, NULL, NULL, NULL, '2026-06-16 07:18:30', '2026-06-16 07:29:56'),
(2, 'ORDE260616144143001', 1, 84000.00, 'paid', NULL, 'tunai', 'POS transaction by Admin', 'POS - Walking Customer', NULL, NULL, NULL, NULL, '2026-06-16 07:41:43', '2026-06-16 07:41:43');

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

--
-- Table structure for table `order_items`
--

CREATE TABLE `order_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `quantity` int(11) NOT NULL,
  `price` decimal(15,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT 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`, `quantity`, `price`, `created_at`, `updated_at`) VALUES
(1, 1, 2, 1, 35000.00, '2026-06-16 07:18:30', '2026-06-16 07:18:30'),
(2, 1, 3, 1, 45000.00, '2026-06-16 07:18:30', '2026-06-16 07:18:30'),
(3, 2, 11, 1, 25000.00, '2026-06-16 07:41:43', '2026-06-16 07:41:43'),
(4, 2, 12, 1, 27000.00, '2026-06-16 07:41:43', '2026-06-16 07:41:43'),
(5, 2, 16, 1, 32000.00, '2026-06-16 07:41:43', '2026-06-16 07:41:43');

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

--
-- Table structure for table `otp_codes`
--

CREATE TABLE `otp_codes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `phone` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `otp` varchar(6) NOT NULL,
  `expires_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `otp_codes`
--

INSERT INTO `otp_codes` (`id`, `phone`, `name`, `otp`, `expires_at`, `created_at`, `updated_at`) VALUES
(2, '6282143570400', 'adie', '300497', '2026-06-16 07:22:53', '2026-06-16 07:17:53', '2026-06-16 07:17:53');

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

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `category_id` bigint(20) UNSIGNED NOT NULL,
  `brand_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `price` decimal(15,2) NOT NULL,
  `stock` int(11) DEFAULT NULL,
  `image` longtext DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `category_id`, `brand_id`, `name`, `slug`, `description`, `price`, `stock`, `image`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 14, 1, 'So Good Chicken Nugget 500g', 'so-good-chicken-nugget-500g', 'Chicken nugget premium dari So Good, terbuat dari daging ayam pilihan dengan balutan tepung renyah. Cocok untuk camilan keluarga.', 38000.00, 100, 'data:image/jpeg;base64,[encoded data, 16152 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33'),
(2, 12, 1, 'So Good Sosis Ayam 500g', 'so-good-sosis-ayam-500g', 'Sosis ayam berkualitas tinggi dari So Good, siap digoreng atau dibakar untuk lauk praktis sehari-hari.', 35000.00, 89, 'data:image/jpeg;base64,[encoded data, 16832 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 07:24:50');
INSERT INTO `products` (`id`, `category_id`, `brand_id`, `name`, `slug`, `description`, `price`, `stock`, `image`, `is_active`, `created_at`, `updated_at`) VALUES
(3, 14, 2, 'Kanzler Beef Nugget 500g', 'kanzler-beef-nugget-500g', 'Beef nugget premium dengan daging sapi asli, tekstur juicy dan rasa yang lezat.', 45000.00, 79, 'data:image/jpeg;base64,[encoded data, 17116 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 07:24:50'),
(4, 12, 2, 'Kanzler Sosis Sapi 500g', 'kanzler-sosis-sapi-500g', 'Sosis sapi premium Kanzler dengan potongan daging sapi asli, kaya rasa dan protein.', 42000.00, 75, 'data:image/jpeg;base64,[encoded data, 16388 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33');
INSERT INTO `products` (`id`, `category_id`, `brand_id`, `name`, `slug`, `description`, `price`, `stock`, `image`, `is_active`, `created_at`, `updated_at`) VALUES
(5, 14, 2, 'Kanzler Chicken Pop 250g', 'kanzler-chicken-pop-250g', 'Chicken pop Kanzler, potongan daging ayam berbumbu dengan balutan tepung crispy yang digemari anak-anak.', 28000.00, 95, 'data:image/jpeg;base64,[encoded data, 16040 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33'),
(6, 13, 3, 'Fiesta Fish Finger 500g', 'fiesta-fish-finger-500g', 'Fish finger Fiesta dari daging ikan fillet berkualitas, dilapisi tepung roti renyah.', 40000.00, 70, 'data:image/jpeg;base64,[encoded data, 14744 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33'),
(7, 12, 3, 'Fiesta Chicken Wings 500g', 'fiesta-chicken-wings-500g', 'Sayap ayam Fiesta yang sudah dibumbui, siap dipanggang atau digoreng untuk hidangan spesial.', 45000.00, 60, 'data:image/jpeg;base64,[encoded data, 15912 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33');
INSERT INTO `products` (`id`, `category_id`, `brand_id`, `name`, `slug`, `description`, `price`, `stock`, `image`, `is_active`, `created_at`, `updated_at`) VALUES
(8, 13, 3, 'Fiesta Tempura Udang 300g', 'fiesta-tempura-udang-300g', 'Tempura udang Fiesta dengan udang utuh dan balutan tepung Jepang yang ringan dan renyah.', 48000.00, 55, 'data:image/jpeg;base64,[encoded data, 16104 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33'),
(9, 12, 4, 'Champ Sosis Ayam 500g', 'champ-sosis-ayam-500g', 'Sosis ayam Champ dengan harga terjangkau, cocok untuk bekal sekolah dan lauk praktis.', 32000.00, 85, 'data:image/jpeg;base64,[encoded data, 16036 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33');
INSERT INTO `products` (`id`, `category_id`, `brand_id`, `name`, `slug`, `description`, `price`, `stock`, `image`, `is_active`, `created_at`, `updated_at`) VALUES
(10, 14, 4, 'Champ Naget Ayam 500g', 'champ-naget-ayam-500g', 'Naget ayam Champ favorit keluarga, renyah di luar dan lembut di dalam.', 30000.00, 110, 'data:image/jpeg;base64,[encoded data, 18148 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33'),
(11, 14, 5, 'Belva Pisang Goreng Frozen 500g', 'belva-pisang-goreng-frozen-500g', 'Pisang goreng frozen Belva, tinggal goreng untuk camilan tradisional yang praktis.', 25000.00, 64, 'data:image/jpeg;base64,[encoded data, 16064 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 07:41:43'),
(12, 14, 5, 'Belva Tahu Isi Frozen 500g', 'belva-tahu-isi-frozen-500g', 'Tahu isi frozen Belva dengan isian sayuran dan daging, siap digoreng kapan saja.', 27000.00, 59, 'data:image/jpeg;base64,[encoded data, 14548 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 07:41:43');
INSERT INTO `products` (`id`, `category_id`, `brand_id`, `name`, `slug`, `description`, `price`, `stock`, `image`, `is_active`, `created_at`, `updated_at`) VALUES
(13, 13, 6, 'Finna Otak-Otak Ikan 250g', 'finna-otak-otak-ikan-250g', 'Otak-otak ikan Finna, camilan seafood tradisional dengan tekstur kenyal dan rasa gurih.', 22000.00, 75, 'data:image/jpeg;base64,[encoded data, 15764 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33'),
(14, 14, 6, 'Finna Siomay Ikan 250g', 'finna-siomay-ikan-250g', 'Siomay ikan Finna dengan saus kacang, camilan tradisional favorit sepanjang masa.', 20000.00, 80, 'data:image/jpeg;base64,[encoded data, 15780 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33'),
(15, 14, 7, 'Cedea Dimsum Ayam 500g', 'cedea-dimsum-ayam-500g', 'Dimsum ayam Cedea dengan kulit tipis dan isian daging ayam cincang berbumbu.', 35000.00, 70, 'data:image/jpeg;base64,[encoded data, 16980 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33');
INSERT INTO `products` (`id`, `category_id`, `brand_id`, `name`, `slug`, `description`, `price`, `stock`, `image`, `is_active`, `created_at`, `updated_at`) VALUES
(16, 13, 7, 'Cedea Lumpia Semarang 500g', 'cedea-lumpia-semarang-500g', 'Lumpia Semarang Cedea dengan isian rebung dan udang, siap digoreng hingga keemasan.', 32000.00, 64, 'data:image/jpeg;base64,[encoded data, 16720 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 07:41:43'),
(17, 13, 8, 'Otak-Otak Cap Jempol 250g', 'otak-otak-cap-jempol-250g', 'Otak-otak ikan Cap Jempol yang legendaris, dibungkus daun pisang dengan bumbu khas.', 24000.00, 70, 'data:image/jpeg;base64,[encoded data, 15976 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33'),
(18, 11, 9, 'Golden Wheat French Fries 1kg', 'golden-wheat-french-fries-1kg', 'Kentang goreng beku Golden Wheat ukuran 1kg, cocok untuk camilan atau pelengkap makanan.', 45000.00, 50, 'data:image/jpeg;base64,[encoded data, 14392 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33');
INSERT INTO `products` (`id`, `category_id`, `brand_id`, `name`, `slug`, `description`, `price`, `stock`, `image`, `is_active`, `created_at`, `updated_at`) VALUES
(19, 11, 9, 'Golden Wheat Potato Wedges 500g', 'golden-wheat-potato-wedges-500g', 'Potato wedges Golden Wheat dengan bumbu herbal, siap dipanggang atau digoreng.', 28000.00, 55, 'data:image/jpeg;base64,[encoded data, 16860 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33'),
(20, 11, 9, 'Golden Wheat Tater Tots 500g', 'golden-wheat-tater-tots-500g', 'Tater tots Golden Wheat, camilan kentang berbentuk bulat kecil yang renyah di luar lembut di dalam.', 32000.00, 45, 'data:image/jpeg;base64,[encoded data, 14828 characters]', 1, '2026-06-16 05:56:33', '2026-06-16 05:56:33');

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

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('hAtdBoWwjEBfb8e4yrOuk8UlOF3aecQwBm1uPjL1', 15, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36 Edg/149.0.0.0', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiNE5qaDVvQVk5ZHdFT3dQNWRZYmtpUlViU1pqOXF5VW9SczdxR2JpaiI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjg6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9vcmRlcnMiO31zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToxNTt9', 1781619926),
('yS67exBX7NudjMrDO0wW8lFU7GLwySl6ZvXkp2tG', 1, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', '[encoded data, 22020 characters]', 1781621577);

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

--
-- Table structure for table `shipping_costs`
--

CREATE TABLE `shipping_costs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `destination` varchar(255) NOT NULL,
  `cost` decimal(15,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `shipping_costs`
--

INSERT INTO `shipping_costs` (`id`, `destination`, `cost`, `created_at`, `updated_at`) VALUES
(1, 'Surabaya', 20000.00, NULL, NULL),
(2, 'Gresik', 30000.00, NULL, NULL),
(3, 'Sidoarjo', 10000.00, NULL, NULL);

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

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

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `address` text NOT NULL,
  `phone` varchar(255) NOT NULL,
  `role` varchar(20) NOT NULL DEFAULT 'user',
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `address`, `phone`, `role`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'admin@example.com', NULL, '$2y$12$m2RQOTlfW9GJPX0ROB9F6O4YDtZChj5kEgizViOm5og8jQ2YJvcUq', 'Jl. Admin No. 1, Jakarta', '08123456789', 'admin', NULL, '2026-05-29 21:07:26', '2026-06-16 07:15:34'),
(14, 'Warehouse Staff', 'gudang@example.com', NULL, '$2y$12$SffI8A23LoY2VAV0Sdav.OpGHJ20ZYK9UsDlLyAThE2FGqaY4RXfS', 'Jl. Gudang No. 1', '081234567890', 'gudang', NULL, NULL, '2026-06-16 07:16:49'),
(15, 'adie', 'user_6282143570400@temp.com', NULL, '$2y$12$Idj0KKebKgwjZQ3ZMSMkp.vM7wxVYhZhNn9sNm5LaHogiW5piHcEG', '', '6282143570400', 'user', NULL, '2026-06-16 07:17:58', '2026-06-16 07:17:58'),
(16, 'UMUM', 'umum@example.com', NULL, '$2y$12$9sWae5ivswjkMP.2H.0a.Ob4UGrtfxs48QA7ST3vjvy6YbOyOmNOy', 'sby', '12345678', 'user', NULL, '2026-06-16 07:52:50', '2026-06-16 07:52:50');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `brands`
--
ALTER TABLE `brands`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `brands_slug_unique` (`slug`);

--
-- Indexes for table `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `categories_slug_unique` (`slug`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Indexes for table `job_batches`
--
ALTER TABLE `job_batches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `orders_order_code_unique` (`order_code`),
  ADD KEY `orders_user_id_foreign` (`user_id`),
  ADD KEY `orders_status_index` (`status`),
  ADD KEY `orders_midtrans_transaction_id_index` (`midtrans_transaction_id`),
  ADD KEY `orders_shipping_cost_id_foreign` (`shipping_cost_id`);

--
-- Indexes for table `order_items`
--
ALTER TABLE `order_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_items_product_id_foreign` (`product_id`),
  ADD KEY `order_items_order_id_product_id_index` (`order_id`,`product_id`);

--
-- Indexes for table `otp_codes`
--
ALTER TABLE `otp_codes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `products_slug_unique` (`slug`),
  ADD KEY `products_category_id_foreign` (`category_id`),
  ADD KEY `products_brand_id_foreign` (`brand_id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `shipping_costs`
--
ALTER TABLE `shipping_costs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `brands`
--
ALTER TABLE `brands`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `order_items`
--
ALTER TABLE `order_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `otp_codes`
--
ALTER TABLE `otp_codes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `shipping_costs`
--
ALTER TABLE `shipping_costs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `orders`
--
ALTER TABLE `orders`
  ADD CONSTRAINT `orders_shipping_cost_id_foreign` FOREIGN KEY (`shipping_cost_id`) REFERENCES `shipping_costs` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `orders_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `order_items`
--
ALTER TABLE `order_items`
  ADD CONSTRAINT `order_items_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `order_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `products`
--
ALTER TABLE `products`
  ADD CONSTRAINT `products_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `products_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE;
COMMIT;

