-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 02, 2026 at 04:57 AM
-- Server version: 10.4.28-MariaDB
-- PHP Version: 8.5.4

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

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

--
-- Table structure for table `attributes`
--

CREATE TABLE `attributes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `type` enum('text','number','select','multiselect','color') NOT NULL,
  `is_filterable` tinyint(1) NOT NULL DEFAULT 0,
  `is_variant` tinyint(1) NOT NULL DEFAULT 0,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `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 `attributes`
--

INSERT INTO `attributes` (`id`, `name`, `slug`, `type`, `is_filterable`, `is_variant`, `sort_order`, `created_at`, `updated_at`) VALUES
(2, 'Color', 'color', 'color', 1, 1, 1, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(3, 'Storage', 'storage', 'select', 1, 1, 2, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(4, 'RAM', 'ram', 'select', 1, 1, 3, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(5, 'Screen Size', 'screen-size', 'text', 1, 0, 4, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(6, 'Battery Life', 'battery-life', 'text', 1, 0, 5, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(7, 'Connectivity', 'connectivity', 'select', 1, 0, 6, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(8, 'Shoe Size', 'shoe-size', 'select', 1, 1, 7, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(9, 'Material', 'material', 'select', 1, 0, 8, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(10, 'Weight Capacity', 'weight-capacity', 'text', 1, 0, 9, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(11, 'Warranty', 'warranty', 'text', 0, 0, 10, '2026-08-29 06:43:01', '2026-08-29 06:43:01');

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

--
-- Table structure for table `attribute_values`
--

CREATE TABLE `attribute_values` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `attribute_id` bigint(20) UNSIGNED NOT NULL,
  `value` varchar(255) NOT NULL,
  `color_code` varchar(255) DEFAULT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `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 `attribute_values`
--

INSERT INTO `attribute_values` (`id`, `attribute_id`, `value`, `color_code`, `sort_order`, `created_at`, `updated_at`) VALUES
(2, 2, 'Black', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(3, 2, 'White', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(4, 2, 'Silver', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(5, 2, 'Blue', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(6, 2, 'Green', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(7, 3, '128GB', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(8, 3, '256GB', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(9, 3, '512GB', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(10, 3, '1TB', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(11, 4, '8GB', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(12, 4, '12GB', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(13, 4, '16GB', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(14, 4, '24GB', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(15, 5, '6.1\"', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(16, 5, '6.7\"', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(17, 5, '6.9\"', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(18, 6, 'Up to 12 hours', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(19, 6, 'Up to 8 hours', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(20, 6, 'Up to 24 hours', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(21, 7, 'Bluetooth 5.3', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(22, 7, 'USB-C', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(23, 7, 'Lightning', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(24, 7, 'Wireless', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(25, 8, 'US 7', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(26, 8, 'US 8', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(27, 8, 'US 9', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(28, 8, 'US 10', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(29, 8, 'US 11', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(30, 8, 'US 12', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(31, 9, 'Cotton', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(32, 9, 'Leather', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(33, 9, 'Mesh', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(34, 9, 'Aluminum', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(35, 9, 'Plastic', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(36, 10, '10 kg', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(37, 10, '15 kg', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(38, 10, '20 kg', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(39, 11, '1 Year', NULL, 0, '2026-08-29 06:43:01', '2026-08-29 06:43:01'),
(40, 11, '2 Years', NULL, 0, '2026-08-29 06:43:02', '2026-08-29 06:43:02'),
(41, 11, '6 Months', NULL, 0, '2026-08-29 06:43:02', '2026-08-29 06:43:02');

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

--
-- Table structure for table `audit_logs`
--

CREATE TABLE `audit_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) NOT NULL,
  `entity_type` varchar(255) NOT NULL,
  `entity_id` bigint(20) DEFAULT NULL,
  `old_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`old_values`)),
  `new_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`new_values`)),
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` 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 `audit_logs`
--

INSERT INTO `audit_logs` (`id`, `user_id`, `action`, `entity_type`, `entity_id`, `old_values`, `new_values`, `ip_address`, `user_agent`, `created_at`, `updated_at`) VALUES
(2, 1, 'updated', 'App\\Models\\Product', 1, '{\"id\":1,\"name\":\"Samsung Galaxy S24 Ultra\",\"slug\":\"samsung-galaxy-s24-ultra\",\"sku\":\"SAM-S24U-001\",\"short_description\":\"Latest Samsung flagship with AI features\",\"description\":\"<p>Latest Samsung smartphone<\\/p>\",\"base_price\":\"289999.00\",\"cost_price\":null,\"sale_price\":\"269999.00\",\"discount_type\":\"none\",\"discount_value\":\"0.00\",\"stock_status\":\"in_stock\",\"weight\":null,\"length\":null,\"width\":null,\"height\":null,\"is_active\":true,\"is_featured\":true,\"is_new\":true,\"meta_title\":null,\"meta_description\":null,\"published_at\":\"2026-08-27T07:07:39.000000Z\",\"created_at\":\"2026-08-27T07:07:39.000000Z\",\"updated_at\":\"2026-08-29T08:24:31.000000Z\",\"deleted_at\":null}', '{\"id\":1,\"name\":\"Samsung Galaxy S24 Ultra\",\"slug\":\"samsung-galaxy-s24-ultra\",\"sku\":\"SAM-S24U-001\",\"short_description\":\"Latest Samsung flagship with AI features\",\"description\":\"<p>Latest Samsung smartphone<\\/p>\",\"base_price\":\"289999.00\",\"cost_price\":null,\"sale_price\":\"269999.00\",\"discount_type\":\"none\",\"discount_value\":\"0.00\",\"stock_status\":\"in_stock\",\"weight\":null,\"length\":null,\"width\":null,\"height\":null,\"is_active\":true,\"is_featured\":true,\"is_new\":true,\"meta_title\":null,\"meta_description\":null,\"published_at\":\"2026-08-27T07:07:39.000000Z\",\"created_at\":\"2026-08-27T07:07:39.000000Z\",\"updated_at\":\"2026-08-29T08:24:31.000000Z\",\"deleted_at\":null,\"categories\":[{\"id\":7,\"parent_id\":null,\"name\":\"Mobile Phones\",\"slug\":\"mobile-phones\",\"description\":null,\"image\":\"categories\\/mobile-phones.png\",\"is_active\":true,\"sort_order\":1,\"meta_title\":null,\"meta_description\":null,\"created_at\":\"2026-08-27T07:07:39.000000Z\",\"updated_at\":\"2026-08-29T08:15:16.000000Z\",\"deleted_at\":null,\"pivot\":{\"product_id\":1,\"category_id\":7}}],\"brands\":[],\"tags\":[],\"images\":[{\"id\":1,\"product_id\":1,\"variant_id\":null,\"path\":\"products\\/product_1.png\",\"alt_text\":\"Product image 1\",\"sort_order\":0,\"is_primary\":true,\"created_at\":\"2026-08-29T08:17:09.000000Z\",\"updated_at\":\"2026-09-01T11:52:18.000000Z\"},{\"id\":14,\"product_id\":1,\"variant_id\":null,\"path\":\"products\\/wY3swWzWYJE8N6h9IWmSS8bMCnjzJRnrDTtvS7rK.png\",\"alt_text\":\"Samsung Galaxy S24 Ultra\",\"sort_order\":1,\"is_primary\":false,\"created_at\":\"2026-08-29T09:26:41.000000Z\",\"updated_at\":\"2026-09-01T11:52:18.000000Z\"}]}', '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:154.0) Gecko/20100101 Firefox/154.0', '2026-09-01 06:52:52', '2026-09-01 06:52:52');

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

--
-- Table structure for table `banners`
--

CREATE TABLE `banners` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `subtitle` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `color` varchar(255) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `url_2` varchar(255) DEFAULT NULL,
  `cta_text` varchar(255) DEFAULT NULL,
  `cta_text_2` varchar(255) DEFAULT NULL,
  `starts_at` timestamp NULL DEFAULT NULL,
  `ends_at` timestamp NULL DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `position` enum('homepage','promotional','footer','sale') DEFAULT 'homepage',
  `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 `banners`
--

INSERT INTO `banners` (`id`, `title`, `subtitle`, `description`, `image`, `color`, `url`, `url_2`, `cta_text`, `cta_text_2`, `starts_at`, `ends_at`, `is_active`, `sort_order`, `position`, `created_at`, `updated_at`) VALUES
(4, 'Summer Collection', 'Limited Time Offer', 'Discover our curated selection of products. From everyday essentials to premium finds — all delivered to your door with cash on delivery.', 'banners/fNfmvGLt5cd7gwVH8RKhJ41lSIR0aVNNjQsyfER0.png', '#1B1B1B', 'http://localhost/swiss-ecom/ecommerce/public/shop', NULL, 'Shop the Collection', NULL, NULL, NULL, 1, 0, 'footer', '2026-08-29 02:41:22', '2026-09-01 03:31:14'),
(5, 'Summer Sale', NULL, 'Up to 50% off on selected items.', NULL, '#D6001C', '/shop?sale=1', NULL, 'Shop the Sale', NULL, NULL, NULL, 1, 0, 'sale', '2026-08-29 02:41:22', '2026-08-29 02:41:22'),
(6, 'New Arrivals Just Dropped', NULL, 'Be the first to shop our latest collection. Fresh styles added weekly.', 'banners/summer-collection.png', NULL, '/shop?sort=newest', NULL, 'Shop New Arrivals', NULL, NULL, NULL, 1, 0, 'promotional', '2026-08-29 02:48:05', '2026-08-29 02:48:05'),
(7, 'Considered products.\nDelivered, cash on hand.', 'New season, straight to your door', 'Every item is checked before it ships — quality you can verify at the door, with cash on delivery across Pakistan.', 'banners/hero.png', NULL, '/shop', '#featured', 'Shop Now', 'View Collections', NULL, NULL, 1, 0, 'homepage', '2026-08-29 03:09:03', '2026-08-29 03:09:03');

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

--
-- Table structure for table `blog_posts`
--

CREATE TABLE `blog_posts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `content` longtext NOT NULL,
  `excerpt` text DEFAULT NULL,
  `featured_image` varchar(255) DEFAULT NULL,
  `status` enum('draft','published') NOT NULL DEFAULT 'draft',
  `author_id` bigint(20) UNSIGNED DEFAULT NULL,
  `published_at` timestamp NULL DEFAULT NULL,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `blog_posts`
--

INSERT INTO `blog_posts` (`id`, `title`, `slug`, `content`, `excerpt`, `featured_image`, `status`, `author_id`, `published_at`, `meta_title`, `meta_description`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Test Blog Post', 'test-blog-post', 'This is test content for the blog.', 'Test excerpt', NULL, 'draft', NULL, NULL, NULL, NULL, '2026-08-31 02:36:49', '2026-08-31 02:36:49', '2026-08-31 02:36:49'),
(2, 'Test', 'test', 'Hello', NULL, NULL, 'draft', NULL, NULL, NULL, NULL, '2026-08-31 02:43:11', '2026-08-31 02:43:11', '2026-08-31 02:43:11'),
(4, 'Test', 'test-1788162249', 'Hello', NULL, NULL, 'draft', NULL, NULL, NULL, NULL, '2026-08-31 02:44:09', '2026-08-31 02:44:10', '2026-08-31 02:44:10');

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

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

CREATE TABLE `brands` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_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`, `logo`, `description`, `is_active`, `sort_order`, `meta_title`, `meta_description`, `created_at`, `updated_at`, `deleted_at`) VALUES
(6, 'TestBrand', 'testbrand', NULL, NULL, 1, 0, NULL, NULL, '2026-08-31 02:37:14', '2026-08-31 02:37:14', NULL);

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

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

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

--
-- Dumping data for table `cache`
--

INSERT INTO `cache` (`key`, `value`, `expiration`) VALUES
('swiss-e-com-cache-settings.all', 'O:29:\"Illuminate\\Support\\Collection\":2:{s:8:\"\0*\0items\";a:28:{s:10:\"store_name\";s:10:\"Swiss Ecom\";s:11:\"store_email\";s:13:\"shop@test.com\";s:11:\"store_phone\";s:15:\"+92 321 1111111\";s:10:\"store_logo\";s:53:\"settings/QgtyrtZMo4lyQpdCvMd9Bi9uBYnCaCDf8CfmPwA7.png\";s:14:\"guest_checkout\";s:1:\"1\";s:12:\"registration\";s:1:\"1\";s:18:\"email_verification\";s:1:\"0\";s:12:\"order_prefix\";s:3:\"ORD\";s:14:\"invoice_prefix\";s:3:\"INV\";s:16:\"default_tax_rate\";s:1:\"5\";s:21:\"default_shipping_cost\";s:3:\"150\";s:19:\"low_stock_threshold\";s:1:\"3\";s:13:\"store_address\";s:11:\"123 Main St\";s:11:\"store_hours\";s:20:\"Mon - Sat: 9am - 6pm\";s:7:\"favicon\";s:53:\"settings/vzGZwp15S9xB8Ib2vCEVRPUsF06HLeygJYzl67kh.png\";s:13:\"store_tagline\";s:9:\"Best Shop\";s:17:\"store_description\";s:14:\"Great products\";s:4:\"city\";s:6:\"Lahore\";s:7:\"country\";s:8:\"Pakistan\";s:8:\"whatsapp\";s:15:\"+92 321 1111111\";s:14:\"business_hours\";s:16:\"Mon-Fri 10am-5pm\";s:10:\"meta_title\";s:19:\"My Shop - Best Shop\";s:16:\"meta_description\";s:8:\"Shop now\";s:13:\"meta_keywords\";s:12:\"shop, lahore\";s:8:\"currency\";s:3:\"PKR\";s:17:\"products_per_page\";s:2:\"24\";s:10:\"tiktok_url\";s:30:\"https://www.tiktok.com/@myshop\";s:12:\"facebook_url\";s:27:\"https://facebook.com/myshop\";}s:28:\"\0*\0escapeWhenCastingToString\";b:0;}', 1790882376);

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

--
-- 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 `campaign_categories`
--

CREATE TABLE `campaign_categories` (
  `campaign_id` bigint(20) UNSIGNED NOT NULL,
  `category_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `campaign_products`
--

CREATE TABLE `campaign_products` (
  `campaign_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `carts`
--

CREATE TABLE `carts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `session_id` 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 `carts`
--

INSERT INTO `carts` (`id`, `customer_id`, `session_id`, `created_at`, `updated_at`) VALUES
(2, NULL, 'QpDHyfRH7YZQYbGlCjTfu8QuSR0wYLrJcLU2xoyW', '2026-08-28 02:24:50', '2026-08-28 02:24:50'),
(3, NULL, 'yZqiOEHYnCOAifJyVLsBNpAeqcR0IcP0LC6P8gGw', '2026-08-28 02:30:37', '2026-08-28 02:30:37'),
(4, NULL, 'NCfL6aJQGeWpZ1f5ob0rYOXGNENHfwMoAC8Xgp3B', '2026-08-28 02:36:58', '2026-08-28 02:36:58'),
(5, NULL, 'aQ4uMeX02W4UgZySKlEzQ4httvLEMlKJVUY6UJz9', '2026-08-28 02:37:03', '2026-08-28 02:37:03'),
(6, NULL, '14rbTKAILwqC1Mhl6MGuPVsSqxXvXoRlKpRecjjO', '2026-08-28 02:42:02', '2026-08-28 02:42:02'),
(7, NULL, '5aF1QYrRxsP6ahzRdsNUWzNcRWFrqUMMMNVSkCOC', '2026-08-28 02:42:47', '2026-08-28 02:42:47'),
(8, NULL, 'wqfUqJD49wi3Jxsp9bObZkQjoZkt7Tm58ZVKobJr', '2026-08-28 02:44:48', '2026-08-28 02:44:48'),
(9, NULL, 'OiBxJgcvIFUg9fZ5V4yNcmXnRavKaq28M6eOkztJ', '2026-08-28 02:45:37', '2026-08-28 02:45:37'),
(10, NULL, 'vt3gyiRkQsPP3xxbkTWhXlItzySNqo1UoYdrnTx6', '2026-08-28 03:10:36', '2026-08-28 03:10:36'),
(11, NULL, 'V7kxNgiQ7GjQHVmv8mIHlKzC4pFJhvNtrzscgrwf', '2026-08-28 03:11:26', '2026-08-28 03:11:26'),
(12, NULL, 'J9Z0sjMLy10t35lMXLLADqsz7en7zV9zZ2uSidJa', '2026-08-28 03:12:00', '2026-08-28 03:12:00'),
(13, NULL, 'XOm5SYFlK13V4XolqtF1gIC9CsbWRJTOUOoLG5PB', '2026-08-28 03:12:17', '2026-08-28 03:12:17'),
(14, NULL, 'RnnwMLJZTj2WPFJOghSTZpfrbK14XydxDVdEo9Hf', '2026-08-28 03:12:27', '2026-08-28 03:12:27'),
(15, NULL, 'Yp1PvvQcj5YOrgdSD4Q95RqjgprE0HRkTOr8jH8E', '2026-08-28 03:12:45', '2026-08-28 03:12:45'),
(16, NULL, 'AXp1786KSjkGBxCsEIN9pwsWmDhuvsbmCHhCmsYu', '2026-08-28 03:13:13', '2026-08-28 03:13:13'),
(17, NULL, 'J0chOHo2vCS7AOTHp4IdFvo8hTQEXjXWK9RxOupo', '2026-08-28 03:23:47', '2026-08-28 03:23:47'),
(18, NULL, 'M8E2y7dv1Pa1ymdBp4sRxPCt3eE6llXjRwb0wTJ3', '2026-08-28 03:24:37', '2026-08-28 03:24:37'),
(19, NULL, 'jrro9dO5kLDCjxI4TKVlLpXwUtDmiNHwahNJRLDb', '2026-08-28 03:30:26', '2026-08-28 03:30:26'),
(20, NULL, 'VaJkBDMKDawljBMLM8GDDDKWkH4vfvyM6OUzeyKD', '2026-08-28 03:30:49', '2026-08-28 03:30:49'),
(21, NULL, '3qrl6sCGbINkzNbAfYLcfqB5l2wwFAyHNovROxCY', '2026-08-28 03:30:59', '2026-08-28 03:30:59'),
(22, NULL, 'Qg9UDNvU7zj7tfg05201o8UidDIEiJlD7OQ6Eyop', '2026-08-28 03:31:19', '2026-08-28 03:31:19'),
(23, NULL, '2yuajkIzp91i3KvuIVNGZGvEpVPYEjVCXyqR4gyU', '2026-08-28 03:31:19', '2026-08-28 03:31:19'),
(24, NULL, 'pKsQrZLNbFiIGVDi8xxBTmnOp3E5G3I4bjTf0yjo', '2026-08-28 04:14:48', '2026-08-28 04:14:48'),
(25, NULL, '2lBJjZsYbI085GxzPBvF6QXZ81UzDsRHETlcsCAX', '2026-08-28 04:55:36', '2026-08-28 04:55:36'),
(27, NULL, 'T8XFwhJ63apsFioM1yYGaYfyx1kOKSbp1QDqTHXr', '2026-08-28 05:25:14', '2026-08-28 05:25:14'),
(33, NULL, 'shaIyvefQ7L2P8CDyXnCm7DWEQ7ujzEEd383tPlN', '2026-08-28 05:53:14', '2026-08-28 05:53:14'),
(46, NULL, '1WZE7mLJi8re7jFpMwMv1ZZjHVkVLzy8m9reLoxr', '2026-08-28 12:02:13', '2026-08-28 12:02:13'),
(48, NULL, 'XFHggR63MKwlwxTvWPLRknrSin9UYfqcU6dLV32K', '2026-08-29 00:43:44', '2026-08-29 00:43:44'),
(49, NULL, 'kkfFA4vh1xKjNhyK04wzF0Q0pWWCNkgGuT74bY3X', '2026-08-29 00:43:45', '2026-08-29 00:43:45'),
(50, NULL, 'f4v4JWpeMboGMCquiAeVtKY6hyCZPk3otebAlpyt', '2026-08-29 01:02:35', '2026-08-29 01:02:35'),
(51, NULL, 'ch6913X1fU7vE8irkwen3DktfENnLhAiH23dAf7b', '2026-08-29 01:33:00', '2026-08-29 01:33:00'),
(52, 1, NULL, '2026-08-29 03:59:59', '2026-08-29 03:59:59'),
(54, NULL, '2t9SYBtwEgk50UwxjxOOUe8BpcGjhW0NMs6s5DTf', '2026-08-29 08:58:22', '2026-08-29 08:58:22'),
(59, NULL, 'test_session_1788151639', '2026-08-30 23:47:19', '2026-08-30 23:47:19'),
(62, NULL, 'wzpbqRCj4sUw5iH3JYxklj5InG4i95376q70tM5D', '2026-09-01 03:11:39', '2026-09-01 03:11:39'),
(63, NULL, 'NGp4TMEy4Qss7zHxCV32ryPh0nW8hwWQrO63fpia', '2026-09-01 06:53:26', '2026-09-01 06:53:26'),
(64, NULL, 'TIGKS3nme8gVR4SI8fLkhLAdUrhczIUzwTntJ1LS', '2026-09-01 07:07:30', '2026-09-01 07:07:30'),
(65, NULL, 'bCFFIc72H2Gf4kOEtEegkxWVE0VFZOpN27xEfaZU', '2026-09-01 07:09:55', '2026-09-01 07:09:55');

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

--
-- Table structure for table `cart_items`
--

CREATE TABLE `cart_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `cart_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `variant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `quantity` int(11) NOT NULL DEFAULT 1,
  `unit_price` decimal(12,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 `cart_items`
--

INSERT INTO `cart_items` (`id`, `cart_id`, `product_id`, `variant_id`, `quantity`, `unit_price`, `created_at`, `updated_at`) VALUES
(2, 5, 1, NULL, 1, 269999.00, '2026-08-28 02:37:04', '2026-08-28 02:37:04'),
(3, 7, 1, NULL, 1, 269999.00, '2026-08-28 02:42:47', '2026-08-28 02:42:47'),
(4, 8, 1, NULL, 1, 269999.00, '2026-08-28 02:44:48', '2026-08-28 02:44:48'),
(5, 10, 1, NULL, 1, 269999.00, '2026-08-28 03:10:36', '2026-08-28 03:10:36'),
(6, 11, 1, NULL, 1, 269999.00, '2026-08-28 03:11:26', '2026-08-28 03:11:26'),
(7, 12, 1, NULL, 1, 269999.00, '2026-08-28 03:12:00', '2026-08-28 03:12:00'),
(8, 13, 1, NULL, 1, 269999.00, '2026-08-28 03:12:17', '2026-08-28 03:12:17'),
(9, 14, 1, NULL, 1, 269999.00, '2026-08-28 03:12:27', '2026-08-28 03:12:27'),
(10, 15, 1, NULL, 1, 269999.00, '2026-08-28 03:12:45', '2026-08-28 03:12:45'),
(11, 17, 1, NULL, 1, 269999.00, '2026-08-28 03:23:47', '2026-08-28 03:23:47'),
(12, 18, 1, NULL, 1, 269999.00, '2026-08-28 03:24:37', '2026-08-28 03:24:37'),
(13, 19, 1, NULL, 1, 269999.00, '2026-08-28 03:30:26', '2026-08-28 03:30:26'),
(14, 20, 1, NULL, 1, 269999.00, '2026-08-28 03:30:49', '2026-08-28 03:30:49'),
(15, 21, 1, NULL, 1, 269999.00, '2026-08-28 03:30:59', '2026-08-28 03:30:59'),
(16, 22, 1, NULL, 1, 269999.00, '2026-08-28 03:31:19', '2026-08-28 03:31:19'),
(19, 25, 1, NULL, 1, 269999.00, '2026-08-28 04:55:36', '2026-08-28 04:55:36'),
(21, 27, 1, NULL, 1, 269999.00, '2026-08-28 05:25:14', '2026-08-28 05:25:14'),
(27, 33, 1, NULL, 1, 269999.00, '2026-08-28 05:53:14', '2026-08-28 05:53:14'),
(47, 51, 1, NULL, 1, 269999.00, '2026-08-29 01:33:01', '2026-08-29 01:33:01'),
(49, 54, 1, NULL, 1, 269999.00, '2026-08-29 08:58:22', '2026-08-29 08:58:22'),
(56, 63, 1, 4, 1, 20.00, '2026-09-01 07:09:39', '2026-09-01 07:09:39'),
(57, 65, 1, 2, 1, 90.00, '2026-09-01 07:09:55', '2026-09-01 07:09:55');

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

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

CREATE TABLE `categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `parent_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `categories` (`id`, `parent_id`, `name`, `slug`, `description`, `image`, `is_active`, `sort_order`, `meta_title`, `meta_description`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2, NULL, 'Fashion', 'fashion', NULL, 'categories/fashion.png', 0, 2, NULL, NULL, '2026-08-27 02:07:39', '2026-08-29 03:15:15', NULL),
(3, NULL, 'Home & Living', 'home-living', NULL, 'categories/home-living.png', 1, 3, NULL, NULL, '2026-08-27 02:07:39', '2026-08-29 03:15:16', NULL),
(4, NULL, 'Beauty', 'beauty', NULL, 'categories/beauty.png', 1, 4, NULL, NULL, '2026-08-27 02:07:39', '2026-08-29 03:15:16', NULL),
(5, NULL, 'Sports', 'sports', NULL, 'categories/sports.png', 1, 5, NULL, NULL, '2026-08-27 02:07:39', '2026-08-29 03:15:16', NULL),
(6, NULL, 'Books', 'books', NULL, 'categories/books.png', 1, 6, NULL, NULL, '2026-08-27 02:07:39', '2026-08-29 03:15:16', NULL),
(7, NULL, 'Mobile Phones', 'mobile-phones', NULL, 'categories/mobile-phones.png', 1, 1, NULL, NULL, '2026-08-27 02:07:39', '2026-08-29 03:15:16', NULL),
(8, NULL, 'Laptops', 'laptops', NULL, 'categories/laptops.png', 1, 2, NULL, NULL, '2026-08-27 02:07:39', '2026-08-29 03:15:16', NULL),
(9, NULL, 'Headphones', 'headphones', NULL, 'categories/headphones.png', 1, 3, NULL, NULL, '2026-08-27 02:07:39', '2026-08-29 03:15:16', NULL),
(10, 2, 'Men', 'men', NULL, NULL, 1, 1, NULL, NULL, '2026-08-27 02:07:39', '2026-08-27 02:07:39', NULL),
(11, 2, 'Women', 'women', NULL, NULL, 1, 2, NULL, NULL, '2026-08-27 02:07:39', '2026-08-27 02:07:39', NULL),
(12, NULL, 'Electronics', 'electronics', NULL, NULL, 1, 0, NULL, NULL, '2026-08-31 02:37:14', '2026-08-31 02:37:14', NULL);

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

--
-- Table structure for table `coupons`
--

CREATE TABLE `coupons` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `type` enum('percentage','fixed','free_shipping') NOT NULL,
  `value` decimal(12,2) NOT NULL DEFAULT 0.00,
  `percentage` decimal(5,2) DEFAULT NULL,
  `minimum_order` decimal(12,2) NOT NULL DEFAULT 0.00,
  `maximum_discount` decimal(12,2) DEFAULT NULL,
  `usage_limit` int(11) DEFAULT NULL,
  `per_customer_limit` int(11) DEFAULT 1,
  `used_count` int(11) NOT NULL DEFAULT 0,
  `starts_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `coupons`
--

INSERT INTO `coupons` (`id`, `code`, `type`, `value`, `percentage`, `minimum_order`, `maximum_discount`, `usage_limit`, `per_customer_limit`, `used_count`, `starts_at`, `expires_at`, `is_active`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2, 'CODE1', 'percentage', 50.00, NULL, 0.00, NULL, 12, 1, 1, '2026-08-29 08:50:00', '2026-09-05 08:50:00', 1, '2026-08-29 08:50:53', '2026-09-01 12:16:39', NULL);

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

--
-- Table structure for table `coupon_categories`
--

CREATE TABLE `coupon_categories` (
  `coupon_id` bigint(20) UNSIGNED NOT NULL,
  `category_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `coupon_products`
--

CREATE TABLE `coupon_products` (
  `coupon_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `coupon_usages`
--

CREATE TABLE `coupon_usages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `coupon_id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `used_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` (`id`, `user_id`, `first_name`, `last_name`, `email`, `phone`, `is_active`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 3, 'test', 'test', 'test@admin.com', NULL, 1, '2026-08-27 06:04:21', '2026-08-27 07:26:06', NULL),
(2, NULL, 'John', 'Doe', 'john@example.com', '555-1234', 1, '2026-08-27 09:14:51', '2026-08-31 03:11:44', '2026-08-31 03:11:44'),
(3, 4, 'testest', 'testest', 'test@test.com', '1234567890', 1, '2026-08-31 01:12:28', '2026-08-31 01:12:28', NULL);

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

--
-- Table structure for table `customer_addresses`
--

CREATE TABLE `customer_addresses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED NOT NULL,
  `label` varchar(255) NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `phone` varchar(20) NOT NULL,
  `address_line_1` varchar(255) NOT NULL,
  `address_line_2` varchar(255) DEFAULT NULL,
  `city` varchar(255) NOT NULL,
  `state` varchar(255) NOT NULL,
  `postal_code` varchar(20) DEFAULT NULL,
  `country` varchar(100) NOT NULL DEFAULT 'Pakistan',
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `customer_verifications`
--

CREATE TABLE `customer_verifications` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED NOT NULL,
  `type` enum('email','phone') NOT NULL,
  `token` varchar(255) NOT NULL,
  `verified_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `discount_campaigns`
--

CREATE TABLE `discount_campaigns` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` enum('percentage','fixed') NOT NULL,
  `value` decimal(12,2) NOT NULL,
  `minimum_order` decimal(12,2) NOT NULL DEFAULT 0.00,
  `starts_at` timestamp NULL DEFAULT NULL,
  `ends_at` timestamp NULL DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `enquiries`
--

CREATE TABLE `enquiries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `status` enum('new','read','replied','closed') NOT NULL DEFAULT 'new',
  `admin_notes` text DEFAULT NULL,
  `read_at` timestamp NULL DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED 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 `enquiries`
--

INSERT INTO `enquiries` (`id`, `name`, `email`, `subject`, `message`, `status`, `admin_notes`, `read_at`, `user_id`, `created_at`, `updated_at`) VALUES
(1, 'test', 'test@test.com', 'test', 'testelkasjldsj;lakjdjfa;lfkd\r\nlkdjds;lfjds\r\nlkdsfja;s', 'read', NULL, '2026-08-29 04:04:27', 1, '2026-08-29 04:04:14', '2026-08-29 04:04:27');

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

--
-- 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 `flash_sales`
--

CREATE TABLE `flash_sales` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `sale_price` decimal(12,2) NOT NULL,
  `starts_at` timestamp NULL DEFAULT NULL,
  `ends_at` timestamp NULL DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `flash_sales`
--

INSERT INTO `flash_sales` (`id`, `name`, `sale_price`, `starts_at`, `ends_at`, `is_active`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Eid Mega Sale', 499.00, '2026-08-29 10:00:00', '2026-09-05 13:00:00', 0, '2026-08-29 11:00:37', '2026-08-30 23:15:51', NULL),
(6, 'Mega Flash', 199.00, '2026-08-28 13:36:00', '2026-09-01 13:36:00', 0, '2026-08-29 13:36:09', '2026-08-30 23:15:46', NULL);

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

--
-- Table structure for table `flash_sale_categories`
--

CREATE TABLE `flash_sale_categories` (
  `flash_sale_id` bigint(20) UNSIGNED NOT NULL,
  `category_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `flash_sale_categories`
--

INSERT INTO `flash_sale_categories` (`flash_sale_id`, `category_id`) VALUES
(1, 7);

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

--
-- Table structure for table `flash_sale_products`
--

CREATE TABLE `flash_sale_products` (
  `flash_sale_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `flash_price` decimal(12,2) NOT NULL DEFAULT 0.00,
  `quantity` int(11) DEFAULT NULL,
  `sold` int(11) NOT NULL DEFAULT 0,
  `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 `flash_sale_products`
--

INSERT INTO `flash_sale_products` (`flash_sale_id`, `product_id`, `flash_price`, `quantity`, `sold`, `created_at`, `updated_at`) VALUES
(1, 1, 499.00, NULL, 0, '2026-08-30 23:14:57', '2026-08-30 23:14:57'),
(1, 2, 499.00, NULL, 0, '2026-08-30 23:14:57', '2026-08-30 23:15:51'),
(6, 1, 199.00, 10, 0, '2026-08-29 13:36:09', '2026-08-30 23:15:47');

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

--
-- Table structure for table `inventories`
--

CREATE TABLE `inventories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `variant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `quantity` int(11) NOT NULL DEFAULT 0,
  `reserved_quantity` int(11) NOT NULL DEFAULT 0,
  `low_stock_threshold` int(11) NOT NULL DEFAULT 5,
  `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 `inventories`
--

INSERT INTO `inventories` (`id`, `product_id`, `variant_id`, `quantity`, `reserved_quantity`, `low_stock_threshold`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 26, 5, 10, '2026-08-28 06:15:59', '2026-09-01 07:06:04'),
(2, 2, NULL, 2, 2, 10, '2026-08-28 06:15:59', '2026-08-28 11:01:33'),
(3, 3, NULL, 78, 3, 10, '2026-08-28 06:15:59', '2026-08-28 06:15:59'),
(4, 4, NULL, 3, 0, 10, '2026-08-28 06:15:59', '2026-08-28 06:15:59'),
(5, 5, NULL, 32, 4, 10, '2026-08-28 06:15:59', '2026-08-28 06:15:59'),
(6, 6, NULL, 6, 1, 10, '2026-08-28 06:15:59', '2026-08-28 06:15:59'),
(7, 7, NULL, 55, 2, 10, '2026-08-28 06:15:59', '2026-08-28 06:15:59'),
(8, 8, NULL, 18, 3, 10, '2026-08-28 06:15:59', '2026-08-28 06:15:59'),
(12, 1, 4, 2, 1, 5, '2026-09-01 07:09:39', '2026-09-01 07:09:39'),
(13, 1, 2, 6, 1, 5, '2026-09-01 07:09:55', '2026-09-01 12:16:39');

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

--
-- Table structure for table `inventory_movements`
--

CREATE TABLE `inventory_movements` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `inventory_id` bigint(20) UNSIGNED NOT NULL,
  `type` enum('stock_in','sale','return','adjustment','damage','correction','reserved','released') NOT NULL,
  `quantity` int(11) NOT NULL,
  `reference_type` varchar(255) DEFAULT NULL,
  `reference_id` bigint(20) UNSIGNED DEFAULT NULL,
  `note` varchar(255) DEFAULT NULL,
  `performed_by` bigint(20) UNSIGNED 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 `inventory_movements`
--

INSERT INTO `inventory_movements` (`id`, `inventory_id`, `type`, `quantity`, `reference_type`, `reference_id`, `note`, `performed_by`, `created_at`, `updated_at`) VALUES
(6, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 05:19:37', '2026-08-28 05:19:37'),
(7, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 05:30:01', '2026-08-28 05:30:01'),
(8, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 05:30:25', '2026-08-28 05:30:25'),
(9, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 05:31:44', '2026-08-28 05:31:44'),
(10, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 05:32:07', '2026-08-28 05:32:07'),
(11, 1, 'sale', -4, NULL, NULL, NULL, NULL, '2026-08-28 05:34:30', '2026-08-28 05:34:30'),
(12, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 05:55:56', '2026-08-28 05:55:56'),
(13, 2, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 05:55:56', '2026-08-28 05:55:56'),
(14, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 05:59:48', '2026-08-28 05:59:48'),
(15, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 06:19:47', '2026-08-28 06:19:47'),
(16, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 06:29:40', '2026-08-28 06:29:40'),
(17, 2, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 06:29:40', '2026-08-28 06:29:40'),
(18, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 06:42:58', '2026-08-28 06:42:58'),
(19, 2, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 06:42:58', '2026-08-28 06:42:58'),
(20, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 06:44:29', '2026-08-28 06:44:29'),
(21, 2, 'sale', -3, NULL, NULL, NULL, NULL, '2026-08-28 08:23:58', '2026-08-28 08:23:58'),
(22, 1, 'sale', -3, NULL, NULL, NULL, NULL, '2026-08-28 08:23:58', '2026-08-28 08:23:58'),
(23, 2, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 08:34:53', '2026-08-28 08:34:53'),
(24, 2, 'sale', -2, NULL, NULL, NULL, NULL, '2026-08-28 08:51:48', '2026-08-28 08:51:48'),
(25, 1, 'adjustment', 12, NULL, NULL, NULL, NULL, '2026-08-28 09:01:41', '2026-08-28 09:01:41'),
(26, 1, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 09:01:53', '2026-08-28 09:01:53'),
(27, 2, 'sale', -1, NULL, NULL, NULL, NULL, '2026-08-28 11:01:33', '2026-08-28 11:01:33'),
(28, 1, 'sale', -1, NULL, NULL, 'Sale - Order #29', NULL, '2026-08-29 00:50:01', '2026-08-29 00:50:01'),
(29, 1, 'sale', -1, NULL, NULL, 'Sale - Order #30', NULL, '2026-08-29 05:23:22', '2026-08-29 05:23:22'),
(30, 1, 'adjustment', 5, NULL, NULL, 'restock', NULL, '2026-08-29 12:27:20', '2026-08-29 12:27:20'),
(32, 1, 'sale', -2, NULL, NULL, 'Sale - Order #31', NULL, '2026-08-30 23:47:47', '2026-08-30 23:47:47'),
(33, 1, 'sale', -1, NULL, NULL, 'Sale - Order #32', NULL, '2026-08-30 23:49:06', '2026-08-30 23:49:06'),
(34, 1, 'adjustment', 20, NULL, NULL, 'stock come', NULL, '2026-09-01 07:06:04', '2026-09-01 07:06:04'),
(35, 12, 'reserved', 1, NULL, NULL, 'Stock reserved - Cart item #', NULL, '2026-09-01 07:09:39', '2026-09-01 07:09:39'),
(36, 13, 'reserved', 1, NULL, NULL, 'Stock reserved - Cart item #', NULL, '2026-09-01 07:09:55', '2026-09-01 07:09:55'),
(37, 13, 'reserved', 4, NULL, NULL, 'Stock reserved - Cart item #', NULL, '2026-09-01 12:15:41', '2026-09-01 12:15:41'),
(38, 13, 'sale', -4, NULL, NULL, 'Sale - Order #34', NULL, '2026-09-01 12:16:39', '2026-09-01 12:16:39');

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

--
-- Table structure for table `invoices`
--

CREATE TABLE `invoices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `invoice_number` varchar(255) NOT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `subtotal` decimal(12,2) NOT NULL,
  `discount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `shipping_cost` decimal(12,2) NOT NULL DEFAULT 0.00,
  `tax` decimal(12,2) NOT NULL DEFAULT 0.00,
  `additional_charges` decimal(12,2) NOT NULL DEFAULT 0.00,
  `grand_total` decimal(12,2) NOT NULL,
  `payment_method` varchar(255) DEFAULT NULL,
  `payment_status` enum('pending','paid','failed','refunded') NOT NULL DEFAULT 'pending',
  `issued_at` timestamp NULL DEFAULT NULL,
  `due_at` timestamp NULL 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 `invoices`
--

INSERT INTO `invoices` (`id`, `invoice_number`, `order_id`, `customer_id`, `subtotal`, `discount`, `shipping_cost`, `tax`, `additional_charges`, `grand_total`, `payment_method`, `payment_status`, `issued_at`, `due_at`, `created_at`, `updated_at`) VALUES
(1, 'INV-2026-000001', 29, 1, 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, 'pending', NULL, '2026-09-28 03:36:31', '2026-08-29 03:36:31', '2026-08-29 03:43:32'),
(2, 'INV-2026-000002', 22, 1, 639998.00, 0.00, 0.00, 0.00, 0.00, 639998.00, NULL, 'pending', NULL, '2026-09-28 03:41:53', '2026-08-29 03:41:53', '2026-08-29 03:41:53'),
(3, 'INV-2026-000003', 34, NULL, 360.00, 180.00, 320.00, 0.00, 0.00, 500.00, NULL, 'pending', NULL, '2026-10-01 12:17:31', '2026-09-01 12:17:31', '2026-09-01 12:17:31');

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

--
-- Table structure for table `invoice_items`
--

CREATE TABLE `invoice_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `invoice_id` bigint(20) UNSIGNED NOT NULL,
  `order_item_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_name` varchar(255) NOT NULL,
  `sku` varchar(255) NOT NULL,
  `quantity` int(10) UNSIGNED NOT NULL,
  `unit_price` decimal(12,2) NOT NULL,
  `discount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `tax` decimal(12,2) NOT NULL DEFAULT 0.00,
  `line_total` decimal(12,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 `invoice_items`
--

INSERT INTO `invoice_items` (`id`, `invoice_id`, `order_item_id`, `product_name`, `sku`, `quantity`, `unit_price`, `discount`, `tax`, `line_total`, `created_at`, `updated_at`) VALUES
(1, 1, 34, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-29 03:41:21', '2026-08-29 03:41:21'),
(2, 2, 25, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-29 03:41:53', '2026-08-29 03:41:53'),
(3, 2, 26, 'iPhone 15 Pro Max', 'APL-15PM-001', 1, 349999.00, 0.00, 0.00, 349999.00, '2026-08-29 03:41:53', '2026-08-29 03:41:53'),
(4, 3, 38, 'Samsung Galaxy S24 Ultra', 'T1', 4, 90.00, 0.00, 0.00, 360.00, '2026-09-01 12:17:31', '2026-09-01 12:17:31');

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

--
-- 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, '2026_01_01_000001_create_users_table', 1),
(2, '2026_01_01_000002_create_roles_table', 1),
(3, '2026_01_01_000003_create_permissions_table', 1),
(4, '2026_01_01_000004_create_role_permission_table', 1),
(5, '2026_01_01_000005_create_user_role_table', 1),
(6, '2026_01_01_000006_create_customers_table', 1),
(7, '2026_01_01_000007_create_customer_addresses_table', 1),
(8, '2026_01_01_000008_create_customer_verifications_table', 1),
(9, '2026_01_01_000009_create_cache_table', 1),
(10, '2026_01_01_000010_create_jobs_table', 1),
(11, '2026_01_02_000001_create_categories_table', 1),
(12, '2026_01_02_000002_create_brands_table', 1),
(13, '2026_01_02_000003_create_tags_table', 1),
(14, '2026_01_02_000004_create_attributes_table', 1),
(15, '2026_01_02_000005_create_attribute_values_table', 1),
(16, '2026_01_02_000006_create_products_table', 1),
(17, '2026_01_02_000007_create_product_categories_table', 1),
(18, '2026_01_02_000008_create_product_brands_table', 1),
(19, '2026_01_02_000009_create_product_tags_table', 1),
(20, '2026_01_02_000010_create_product_attribute_values_table', 1),
(21, '2026_01_02_000011_create_product_variants_table', 1),
(22, '2026_01_02_000012_create_product_images_table', 1),
(23, '2026_01_03_000001_create_carts_table', 1),
(24, '2026_01_03_000002_create_cart_items_table', 1),
(25, '2026_01_03_000003_create_orders_table', 1),
(26, '2026_01_03_000004_create_order_items_table', 1),
(27, '2026_01_03_000005_create_order_addresses_table', 1),
(28, '2026_01_03_000006_create_order_charges_table', 1),
(29, '2026_01_03_000007_create_order_status_histories_table', 1),
(30, '2026_01_03_000008_create_inventories_table', 1),
(31, '2026_01_03_000009_create_inventory_movements_table', 1),
(32, '2026_01_04_000001_create_coupons_table', 1),
(33, '2026_01_04_000002_create_coupon_products_table', 1),
(34, '2026_01_04_000003_create_coupon_categories_table', 1),
(35, '2026_01_04_000004_create_coupon_usages_table', 1),
(36, '2026_01_04_000005_create_discount_campaigns_table', 1),
(37, '2026_01_04_000006_create_campaign_products_table', 1),
(38, '2026_01_04_000007_create_flash_sales_table', 1),
(39, '2026_01_04_000008_create_flash_sale_products_table', 1),
(40, '2026_01_04_000009_create_shipping_zones_table', 1),
(41, '2026_01_04_000010_create_shipping_zone_cities_table', 1),
(42, '2026_01_04_000011_create_shipping_methods_table', 1),
(43, '2026_01_04_000012_create_shipping_rules_table', 1),
(44, '2026_01_04_000013_create_tax_rules_table', 1),
(45, '2026_01_04_000014_create_tax_rule_targets_table', 1),
(46, '2026_01_04_000015_create_return_reasons_table', 1),
(47, '2026_01_04_000016_create_returns_table', 1),
(48, '2026_01_04_000017_create_return_items_table', 1),
(49, '2026_01_04_000018_create_return_status_histories_table', 1),
(50, '2026_01_04_000019_create_reviews_table', 1),
(51, '2026_01_04_000020_create_review_images_table', 1),
(52, '2026_01_05_000001_create_wishlists_table', 1),
(53, '2026_01_05_000002_create_wishlist_items_table', 1),
(54, '2026_01_05_000003_create_invoices_table', 1),
(55, '2026_01_05_000004_create_invoice_items_table', 1),
(56, '2026_01_05_000005_create_pages_table', 1),
(57, '2026_01_05_000006_create_banners_table', 1),
(58, '2026_01_05_000007_create_settings_table', 1),
(59, '2026_01_05_000008_create_audit_logs_table', 1),
(60, '2026_08_27_060041_create_sessions_table', 2),
(61, '2026_01_06_000001_add_is_active_to_customers_table', 3),
(62, '2026_01_06_000002_create_notifications_table', 4),
(63, '2026_08_27_060100_add_cost_fields_to_shipping_methods_table', 4),
(64, '2026_01_06_000003_add_discount_fields_to_products_table', 5),
(65, '2026_08_29_065258_create_enquiries_table', 6),
(66, '2026_08_29_000001_create_campaign_categories_table', 7),
(67, '2026_08_29_071719_add_color_to_banners_table', 7),
(68, '2026_08_29_071740_add_sale_position_to_banners_table', 7),
(69, '2026_08_29_072653_add_subtitle_to_banners_table', 8),
(70, '2026_08_29_080449_add_cta2_to_banners_table', 9),
(71, '2026_08_29_000100_add_missing_columns_to_flash_sale_products_table', 10),
(72, '2026_08_29_000101_create_flash_sale_categories_table', 11),
(73, '2026_08_31_072508_create_blog_posts_table', 12),
(74, '2026_09_01_000001_fix_notifications_notifiable_id_type', 13),
(75, '2026_09_01_000002_revert_notifiable_id_type', 14),
(76, '2026_09_01_000003_add_reserved_released_to_inventory_movements_type', 15),
(77, '2026_09_01_175448_create_variant_attribute_values_table', 16),
(78, '2026_09_01_175449_add_unique_constraint_to_cart_items_table', 17),
(79, '2026_09_01_175450_fix_variant_sku_unique_constraint', 17),
(80, '2026_09_01_175451_add_timestamps_to_product_attribute_values_table', 17);

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

--
-- Table structure for table `notifications`
--

CREATE TABLE `notifications` (
  `id` char(36) NOT NULL,
  `type` varchar(255) DEFAULT NULL,
  `notifiable_id` bigint(20) UNSIGNED NOT NULL,
  `notifiable_type` varchar(255) NOT NULL,
  `data` text NOT NULL,
  `read_at` timestamp NULL 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 `notifications`
--

INSERT INTO `notifications` (`id`, `type`, `notifiable_id`, `notifiable_type`, `data`, `read_at`, `created_at`, `updated_at`) VALUES
('485b1291-fa5e-450d-b50c-44b7ee1ad005', 'App\\Notifications\\Admin\\GenericAdminNotification', 1, 'App\\Models\\User', '{\"title\":\"Product Updated\",\"message\":\"Product \'Samsung Galaxy S24 Ultra\' has been updated.\",\"product_id\":1}', '2026-09-01 06:56:41', '2026-09-01 06:52:52', '2026-09-01 06:56:41'),
('b607886c-61a8-4778-b695-c3b4354fa0b6', 'App\\Notifications\\TestNotification', 0, 'App\\Models\\User', '\"{\\\"title\\\":\\\"Test Title\\\",\\\"message\\\":\\\"This is a test\\\",\\\"url\\\":\\\"\\\\\\/admin\\\\\\/dashboard\\\"}\"', '2026-09-01 05:52:10', '2026-09-01 05:41:59', '2026-09-01 05:52:10');

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

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

CREATE TABLE `orders` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `order_number` varchar(255) NOT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `status` enum('pending','confirmed','processing','ready_to_ship','shipped','out_for_delivery','delivered','cancelled') NOT NULL DEFAULT 'pending',
  `payment_method` varchar(255) NOT NULL DEFAULT 'cod',
  `payment_status` enum('pending','paid','failed','refunded') NOT NULL DEFAULT 'pending',
  `subtotal` decimal(12,2) NOT NULL,
  `discount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `shipping_cost` decimal(12,2) NOT NULL DEFAULT 0.00,
  `tax` decimal(12,2) NOT NULL DEFAULT 0.00,
  `additional_charges` decimal(12,2) NOT NULL DEFAULT 0.00,
  `grand_total` decimal(12,2) NOT NULL,
  `notes` text DEFAULT NULL,
  `coupon_code` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `orders` (`id`, `order_number`, `customer_id`, `user_id`, `status`, `payment_method`, `payment_status`, `subtotal`, `discount`, `shipping_cost`, `tax`, `additional_charges`, `grand_total`, `notes`, `coupon_code`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'ORD-0001', 1, 3, 'delivered', 'cod', 'paid', 150000.00, 0.00, 500.00, 22500.00, 0.00, 172500.00, '', NULL, '2026-08-28 06:15:44', '2026-08-28 06:15:44', NULL),
(2, 'ORD-0002', 1, 3, 'delivered', 'cod', 'paid', 75000.00, 500.00, 300.00, 11250.00, 0.00, 80850.00, '', NULL, '2026-08-28 06:15:44', '2026-08-28 06:15:44', NULL),
(3, 'ORD-0003', NULL, NULL, 'confirmed', 'cod', 'pending', 45000.00, 0.00, 500.00, 6750.00, 0.00, 52250.00, '', NULL, '2026-08-28 06:15:44', '2026-08-28 06:15:44', NULL),
(4, 'ORD-0004', 1, 3, 'shipped', 'card', 'paid', 120000.00, 1000.00, 500.00, 18000.00, 0.00, 137500.00, '', NULL, '2026-08-28 06:15:44', '2026-08-28 06:15:44', NULL),
(5, 'ORD-0005', NULL, NULL, 'delivered', 'cod', 'paid', 32000.00, 0.00, 300.00, 4800.00, 0.00, 37300.00, '', NULL, '2026-08-28 06:15:44', '2026-08-28 06:15:44', NULL),
(6, 'ORD-0006', 2, 3, 'pending', 'cod', 'pending', 28000.00, 0.00, 500.00, 4200.00, 0.00, 32700.00, '', NULL, '2026-08-28 06:15:44', '2026-08-28 06:15:44', NULL),
(11, 'ORD-36U6SYJVWN', 1, 3, 'pending', 'cash_on_delivery', 'pending', 7829973.00, 0.00, 0.00, 0.00, 0.00, 7829973.00, NULL, NULL, '2026-08-28 05:19:03', '2026-08-28 05:19:03', NULL),
(12, 'ORD-UF7GBKF9IG', 1, 3, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-28 05:19:37', '2026-08-28 05:19:37', NULL),
(13, 'ORD-4G0YZTW1FG', 1, 3, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-28 05:30:01', '2026-08-28 05:30:01', NULL),
(14, 'ORD-EAKJWBCXFL', 1, 3, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-28 05:30:25', '2026-08-28 05:30:25', NULL),
(15, 'ORD-MVMNXHF6ER', 1, 3, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-28 05:31:44', '2026-08-28 05:31:44', NULL),
(16, 'ORD-7HEXXTAVVC', 1, 3, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-28 05:32:07', '2026-08-28 05:32:07', NULL),
(17, 'ORD-QTVWKWQBOF', 1, 3, 'pending', 'cash_on_delivery', 'pending', 1159996.00, 0.00, 0.00, 0.00, 0.00, 1159996.00, NULL, NULL, '2026-08-28 05:34:30', '2026-08-28 05:34:30', NULL),
(18, 'ORD-Z8MY9MISBF', 1, 3, 'pending', 'cash_on_delivery', 'pending', 639998.00, 0.00, 0.00, 0.00, 0.00, 639998.00, NULL, NULL, '2026-08-28 05:55:56', '2026-08-28 05:55:56', NULL),
(19, 'ORD-BOZELEPK0Y', NULL, NULL, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-28 05:59:48', '2026-08-28 05:59:48', NULL),
(20, 'ORD-5W36VJLJQC', 1, 3, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-28 06:19:47', '2026-08-28 06:19:47', NULL),
(21, 'ORD-G0FKI7K63A', 1, 3, 'pending', 'cash_on_delivery', 'pending', 639998.00, 0.00, 0.00, 0.00, 0.00, 639998.00, NULL, NULL, '2026-08-28 06:29:40', '2026-08-28 06:29:40', NULL),
(22, 'ORD-NHZLEDBSJT', 1, 3, 'pending', 'cash_on_delivery', 'pending', 639998.00, 0.00, 0.00, 0.00, 0.00, 639998.00, NULL, NULL, '2026-08-28 06:42:58', '2026-08-28 06:42:58', NULL),
(23, 'ORD-53HCU4TA8N', 1, 3, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-28 06:44:29', '2026-08-28 06:44:29', NULL),
(24, 'ORD-HP2LFFGHGW', 1, 3, 'pending', 'cash_on_delivery', 'pending', 1919994.00, 0.00, 0.00, 0.00, 0.00, 1919994.00, NULL, NULL, '2026-08-28 08:23:58', '2026-08-28 08:23:58', NULL),
(25, 'ORD-BQ1FHICIS6', 1, 3, 'pending', 'cash_on_delivery', 'pending', 349999.00, 0.00, 0.00, 0.00, 0.00, 349999.00, NULL, NULL, '2026-08-28 08:34:53', '2026-08-28 08:34:53', NULL),
(26, 'ORD-9XNMXMV3I4', 1, 3, 'pending', 'cash_on_delivery', 'pending', 699998.00, 0.00, 0.00, 0.00, 0.00, 699998.00, NULL, NULL, '2026-08-28 08:51:48', '2026-08-28 08:51:48', NULL),
(27, 'ORD-NUXA5QUEAI', NULL, NULL, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-28 09:01:52', '2026-08-28 09:01:52', NULL),
(28, 'ORD-MF7OW33PY7', NULL, NULL, 'pending', 'cash_on_delivery', 'pending', 349999.00, 0.00, 0.00, 0.00, 0.00, 349999.00, NULL, NULL, '2026-08-28 11:01:33', '2026-08-28 11:01:33', NULL),
(29, 'ORD-YIKMTFVLOX', NULL, NULL, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-29 00:50:01', '2026-08-29 00:50:01', NULL),
(30, 'ORD-XB1LV0QSSK', NULL, NULL, 'pending', 'cash_on_delivery', 'pending', 289999.00, 0.00, 0.00, 0.00, 0.00, 289999.00, NULL, NULL, '2026-08-29 05:23:22', '2026-08-29 05:23:22', NULL),
(34, 'ORD-XLYYXKURKD', NULL, NULL, 'pending', 'cash_on_delivery', 'pending', 360.00, 180.00, 320.00, 0.00, 0.00, 500.00, NULL, 'CODE1', '2026-09-01 12:16:39', '2026-09-01 12:16:39', NULL);

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

--
-- Table structure for table `order_addresses`
--

CREATE TABLE `order_addresses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `type` enum('shipping','billing') NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `address_line_1` varchar(255) NOT NULL,
  `address_line_2` varchar(255) DEFAULT NULL,
  `city` varchar(255) NOT NULL,
  `state` varchar(255) NOT NULL,
  `postal_code` varchar(255) DEFAULT NULL,
  `country` varchar(255) NOT NULL DEFAULT 'Pakistan',
  `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_addresses`
--

INSERT INTO `order_addresses` (`id`, `order_id`, `type`, `full_name`, `phone`, `address_line_1`, `address_line_2`, `city`, `state`, `postal_code`, `country`, `created_at`, `updated_at`) VALUES
(5, 11, 'shipping', 'Test User', '123456789', '123 Test Street', NULL, 'TestCity', 'TestState', '12345', 'Switzerland', '2026-08-28 05:19:03', '2026-08-28 05:19:03'),
(6, 11, 'billing', 'Test User', '123456789', '123 Test Street', NULL, 'TestCity', 'TestState', '12345', 'Switzerland', '2026-08-28 05:19:03', '2026-08-28 05:19:03'),
(7, 12, 'shipping', 'Test User', '123456789', '123 Test Street', NULL, 'TestCity', 'TestState', '12345', 'Switzerland', '2026-08-28 05:19:37', '2026-08-28 05:19:37'),
(8, 12, 'billing', 'Test User', '123456789', '123 Test Street', NULL, 'TestCity', 'TestState', '12345', 'Switzerland', '2026-08-28 05:19:37', '2026-08-28 05:19:37'),
(9, 13, 'shipping', 'Test User', '123456789', '123 Test Street', 'Apt 4B', 'TestCity', 'TestState', '12345', 'Switzerland', '2026-08-28 05:30:01', '2026-08-28 05:30:01'),
(10, 13, 'billing', 'Test User', '123456789', '123 Test Street', 'Apt 4B', 'TestCity', 'TestState', '12345', 'Switzerland', '2026-08-28 05:30:01', '2026-08-28 05:30:01'),
(11, 14, 'shipping', 'Test User', '123456789', '123 Test Street', 'Apt 4B', 'TestCity', 'TestState', '12345', 'Switzerland', '2026-08-28 05:30:25', '2026-08-28 05:30:25'),
(12, 14, 'billing', 'Test User', '123456789', '123 Test Street', 'Apt 4B', 'TestCity', 'TestState', '12345', 'Switzerland', '2026-08-28 05:30:25', '2026-08-28 05:30:25'),
(13, 15, 'shipping', 'Jane Doe', '987654321', '456 New Ave', NULL, 'Bern', 'BE', '3000', 'Switzerland', '2026-08-28 05:31:44', '2026-08-28 05:31:44'),
(14, 15, 'billing', 'Jane Doe', '987654321', '456 New Ave', NULL, 'Bern', 'BE', '3000', 'Switzerland', '2026-08-28 05:31:44', '2026-08-28 05:31:44'),
(15, 16, 'shipping', 'Jane Doe', '987654321', '456 New Ave', NULL, 'Bern', 'BE', '3000', 'Switzerland', '2026-08-28 05:32:08', '2026-08-28 05:32:08'),
(16, 16, 'billing', 'Jane Doe', '987654321', '456 New Ave', NULL, 'Bern', 'BE', '3000', 'Switzerland', '2026-08-28 05:32:08', '2026-08-28 05:32:08'),
(17, 17, 'shipping', 'Jane Doe', '987654321', '456 New Ave', NULL, 'Bern', 'BE', '3000', 'Switzerland', '2026-08-28 05:34:30', '2026-08-28 05:34:30'),
(18, 17, 'billing', 'Jane Doe', '987654321', '456 New Ave', NULL, 'Bern', 'BE', '3000', 'Switzerland', '2026-08-28 05:34:30', '2026-08-28 05:34:30'),
(19, 18, 'shipping', 'Test Customer', '41791234567', '123 Main St', NULL, 'Geneva', 'GE', '1201', 'Switzerland', '2026-08-28 05:55:56', '2026-08-28 05:55:56'),
(20, 18, 'billing', 'Test Customer', '41791234567', '123 Main St', NULL, 'Geneva', 'GE', '1201', 'Switzerland', '2026-08-28 05:55:56', '2026-08-28 05:55:56'),
(21, 19, 'shipping', 'Sohail Khan', '923149416858', 'i8, islamabad', NULL, 'islamabad', 'islamabad', '4444', 'Switzerland', '2026-08-28 05:59:48', '2026-08-28 05:59:48'),
(22, 19, 'billing', 'Sohail Khan', '923149416858', 'i8, islamabad', NULL, 'islamabad', 'islamabad', '4444', 'Switzerland', '2026-08-28 05:59:48', '2026-08-28 05:59:48'),
(23, 20, 'shipping', 'Jane Doe', '41793456789', '456 New Avenue', NULL, 'Geneva', 'Geneva canton', '1201', 'Switzerland', '2026-08-28 06:19:47', '2026-08-28 06:19:47'),
(24, 20, 'billing', 'Jane Doe', '41793456789', '456 New Avenue', NULL, 'Geneva', 'Geneva canton', '1201', 'Switzerland', '2026-08-28 06:19:47', '2026-08-28 06:19:47'),
(25, 21, 'shipping', 'Jane Doe', '41793456789', '456 New Ave', NULL, 'Geneva', 'Geneva canton', '1201', 'Switzerland', '2026-08-28 06:29:40', '2026-08-28 06:29:40'),
(26, 21, 'billing', 'Jane Doe', '41793456789', '456 New Ave', NULL, 'Geneva', 'Geneva canton', '1201', 'Switzerland', '2026-08-28 06:29:40', '2026-08-28 06:29:40'),
(27, 22, 'shipping', 'John Doe', '12125551234', '123 Main Street', NULL, 'New York', 'NY', '10001', 'USA', '2026-08-28 06:42:58', '2026-08-28 06:42:58'),
(28, 22, 'billing', 'John Doe', '12125551234', '123 Main Street', NULL, 'New York', 'NY', '10001', 'USA', '2026-08-28 06:42:58', '2026-08-28 06:42:58'),
(29, 23, 'shipping', 'John Doe', '12125551234', '123 Main St', NULL, 'New York', 'NY', '10001', 'USA', '2026-08-28 06:44:29', '2026-08-28 06:44:29'),
(30, 23, 'billing', 'John Doe', '12125551234', '123 Main St', NULL, 'New York', 'NY', '10001', 'USA', '2026-08-28 06:44:29', '2026-08-28 06:44:29'),
(31, 24, 'shipping', 'John Doe', '12125551234', '123 Main St', NULL, 'New York', 'NY', '10001', 'USA', '2026-08-28 08:23:58', '2026-08-28 08:23:58'),
(32, 24, 'billing', 'John Doe', '12125551234', '123 Main St', NULL, 'New York', 'NY', '10001', 'USA', '2026-08-28 08:23:58', '2026-08-28 08:23:58'),
(33, 25, 'shipping', 'Test User', '923001234567', '123 Main St', NULL, 'Karachi', 'Sindh', '75500', 'Pakistan', '2026-08-28 08:34:53', '2026-08-28 08:34:53'),
(34, 25, 'billing', 'Test User', '923001234567', '123 Main St', NULL, 'Karachi', 'Sindh', '75500', 'Pakistan', '2026-08-28 08:34:53', '2026-08-28 08:34:53'),
(35, 26, 'shipping', 'Test User', '923001234567', '123 Main St', NULL, 'Karachi', 'Sindh', '75500', 'Pakistan', '2026-08-28 08:51:48', '2026-08-28 08:51:48'),
(36, 26, 'billing', 'Test User', '923001234567', '123 Main St', NULL, 'Karachi', 'Sindh', '75500', 'Pakistan', '2026-08-28 08:51:48', '2026-08-28 08:51:48'),
(37, 27, 'shipping', 'test test', '2345676432', 'test', NULL, 'test', 'test', '34567', 'Pakistan', '2026-08-28 09:01:53', '2026-08-28 09:01:53'),
(38, 27, 'billing', 'test test', '2345676432', 'test', NULL, 'test', 'test', '34567', 'Pakistan', '2026-08-28 09:01:53', '2026-08-28 09:01:53'),
(39, 28, 'shipping', 'test now', '12345678', 'test, now', NULL, 'test', 'now', '1234567', 'Pakistan', '2026-08-28 11:01:33', '2026-08-28 11:01:33'),
(40, 28, 'billing', 'test now', '12345678', 'test, now', NULL, 'test', 'now', '1234567', 'Pakistan', '2026-08-28 11:01:33', '2026-08-28 11:01:33'),
(41, 29, 'shipping', 'test test', '+123456789', 'test', NULL, 'test', 'test', '23456789', 'Pakistan', '2026-08-29 00:50:01', '2026-08-29 00:50:01'),
(42, 29, 'billing', 'test test', '+123456789', 'test', NULL, 'test', 'test', '23456789', 'Pakistan', '2026-08-29 00:50:01', '2026-08-29 00:50:01'),
(43, 30, 'shipping', 'test GFF', '234567890', 'ljsdlfjds;', NULL, 'lkfjlkq', 'lkdjlfd', '234567', 'Pakistan', '2026-08-29 05:23:22', '2026-08-29 05:23:22'),
(44, 30, 'billing', 'test GFF', '234567890', 'ljsdlfjds;', NULL, 'lkfjlkq', 'lkdjlfd', '234567', 'Pakistan', '2026-08-29 05:23:22', '2026-08-29 05:23:22'),
(49, 34, 'shipping', 'tewst jfld', '234567890', 'fajdljsf', NULL, 'jfljlf', 'lkjflds', '23567', 'Pakistan', '2026-09-01 12:16:39', '2026-09-01 12:16:39'),
(50, 34, 'billing', 'tewst jfld', '234567890', 'fajdljsf', NULL, 'jfljlf', 'lkjflds', '23567', 'Pakistan', '2026-09-01 12:16:39', '2026-09-01 12:16:39');

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

--
-- Table structure for table `order_charges`
--

CREATE TABLE `order_charges` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `charge_type` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `amount` decimal(12,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_charges`
--

INSERT INTO `order_charges` (`id`, `order_id`, `charge_type`, `name`, `amount`, `created_at`, `updated_at`) VALUES
(2, 11, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 05:19:03', '2026-08-28 05:19:03'),
(3, 12, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 05:19:37', '2026-08-28 05:19:37'),
(4, 13, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 05:30:01', '2026-08-28 05:30:01'),
(5, 14, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 05:30:25', '2026-08-28 05:30:25'),
(6, 15, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 05:31:44', '2026-08-28 05:31:44'),
(7, 16, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 05:32:08', '2026-08-28 05:32:08'),
(8, 17, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 05:34:30', '2026-08-28 05:34:30'),
(9, 18, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 05:55:56', '2026-08-28 05:55:56'),
(10, 19, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 05:59:48', '2026-08-28 05:59:48'),
(11, 20, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 06:19:47', '2026-08-28 06:19:47'),
(12, 21, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 06:29:40', '2026-08-28 06:29:40'),
(13, 22, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 06:42:58', '2026-08-28 06:42:58'),
(14, 23, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 06:44:29', '2026-08-28 06:44:29'),
(15, 24, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 08:23:58', '2026-08-28 08:23:58'),
(16, 25, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 08:34:53', '2026-08-28 08:34:53'),
(17, 26, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 08:51:48', '2026-08-28 08:51:48'),
(18, 27, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 09:01:53', '2026-08-28 09:01:53'),
(19, 28, 'shipping', 'Standard Shipping', 0.00, '2026-08-28 11:01:33', '2026-08-28 11:01:33'),
(20, 29, 'shipping', 'Standard Shipping', 0.00, '2026-08-29 00:50:01', '2026-08-29 00:50:01'),
(21, 30, 'shipping', 'Standard Shipping', 0.00, '2026-08-29 05:23:22', '2026-08-29 05:23:22'),
(24, 34, 'shipping', 'Urgent Shipping', 320.00, '2026-09-01 12:16:39', '2026-09-01 12:16:39');

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

--
-- 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 DEFAULT NULL,
  `variant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_name` varchar(255) NOT NULL,
  `sku` varchar(255) NOT NULL,
  `variant_name` varchar(255) DEFAULT NULL,
  `quantity` int(11) NOT NULL,
  `unit_price` decimal(12,2) NOT NULL,
  `discount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `tax` decimal(12,2) NOT NULL DEFAULT 0.00,
  `line_total` decimal(12,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`, `variant_id`, `product_name`, `sku`, `variant_name`, `quantity`, `unit_price`, `discount`, `tax`, `line_total`, `created_at`, `updated_at`) VALUES
(1, 1, 1, NULL, 'Samsung Galaxy S24 Ultra', 'S24U-256', NULL, 1, 150000.00, 0.00, 0.00, 150000.00, '2026-08-28 06:15:44', '2026-08-28 06:15:44'),
(2, 2, 3, NULL, 'Samsung Galaxy Buds2 Pro', 'BUDS2PRO', NULL, 2, 37500.00, 250.00, 0.00, 74750.00, '2026-08-28 06:15:44', '2026-08-28 06:15:44'),
(3, 3, 5, NULL, 'Laptop Stand Adjustable', 'LAP-STAND', NULL, 1, 45000.00, 0.00, 0.00, 45000.00, '2026-08-28 06:15:44', '2026-08-28 06:15:44'),
(4, 4, 1, NULL, 'Samsung Galaxy S24 Ultra', 'S24U-256', NULL, 1, 120000.00, 0.00, 0.00, 120000.00, '2026-08-28 06:15:44', '2026-08-28 06:15:44'),
(5, 4, 4, NULL, 'Nike Air Max 270', 'AIRMAX270', NULL, 1, 15000.00, 0.00, 0.00, 15000.00, '2026-08-28 06:15:44', '2026-08-28 06:15:44'),
(6, 5, 5, NULL, 'Laptop Stand Adjustable', 'LAP-STAND', NULL, 1, 32000.00, 0.00, 0.00, 32000.00, '2026-08-28 06:15:44', '2026-08-28 06:15:44'),
(7, 6, 2, NULL, 'iPhone 15 Pro Max', 'IP15PM', NULL, 1, 28000.00, 0.00, 0.00, 28000.00, '2026-08-28 06:15:44', '2026-08-28 06:15:44'),
(12, 11, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 27, 269999.00, 0.00, 0.00, 7289973.00, '2026-08-28 05:19:03', '2026-08-28 05:19:03'),
(13, 12, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 05:19:37', '2026-08-28 05:19:37'),
(14, 13, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 05:30:01', '2026-08-28 05:30:01'),
(15, 14, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 05:30:25', '2026-08-28 05:30:25'),
(16, 15, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 05:31:44', '2026-08-28 05:31:44'),
(17, 16, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 05:32:07', '2026-08-28 05:32:07'),
(18, 17, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 4, 269999.00, 0.00, 0.00, 1079996.00, '2026-08-28 05:34:30', '2026-08-28 05:34:30'),
(19, 18, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 05:55:56', '2026-08-28 05:55:56'),
(20, 18, 2, NULL, 'iPhone 15 Pro Max', 'APL-15PM-001', NULL, 1, 349999.00, 0.00, 0.00, 349999.00, '2026-08-28 05:55:56', '2026-08-28 05:55:56'),
(21, 19, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 05:59:48', '2026-08-28 05:59:48'),
(22, 20, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 06:19:47', '2026-08-28 06:19:47'),
(23, 21, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 06:29:40', '2026-08-28 06:29:40'),
(24, 21, 2, NULL, 'iPhone 15 Pro Max', 'APL-15PM-001', NULL, 1, 349999.00, 0.00, 0.00, 349999.00, '2026-08-28 06:29:40', '2026-08-28 06:29:40'),
(25, 22, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 06:42:58', '2026-08-28 06:42:58'),
(26, 22, 2, NULL, 'iPhone 15 Pro Max', 'APL-15PM-001', NULL, 1, 349999.00, 0.00, 0.00, 349999.00, '2026-08-28 06:42:58', '2026-08-28 06:42:58'),
(27, 23, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 06:44:29', '2026-08-28 06:44:29'),
(28, 24, 2, NULL, 'iPhone 15 Pro Max', 'APL-15PM-001', NULL, 3, 349999.00, 0.00, 0.00, 1049997.00, '2026-08-28 08:23:58', '2026-08-28 08:23:58'),
(29, 24, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 3, 269999.00, 0.00, 0.00, 809997.00, '2026-08-28 08:23:58', '2026-08-28 08:23:58'),
(30, 25, 2, NULL, 'iPhone 15 Pro Max', 'APL-15PM-001', NULL, 1, 349999.00, 0.00, 0.00, 349999.00, '2026-08-28 08:34:53', '2026-08-28 08:34:53'),
(31, 26, 2, NULL, 'iPhone 15 Pro Max', 'APL-15PM-001', NULL, 2, 349999.00, 0.00, 0.00, 699998.00, '2026-08-28 08:51:48', '2026-08-28 08:51:48'),
(32, 27, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-28 09:01:52', '2026-08-28 09:01:52'),
(33, 28, 2, NULL, 'iPhone 15 Pro Max', 'APL-15PM-001', NULL, 1, 349999.00, 0.00, 0.00, 349999.00, '2026-08-28 11:01:33', '2026-08-28 11:01:33'),
(34, 29, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-29 00:50:01', '2026-08-29 00:50:01'),
(35, 30, 1, NULL, 'Samsung Galaxy S24 Ultra', 'SAM-S24U-001', NULL, 1, 269999.00, 0.00, 0.00, 269999.00, '2026-08-29 05:23:22', '2026-08-29 05:23:22'),
(38, 34, 1, 2, 'Samsung Galaxy S24 Ultra', 'T1', NULL, 4, 90.00, 0.00, 0.00, 360.00, '2026-09-01 12:16:39', '2026-09-01 12:16:39');

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

--
-- Table structure for table `order_status_histories`
--

CREATE TABLE `order_status_histories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `from_status` varchar(255) DEFAULT NULL,
  `to_status` varchar(255) NOT NULL,
  `note` varchar(255) DEFAULT NULL,
  `changed_by` bigint(20) UNSIGNED 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 `order_status_histories`
--

INSERT INTO `order_status_histories` (`id`, `order_id`, `from_status`, `to_status`, `note`, `changed_by`, `created_at`, `updated_at`) VALUES
(1, 11, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 05:19:03', '2026-08-28 05:19:03'),
(2, 12, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 05:19:37', '2026-08-28 05:19:37'),
(3, 13, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 05:30:01', '2026-08-28 05:30:01'),
(4, 14, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 05:30:25', '2026-08-28 05:30:25'),
(5, 15, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 05:31:44', '2026-08-28 05:31:44'),
(6, 16, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 05:32:08', '2026-08-28 05:32:08'),
(7, 17, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 05:34:30', '2026-08-28 05:34:30'),
(8, 18, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 05:55:56', '2026-08-28 05:55:56'),
(9, 19, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 05:59:48', '2026-08-28 05:59:48'),
(10, 20, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 06:19:47', '2026-08-28 06:19:47'),
(11, 21, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 06:29:40', '2026-08-28 06:29:40'),
(12, 22, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 06:42:58', '2026-08-28 06:42:58'),
(13, 23, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 06:44:29', '2026-08-28 06:44:29'),
(14, 24, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 08:23:58', '2026-08-28 08:23:58'),
(15, 25, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 08:34:53', '2026-08-28 08:34:53'),
(16, 26, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 08:51:48', '2026-08-28 08:51:48'),
(17, 27, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 09:01:53', '2026-08-28 09:01:53'),
(18, 28, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-28 11:01:33', '2026-08-28 11:01:33'),
(19, 29, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-29 00:50:01', '2026-08-29 00:50:01'),
(20, 30, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-29 05:23:22', '2026-08-29 05:23:22'),
(21, 31, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-30 23:47:47', '2026-08-30 23:47:47'),
(22, 32, NULL, 'pending', 'Order placed successfully.', NULL, '2026-08-30 23:49:06', '2026-08-30 23:49:06'),
(23, 34, NULL, 'pending', 'Order placed successfully.', NULL, '2026-09-01 12:16:39', '2026-09-01 12:16:39');

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

--
-- Table structure for table `pages`
--

CREATE TABLE `pages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `content` longtext DEFAULT NULL,
  `status` enum('draft','published') NOT NULL DEFAULT 'draft',
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `og_title` varchar(255) DEFAULT NULL,
  `og_description` text DEFAULT NULL,
  `og_image` varchar(255) DEFAULT NULL,
  `canonical_url` varchar(255) DEFAULT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pages`
--

INSERT INTO `pages` (`id`, `title`, `slug`, `content`, `status`, `meta_title`, `meta_description`, `og_title`, `og_description`, `og_image`, `canonical_url`, `sort_order`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Terms & Conditions', 'terms', '<h2>1. Acceptance of Terms</h2>\n<p>By accessing and using the Swiss E-Com platform, you agree to be bound by these Terms & Conditions. If you do not agree, please do not use our services.</p>\n\n<h2>2. Account Registration</h2>\n<p>To place an order, you must create an account. You are responsible for maintaining the confidentiality of your account credentials and for all activities that occur under your account.</p>\n\n<h2>3. Products & Pricing</h2>\n<p>All product prices are listed in the local currency and are subject to change without prior notice. We reserve the right to modify or discontinue any product at any time.</p>\n\n<h2>4. Orders & Payment</h2>\n<p>Orders are confirmed only after successful payment. We accept major credit cards, debit cards, and other payment methods listed at checkout. In case of payment failure, the order will be automatically cancelled.</p>\n\n<h2>5. Shipping & Delivery</h2>\n<p>We deliver to the addresses specified in your order. Delivery times are estimates and may vary based on your location and product availability. Risk of loss and title for items pass to you upon delivery.</p>\n\n<h2>6. Returns & Refunds</h2>\n<p>Please refer to our <a href=\"/return-policy\">Return & Refund Policy</a> for details on returning products and receiving refunds.</p>\n\n<h2>7. Intellectual Property</h2>\n<p>All content on this site, including text, graphics, logos, and images, is the property of Swiss E-Com and is protected by applicable copyright and trademark laws.</p>\n\n<h2>8. Limitation of Liability</h2>\n<p>Swiss E-Com shall not be liable for any indirect, incidental, or consequential damages arising from the use of our services or products.</p>\n\n<h2>9. Changes to Terms</h2>\n<p>We reserve the right to modify these Terms & Conditions at any time. Continued use of the platform after changes constitutes acceptance of the new terms.</p>', 'published', 'Terms & Conditions - Swiss E-Com', 'Read our terms and conditions for using the Swiss E-Com platform.', NULL, NULL, NULL, NULL, 1, '2026-08-27 07:14:50', '2026-08-27 23:44:13', NULL),
(2, 'Privacy Policy', 'privacy-policy', '<h2>Information We Collect</h2>\n<p>We collect personal information that you provide to us, including your name, email address, phone number, shipping address, and payment information when you place an order or create an account.</p>\n\n<h2>How We Use Your Information</h2>\n<p>We use your information to process orders, deliver products, communicate with you about your orders, improve our services, and send you promotional communications (with your consent).</p>\n\n<h2>Data Security</h2>\n<p>We implement industry-standard security measures to protect your personal information. Payment data is encrypted and processed through secure payment gateways.</p>\n\n<h2>Sharing of Information</h2>\n<p>We do not sell or rent your personal information to third parties. We may share information with shipping carriers and payment processors solely to fulfill your orders.</p>\n\n<h2>Cookies</h2>\n<p>We use cookies and similar technologies to enhance your browsing experience, remember your preferences, and analyze site traffic.</p>\n\n<h2>Your Rights</h2>\n<p>You have the right to access, correct, or delete your personal information. Contact our support team to exercise these rights.</p>', 'published', 'Privacy Policy - Swiss E-Com', 'Our privacy policy explains how we collect, use, and protect your personal data.', NULL, NULL, NULL, NULL, 2, '2026-08-27 07:14:51', '2026-08-27 07:14:51', NULL),
(3, 'About Us', 'about-us', '<h2>Who We Are</h2>\n<p>Swiss E-Com is a leading online retailer offering a wide range of high-quality products at competitive prices. We are committed to providing an exceptional shopping experience to our customers.</p>\n\n<h2>Our Mission</h2>\n<p>Our mission is to make online shopping easy, affordable, and enjoyable for everyone. We curate our product selection carefully to ensure quality and value.</p>\n\n<h2>Why Choose Us</h2>\n<ul>\n    <li>Wide selection of products across multiple categories</li>\n    <li>Competitive pricing and regular promotions</li>\n    <li>Fast and reliable shipping</li>\n    <li>Easy returns and responsive customer support</li>\n    <li>Secure payment processing</li>\n</ul>\n\n<h2>Our Team</h2>\n<p>We are a passionate team of professionals dedicated to bringing you the best online shopping experience. Our customer support team is always ready to help.</p>', 'published', 'About Us - Swiss E-Com', 'Learn more about Swiss E-Com and our mission to deliver quality products.', NULL, NULL, NULL, NULL, 3, '2026-08-27 07:14:51', '2026-08-27 07:14:51', NULL),
(4, 'Shipping Policy', 'shipping-policy', '<h2>Shipping Methods</h2>\n<p>We offer standard and expedited shipping options. Available methods and delivery times are displayed at checkout based on your shipping address.</p>\n\n<h2>Delivery Times</h2>\n<ul>\n    <li>Standard Shipping: 5-7 business days</li>\n    <li>Expedited Shipping: 2-3 business days</li>\n    <li>Overnight Shipping: 1 business day (where available)</li>\n</ul>\n\n<h2>Shipping Costs</h2>\n<p>Shipping costs are calculated based on the destination, weight, and dimensions of your order. Free shipping may be available for orders above a certain value.</p>\n\n<h2>Order Tracking</h2>\n<p>Once your order ships, you will receive a confirmation email with tracking information. You can track your order from your account dashboard.</p>\n\n<h2>International Shipping</h2>\n<p>We currently ship to select international destinations. Customs duties and taxes may apply and are the responsibility of the customer.</p>', 'published', 'Shipping Policy - Swiss E-Com', 'Information about shipping methods, delivery times, and costs.', NULL, NULL, NULL, NULL, 4, '2026-08-27 07:14:51', '2026-08-27 07:14:51', NULL),
(5, 'Return & Refund Policy', 'return-policy', '<h2>Return Eligibility</h2>\n<p>Most items can be returned within 30 days of delivery for a full refund. Items must be in their original condition with all tags and packaging intact.</p>\n\n<h2>Non-Returnable Items</h2>\n<ul>\n    <li>Perishable goods</li>\n    <li>Personal care items</li>\n    <li>Intimate apparel and swimwear</li>\n    <li>Digital products and gift cards</li>\n    <li>Items marked as final sale</li>\n</ul>\n\n<h2>How to Return</h2>\n<ol>\n    <li>Log in to your account and go to \"My Orders\"</li>\n    <li>Select the order and items you wish to return</li>\n    <li>Print the prepaid return label</li>\n    <li>Pack the items securely and attach the label</li>\n    <li>Drop off the package at any authorized shipping location</li>\n</ol>\n\n<h2>Refund Processing</h2>\n<p>Refunds are processed within 5-7 business days after we receive and inspect your return. The refund will be credited to the original payment method.</p>', 'published', 'Return & Refund Policy - Swiss E-Com', 'Our return and refund policy for purchased products.', NULL, NULL, NULL, NULL, 5, '2026-08-27 07:14:51', '2026-08-27 07:14:51', NULL),
(6, 'Contact Us', 'contact', '<h2>Get in Touch</h2>\n<p>We\'d love to hear from you. Reach out to us through any of the following channels:</p>\n\n<h2>Email</h2>\n<p>For general inquiries: support@swiss-ecom.com<br>\nFor order-related questions: orders@swiss-ecom.com<br>\nFor business inquiries: business@swiss-ecom.com</p>\n\n<h2>Phone</h2>\n<p>Customer Support: +1 (555) 123-4567<br>\nAvailable Monday-Friday, 9 AM - 6 PM</p>\n\n<h2>Address</h2>\n<p>Swiss E-Commerce Inc.<br>\n123 Commerce Street<br>\nBusiness District<br>\nCity, Country 12345</p>\n\n<h2>Response Time</h2>\n<p>We aim to respond to all inquiries within 24 hours during business days.</p>', 'published', 'Contact Us - Swiss E-Com', 'Get in touch with the Swiss E-Com support team.', NULL, NULL, NULL, NULL, 6, '2026-08-27 07:14:51', '2026-08-27 07:14:51', NULL),
(7, 'Frequently Asked Questions', 'faq', '<h2>How do I place an order?</h2>\n<p>Browse our catalog, add items to your cart, and proceed to checkout. You will need to create an account or sign in to complete your purchase.</p>\n\n<h2>What payment methods do you accept?</h2>\n<p>We accept major credit cards (Visa, MasterCard, American Express), debit cards, and other payment methods displayed at checkout.</p>\n\n<h2>Can I modify or cancel my order?</h2>\n<p>You can modify or cancel your order before it is shipped. Please contact our support team as soon as possible.</p>\n\n<h2>How do I track my order?</h2>\n<p>Once your order ships, you will receive an email with tracking information. You can also track your order from your account dashboard.</p>\n\n<h2>What is your return policy?</h2>\n<p>Please refer to our <a href=\"/return-policy\">Return Policy</a> page for detailed information on returns and refunds.</p>\n\n<h2>Do you offer international shipping?</h2>\n<p>Yes, we ship to select international destinations. Shipping options and costs are displayed at checkout.</p>\n\n<h2>How can I contact customer support?</h2>\n<p>Visit our <a href=\"/contact\">Contact</a> page for phone, email, and other ways to reach us.</p>', 'published', 'FAQ - Swiss E-Com', 'Frequently asked questions about orders, shipping, and returns.', NULL, NULL, NULL, NULL, 7, '2026-08-27 07:14:51', '2026-08-27 23:44:13', NULL);

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

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `group_name` 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 `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `slug`, `description`, `group_name`, `created_at`, `updated_at`) VALUES
(1, 'products.view', 'productsview', NULL, 'products', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(2, 'products.create', 'productscreate', NULL, 'products', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(3, 'products.update', 'productsupdate', NULL, 'products', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(4, 'products.delete', 'productsdelete', NULL, 'products', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(5, 'categories.view', 'categoriesview', NULL, 'categories', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(6, 'categories.create', 'categoriescreate', NULL, 'categories', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(7, 'categories.update', 'categoriesupdate', NULL, 'categories', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(8, 'categories.delete', 'categoriesdelete', NULL, 'categories', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(9, 'brands.view', 'brandsview', NULL, 'brands', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(10, 'brands.create', 'brandscreate', NULL, 'brands', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(11, 'brands.update', 'brandsupdate', NULL, 'brands', '2026-08-27 00:46:28', '2026-08-27 00:46:28'),
(12, 'brands.delete', 'brandsdelete', NULL, 'brands', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(13, 'attributes.view', 'attributesview', NULL, 'attributes', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(14, 'attributes.create', 'attributescreate', NULL, 'attributes', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(15, 'attributes.update', 'attributesupdate', NULL, 'attributes', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(16, 'attributes.delete', 'attributesdelete', NULL, 'attributes', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(17, 'orders.view', 'ordersview', NULL, 'orders', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(18, 'orders.update', 'ordersupdate', NULL, 'orders', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(19, 'orders.cancel', 'orderscancel', NULL, 'orders', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(20, 'customers.view', 'customersview', NULL, 'customers', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(21, 'customers.update', 'customersupdate', NULL, 'customers', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(22, 'inventory.view', 'inventoryview', NULL, 'inventory', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(23, 'inventory.update', 'inventoryupdate', NULL, 'inventory', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(24, 'coupons.view', 'couponsview', NULL, 'coupons', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(25, 'coupons.create', 'couponscreate', NULL, 'coupons', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(26, 'coupons.update', 'couponsupdate', NULL, 'coupons', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(27, 'coupons.delete', 'couponsdelete', NULL, 'coupons', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(28, 'campaigns.view', 'campaignsview', NULL, 'campaigns', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(29, 'campaigns.create', 'campaignscreate', NULL, 'campaigns', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(30, 'campaigns.update', 'campaignsupdate', NULL, 'campaigns', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(31, 'campaigns.delete', 'campaignsdelete', NULL, 'campaigns', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(32, 'flash_sales.view', 'flash-salesview', NULL, 'flash_sales', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(33, 'flash_sales.create', 'flash-salescreate', NULL, 'flash_sales', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(34, 'flash_sales.update', 'flash-salesupdate', NULL, 'flash_sales', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(35, 'flash_sales.delete', 'flash-salesdelete', NULL, 'flash_sales', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(36, 'returns.view', 'returnsview', NULL, 'returns', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(37, 'returns.update', 'returnsupdate', NULL, 'returns', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(38, 'reviews.view', 'reviewsview', NULL, 'reviews', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(39, 'reviews.update', 'reviewsupdate', NULL, 'reviews', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(40, 'reviews.delete', 'reviewsdelete', NULL, 'reviews', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(41, 'invoices.view', 'invoicesview', NULL, 'invoices', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(42, 'invoices.create', 'invoicescreate', NULL, 'invoices', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(43, 'pages.view', 'pagesview', NULL, 'pages', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(44, 'pages.create', 'pagescreate', NULL, 'pages', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(45, 'pages.update', 'pagesupdate', NULL, 'pages', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(46, 'pages.delete', 'pagesdelete', NULL, 'pages', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(47, 'banners.view', 'bannersview', NULL, 'banners', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(48, 'banners.create', 'bannerscreate', NULL, 'banners', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(49, 'banners.update', 'bannersupdate', NULL, 'banners', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(50, 'banners.delete', 'bannersdelete', NULL, 'banners', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(51, 'shipping.view', 'shippingview', NULL, 'shipping', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(52, 'shipping.update', 'shippingupdate', NULL, 'shipping', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(53, 'tax.view', 'taxview', NULL, 'tax', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(54, 'tax.update', 'taxupdate', NULL, 'tax', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(55, 'settings.view', 'settingsview', NULL, 'settings', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(56, 'settings.update', 'settingsupdate', NULL, 'settings', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(57, 'users.view', 'usersview', NULL, 'users', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(58, 'users.create', 'userscreate', NULL, 'users', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(59, 'users.update', 'usersupdate', NULL, 'users', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(60, 'users.delete', 'usersdelete', NULL, 'users', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(61, 'roles.view', 'rolesview', NULL, 'roles', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(62, 'roles.create', 'rolescreate', NULL, 'roles', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(63, 'roles.update', 'rolesupdate', NULL, 'roles', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(64, 'roles.delete', 'rolesdelete', NULL, 'roles', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(65, 'reports.view', 'reportsview', NULL, 'reports', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(66, 'reports.export', 'reportsexport', NULL, 'reports', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(67, 'audit_logs.view', 'audit-logsview', NULL, 'audit_logs', '2026-08-27 00:46:29', '2026-08-27 00:46:29');

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

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

CREATE TABLE `products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `sku` varchar(255) NOT NULL,
  `short_description` text DEFAULT NULL,
  `description` longtext DEFAULT NULL,
  `base_price` decimal(12,2) NOT NULL,
  `cost_price` decimal(12,2) DEFAULT NULL,
  `sale_price` decimal(12,2) DEFAULT NULL,
  `discount_type` varchar(255) NOT NULL DEFAULT 'none',
  `discount_value` decimal(12,2) NOT NULL DEFAULT 0.00,
  `stock_status` enum('in_stock','out_of_stock','on_backorder') NOT NULL DEFAULT 'in_stock',
  `weight` decimal(8,2) DEFAULT NULL,
  `length` decimal(8,2) DEFAULT NULL,
  `width` decimal(8,2) DEFAULT NULL,
  `height` decimal(8,2) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `is_featured` tinyint(1) NOT NULL DEFAULT 0,
  `is_new` tinyint(1) NOT NULL DEFAULT 0,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `published_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `products` (`id`, `name`, `slug`, `sku`, `short_description`, `description`, `base_price`, `cost_price`, `sale_price`, `discount_type`, `discount_value`, `stock_status`, `weight`, `length`, `width`, `height`, `is_active`, `is_featured`, `is_new`, `meta_title`, `meta_description`, `published_at`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Samsung Galaxy S24 Ultra', 'samsung-galaxy-s24-ultra', 'SAM-S24U-001', 'Latest Samsung flagship with AI features', '<p>Latest Samsung smartphone</p>', 289999.00, NULL, 269999.00, 'none', 0.00, 'in_stock', NULL, NULL, NULL, NULL, 1, 1, 1, NULL, NULL, '2026-08-27 02:07:39', '2026-08-27 02:07:39', '2026-08-29 03:24:31', NULL),
(2, 'iPhone 15 Pro Max', 'iphone-15-pro-max', 'APL-15PM-001', 'Apple most powerful iPhone ever', '<p>iPhone 15 Pro Max with A17 Pro chip, titanium design, 5x optical zoom.</p>', 349999.00, NULL, NULL, 'none', 0.00, 'in_stock', NULL, NULL, NULL, NULL, 1, 0, 1, NULL, NULL, '2026-08-27 02:07:39', '2026-08-27 02:07:39', '2026-08-28 09:31:45', NULL),
(3, 'Samsung Galaxy Buds2 Pro', 'samsung-galaxy-buds2-pro', 'SAM-BUDS2P-001', 'True wireless earbuds with noise cancellation', 'Premium wireless earbuds with 24-bit Hi-Fi sound, intelligent ANC, and 360 Audio.', 24999.00, NULL, 19999.00, 'none', 0.00, 'in_stock', NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, '2026-08-27 02:07:39', '2026-08-27 02:07:39', '2026-08-27 04:16:47', NULL),
(4, 'Nike Air Max 270', 'nike-air-max-270', 'NIK-AM270-001', 'Iconic comfort with Max Air unit', 'Nike Air Max 270 with the biggest Max Air unit yet for unrivaled comfort.', 18999.00, NULL, 15999.00, 'none', 0.00, 'in_stock', NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, '2026-08-27 02:07:39', '2026-08-27 02:07:39', '2026-08-27 04:16:47', NULL),
(5, 'Laptop Stand Adjustable', 'laptop-stand-adjustable', 'ACC-LST-001', 'Ergonomic aluminum laptop stand', 'Adjustable aluminum laptop stand for better posture and cooling.', 3999.00, NULL, 2999.00, 'none', 0.00, 'in_stock', NULL, NULL, NULL, NULL, 0, 1, 1, NULL, NULL, '2026-08-27 02:07:39', '2026-08-27 02:07:39', '2026-08-27 04:16:47', NULL),
(6, 'J. Signature Perfume', 'j-signature-perfume', 'JSC-PERM-001', 'Luxury fragrance for him', 'J. Signature collection perfume with notes of oud, amber, and musk.', 5999.00, NULL, NULL, 'none', 0.00, 'in_stock', NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, '2026-08-27 02:07:39', '2026-08-27 02:07:39', '2026-08-27 04:16:47', NULL),
(7, 'Wireless Mouse ergonomic', 'wireless-mouse-ergonomic', 'ACC-WM-001', 'Ergonomic wireless mouse with silent clicks', 'Ergonomic wireless mouse designed for comfort during long work sessions.', 2499.00, NULL, 1999.00, 'none', 0.00, 'in_stock', NULL, NULL, NULL, NULL, 0, 1, 0, NULL, NULL, '2026-08-27 02:07:39', '2026-08-27 02:07:39', '2026-08-27 04:16:47', NULL),
(8, 'Cotton Unisex T-Shirt', 'cotton-unisex-tshirt', 'FAS-TS-001', '100% cotton comfortable t-shirt', 'Premium quality 100% cotton unisex t-shirt available in multiple colors.', 1499.00, NULL, 999.00, 'none', 0.00, 'in_stock', NULL, NULL, NULL, NULL, 0, 1, 1, NULL, NULL, '2026-08-27 02:07:39', '2026-08-27 02:07:39', '2026-08-27 04:16:47', NULL),
(9, 'Test Prod 1788028757', 'test-prod-1788028757', 'TP-1788028757', NULL, 'desc', 500.00, NULL, 450.00, 'none', 0.00, 'in_stock', NULL, NULL, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2026-08-29 13:39:17', '2026-08-29 13:39:17', '2026-08-29 13:39:17'),
(13, 'Direct Test', 'direct-test-1788161964', 'DIR-1788161964', NULL, NULL, 500.00, NULL, NULL, 'none', 0.00, 'in_stock', NULL, NULL, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2026-08-31 02:39:24', '2026-08-31 02:39:24', '2026-08-31 02:39:24'),
(14, 'Imported Product', 'imported-product', 'IMP001', 'Short desc', 'Full description', 1000.00, 800.00, 900.00, 'none', 0.00, 'in_stock', 0.50, NULL, NULL, NULL, 1, 0, 0, NULL, NULL, NULL, '2026-08-31 02:41:41', '2026-08-31 02:41:42', '2026-08-31 02:41:42'),
(15, 'Widget Updated', 'widget-001', 'WID001', 'New desc', 'New full', 600.00, 500.00, 550.00, 'none', 0.00, 'in_stock', 1.20, NULL, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2026-08-31 02:42:09', '2026-08-31 02:42:09', '2026-08-31 02:42:09');

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

--
-- Table structure for table `product_attribute_values`
--

CREATE TABLE `product_attribute_values` (
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `attribute_id` bigint(20) UNSIGNED NOT NULL,
  `attribute_value_id` bigint(20) UNSIGNED 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 `product_attribute_values`
--

INSERT INTO `product_attribute_values` (`product_id`, `attribute_id`, `attribute_value_id`, `created_at`, `updated_at`) VALUES
(1, 2, 2, NULL, NULL);

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

--
-- Table structure for table `product_brands`
--

CREATE TABLE `product_brands` (
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `brand_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `product_categories`
--

CREATE TABLE `product_categories` (
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `category_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_categories`
--

INSERT INTO `product_categories` (`product_id`, `category_id`) VALUES
(1, 7),
(2, 7),
(3, 9),
(4, 2),
(6, 4),
(8, 2),
(9, 3);

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

--
-- Table structure for table `product_images`
--

CREATE TABLE `product_images` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `variant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `path` varchar(255) NOT NULL,
  `alt_text` varchar(255) DEFAULT NULL,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `is_primary` tinyint(1) NOT NULL DEFAULT 0,
  `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 `product_images`
--

INSERT INTO `product_images` (`id`, `product_id`, `variant_id`, `path`, `alt_text`, `sort_order`, `is_primary`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'products/product_1.png', 'Product image 1', 0, 1, '2026-08-29 03:17:09', '2026-09-01 06:52:18'),
(2, 2, NULL, 'products/product_2.png', 'Product image 2', 0, 1, '2026-08-29 03:17:09', '2026-08-29 03:17:09'),
(3, 3, NULL, 'products/product_3.png', 'Product image 3', 0, 1, '2026-08-29 03:17:09', '2026-08-29 03:17:09'),
(4, 4, NULL, 'products/product_4.png', 'Product image 4', 0, 1, '2026-08-29 03:17:09', '2026-08-29 03:17:09'),
(5, 5, NULL, 'products/product_5.png', 'Product image 5', 0, 1, '2026-08-29 03:17:09', '2026-08-29 03:17:09'),
(6, 6, NULL, 'products/product_6.png', 'Product image 6', 0, 1, '2026-08-29 03:17:09', '2026-08-29 03:17:09'),
(7, 7, NULL, 'products/product_7.png', 'Product image 7', 0, 1, '2026-08-29 03:17:09', '2026-08-29 03:17:09'),
(8, 8, NULL, 'products/product_8.png', 'Product image 8', 0, 1, '2026-08-29 03:17:09', '2026-08-29 03:17:09'),
(14, 1, NULL, 'products/wY3swWzWYJE8N6h9IWmSS8bMCnjzJRnrDTtvS7rK.png', 'Samsung Galaxy S24 Ultra', 1, 0, '2026-08-29 04:26:41', '2026-09-01 06:52:18');

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

--
-- Table structure for table `product_tags`
--

CREATE TABLE `product_tags` (
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `tag_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `product_variants`
--

CREATE TABLE `product_variants` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `sku` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `price` decimal(12,2) NOT NULL,
  `sale_price` decimal(12,2) DEFAULT NULL,
  `cost_price` decimal(12,2) DEFAULT NULL,
  `stock_quantity` int(11) NOT NULL DEFAULT 0,
  `stock_status` enum('in_stock','out_of_stock','on_backorder') NOT NULL DEFAULT 'in_stock',
  `weight` decimal(8,2) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `image` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_variants`
--

INSERT INTO `product_variants` (`id`, `product_id`, `sku`, `name`, `price`, `sale_price`, `cost_price`, `stock_quantity`, `stock_status`, `weight`, `is_active`, `image`, `created_at`, `updated_at`, `deleted_at`) VALUES
(2, 1, 'T1', 'Test Var', 90.00, 90.00, NULL, 10, 'in_stock', NULL, 1, NULL, '2026-08-29 13:13:09', '2026-09-01 06:52:52', NULL),
(4, 1, 'T2', 'Blue', 20.00, NULL, NULL, 2, 'in_stock', NULL, 1, NULL, '2026-09-01 06:52:52', '2026-09-01 06:52:52', NULL);

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

--
-- Table structure for table `returns`
--

CREATE TABLE `returns` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `return_number` varchar(255) NOT NULL,
  `order_id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED NOT NULL,
  `status` enum('requested','under_review','approved','rejected','returned','completed') NOT NULL DEFAULT 'requested',
  `description` text DEFAULT NULL,
  `admin_note` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `returns`
--

INSERT INTO `returns` (`id`, `return_number`, `order_id`, `customer_id`, `status`, `description`, `admin_note`, `created_at`, `updated_at`, `deleted_at`) VALUES
(14, 'RET-2026-000001', 2, 1, 'completed', NULL, NULL, '2026-08-31 05:30:32', '2026-08-31 06:06:51', NULL),
(15, 'RET-2026-000002', 2, 1, 'completed', NULL, NULL, '2026-08-31 06:09:19', '2026-08-31 06:09:42', NULL),
(16, 'RET-2026-000003', 2, 1, 'completed', NULL, NULL, '2026-08-31 06:14:31', '2026-08-31 06:27:21', NULL);

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

--
-- Table structure for table `return_items`
--

CREATE TABLE `return_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `return_id` bigint(20) UNSIGNED NOT NULL,
  `order_item_id` bigint(20) UNSIGNED NOT NULL,
  `return_reason_id` bigint(20) UNSIGNED DEFAULT NULL,
  `quantity` int(11) 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 `return_items`
--

INSERT INTO `return_items` (`id`, `return_id`, `order_item_id`, `return_reason_id`, `quantity`, `description`, `created_at`, `updated_at`) VALUES
(14, 14, 2, NULL, 2, NULL, '2026-08-31 05:30:32', '2026-08-31 05:30:32'),
(15, 15, 2, NULL, 1, NULL, '2026-08-31 06:09:19', '2026-08-31 06:09:19'),
(16, 16, 2, NULL, 2, NULL, '2026-08-31 06:14:31', '2026-08-31 06:14:31');

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

--
-- Table structure for table `return_reasons`
--

CREATE TABLE `return_reasons` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `reason` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `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 `return_reasons`
--

INSERT INTO `return_reasons` (`id`, `reason`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'Damaged Product', 1, 0, '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(2, 'Wrong Product', 1, 0, '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(3, 'Incorrect Size', 1, 0, '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(4, 'Defective Product', 1, 0, '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(5, 'Not as Expected', 1, 0, '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(6, 'Other', 1, 0, '2026-08-27 00:46:29', '2026-08-27 00:46:29');

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

--
-- Table structure for table `return_status_histories`
--

CREATE TABLE `return_status_histories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `return_id` bigint(20) UNSIGNED NOT NULL,
  `from_status` varchar(255) DEFAULT NULL,
  `to_status` varchar(255) NOT NULL,
  `note` text DEFAULT NULL,
  `changed_by` bigint(20) UNSIGNED 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 `return_status_histories`
--

INSERT INTO `return_status_histories` (`id`, `return_id`, `from_status`, `to_status`, `note`, `changed_by`, `created_at`, `updated_at`) VALUES
(12, 14, NULL, 'requested', 'Return request submitted.', NULL, '2026-08-31 05:30:32', '2026-08-31 05:30:32'),
(13, 15, NULL, 'requested', 'Return request submitted.', NULL, '2026-08-31 06:09:19', '2026-08-31 06:09:19'),
(14, 16, NULL, 'requested', 'Return request submitted.', NULL, '2026-08-31 06:14:31', '2026-08-31 06:14:31');

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

--
-- Table structure for table `reviews`
--

CREATE TABLE `reviews` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `order_id` bigint(20) UNSIGNED DEFAULT NULL,
  `rating` tinyint(3) UNSIGNED NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `status` enum('pending','approved','rejected') NOT NULL DEFAULT 'pending',
  `is_verified_purchase` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `review_images`
--

CREATE TABLE `review_images` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `review_id` bigint(20) UNSIGNED NOT NULL,
  `path` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `is_system` tinyint(1) NOT NULL DEFAULT 0,
  `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 `roles`
--

INSERT INTO `roles` (`id`, `name`, `slug`, `description`, `is_system`, `created_at`, `updated_at`) VALUES
(6, 'Super Admin', 'super-admin', NULL, 1, '2026-08-27 04:00:44', '2026-08-27 04:00:44'),
(7, 'Admin', 'admin', NULL, 0, '2026-08-27 04:00:44', '2026-08-27 04:00:44'),
(8, 'Editor', 'editor', NULL, 0, '2026-08-27 04:00:44', '2026-08-27 04:00:44'),
(9, 'Moderator', 'moderator', NULL, 0, '2026-08-27 04:00:44', '2026-08-27 04:00:44');

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

--
-- Table structure for table `role_permission`
--

CREATE TABLE `role_permission` (
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `permission_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_permission`
--

INSERT INTO `role_permission` (`role_id`, `permission_id`) VALUES
(6, 1),
(6, 2),
(6, 3),
(6, 4),
(6, 5),
(6, 6),
(6, 7),
(6, 8),
(6, 9),
(6, 10),
(6, 11),
(6, 12),
(6, 13),
(6, 14),
(6, 15),
(6, 16),
(6, 17),
(6, 18),
(6, 19),
(6, 20),
(6, 21),
(6, 22),
(6, 23),
(6, 24),
(6, 25),
(6, 26),
(6, 27),
(6, 28),
(6, 29),
(6, 30),
(6, 31),
(6, 32),
(6, 33),
(6, 34),
(6, 35),
(6, 36),
(6, 37),
(6, 38),
(6, 39),
(6, 40),
(6, 41),
(6, 42),
(6, 43),
(6, 44),
(6, 45),
(6, 46),
(6, 47),
(6, 48),
(6, 49),
(6, 50),
(6, 51),
(6, 52),
(6, 53),
(6, 54),
(6, 55),
(6, 56),
(6, 57),
(6, 58),
(6, 59),
(6, 60),
(6, 61),
(6, 62),
(6, 63),
(6, 64),
(6, 65),
(6, 66),
(6, 67),
(7, 1),
(7, 2),
(7, 3),
(7, 4),
(7, 5),
(7, 6),
(7, 7),
(7, 8),
(7, 9),
(7, 10),
(7, 11),
(7, 12),
(7, 13),
(7, 14),
(7, 15),
(7, 16),
(7, 17),
(7, 18),
(7, 19),
(7, 20),
(7, 21),
(7, 22),
(7, 23),
(7, 24),
(7, 25),
(7, 26),
(7, 27),
(7, 28),
(7, 29),
(7, 30),
(7, 31),
(7, 32),
(7, 33),
(7, 34),
(7, 35),
(7, 36),
(7, 37),
(7, 38),
(7, 39),
(7, 40),
(7, 41),
(7, 42),
(7, 43),
(7, 44),
(7, 45),
(7, 46),
(7, 47),
(7, 48),
(7, 49),
(7, 50),
(7, 51),
(7, 52),
(7, 53),
(7, 54),
(7, 55),
(7, 56),
(7, 57),
(7, 58),
(7, 59),
(7, 60),
(7, 61),
(7, 62),
(7, 63),
(7, 65),
(7, 66),
(7, 67),
(8, 1),
(8, 2),
(8, 3),
(8, 5),
(8, 6),
(8, 7),
(8, 9),
(8, 10),
(8, 11),
(8, 17),
(8, 20),
(8, 24),
(8, 25),
(8, 26),
(8, 28),
(8, 29),
(8, 30),
(8, 32),
(8, 33),
(8, 34),
(8, 38),
(8, 39),
(8, 43),
(8, 44),
(8, 45),
(8, 47),
(8, 48),
(8, 49),
(8, 65),
(9, 17),
(9, 18),
(9, 19),
(9, 20),
(9, 21),
(9, 36),
(9, 37),
(9, 38),
(9, 39),
(9, 40);

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

--
-- 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
('cDpYO3aagKagftr98wiX86ePFdIC67vRkCxbvajz', 1, '127.0.0.1', 'curl/8.18.0', 'eyJfdG9rZW4iOiJRNVVZRDNaUEpDbW5NSXNEVnRNZjlocUp2RmhRTnZQU3FpbTl0NWJYIiwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHA6XC9cLzEyNy4wLjAuMTo4MDAwXC9hZG1pblwvbm90aWZpY2F0aW9ucyIsInJvdXRlIjoiYWRtaW4ubm90aWZpY2F0aW9ucy5pbmRleCJ9LCJfZmxhc2giOnsib2xkIjpbXSwibmV3IjpbXX0sImxvZ2luX2FkbWluXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiOjF9', 1788259338),
('ebhktVGs2wWEJ90bnUeELwkOzD8OKRIFgOSAPNGt', 1, '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:154.0) Gecko/20100101 Firefox/154.0', 'eyJfdG9rZW4iOiI4akVnRzNPQ0U4ZFk3SUwyZTd1UE83TEVDckF0TzZPTzQxUWZ4N1B4IiwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHA6XC9cL2xvY2FsaG9zdFwvc3dpc3MtZWNvbVwvZWNvbW1lcmNlXC9wdWJsaWNcL2FkbWluIiwicm91dGUiOiJhZG1pbi5kYXNoYm9hcmQifSwiX2ZsYXNoIjp7Im9sZCI6W10sIm5ldyI6W119LCJsYXN0X2d1ZXN0X29yZGVyIjoiT1JELVhMWVlYS1VSS0QiLCJ1cmwiOltdLCJsb2dpbl9hZG1pbl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjoxfQ==', 1788287684),
('NGp4TMEy4Qss7zHxCV32ryPh0nW8hwWQrO63fpia', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:154.0) Gecko/20100101 Firefox/154.0', 'eyJfdG9rZW4iOiI4QVVQSG9BSVlDMFFQRTNFT0ZNdzNZcTZCN2VWTm12TzJnakJyUm9hIiwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHA6XC9cL2xvY2FsaG9zdFwvc3dpc3MtZWNvbVwvZWNvbW1lcmNlXC9wdWJsaWNcL2FqYXhcL2NhcnRcL2NvdW50Iiwicm91dGUiOiJhamF4LmNhcnQuY291bnQifSwiX2ZsYXNoIjp7Im9sZCI6W10sIm5ldyI6W119LCJ1cmwiOltdLCJsb2dpbl9hZG1pbl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjoxfQ==', 1788264705),
('oYbaAiXly26EMAJ1mIVyy9wJAnAiP28hkg8PSxZ5', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:154.0) Gecko/20100101 Firefox/154.0', 'eyJfdG9rZW4iOiJBcDlaNkY2WndXb1paYW01MjVkbzBpeTNlcDk0VkdDMFg2Z0RHd09VIiwidXJsIjp7ImludGVuZGVkIjoiaHR0cDpcL1wvbG9jYWxob3N0XC9zd2lzcy1lY29tXC9lY29tbWVyY2VcL3B1YmxpY1wvYWRtaW4ifSwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHA6XC9cL2xvY2FsaG9zdFwvc3dpc3MtZWNvbVwvZWNvbW1lcmNlXC9wdWJsaWNcL2FkbWluIiwicm91dGUiOiJhZG1pbi5kYXNoYm9hcmQifSwiX2ZsYXNoIjp7Im9sZCI6W10sIm5ldyI6W119fQ==', 1788324549),
('VIkcCwvh51K7pGlZ2kOPwK5aU2I4zN032unw73DN', 1, '127.0.0.1', 'curl/8.18.0', 'eyJfdG9rZW4iOiJGUDB3akt0VU1xdTFQNFU2VjFqTlZKbjdQUXlDUTc2SllaRjdsUGJNIiwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHA6XC9cLzEyNy4wLjAuMTo4MDAwXC9hZG1pblwvbm90aWZpY2F0aW9ucyIsInJvdXRlIjoiYWRtaW4ubm90aWZpY2F0aW9ucy5pbmRleCJ9LCJfZmxhc2giOnsib2xkIjpbXSwibmV3IjpbXX0sImxvZ2luX2FkbWluXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiOjF9', 1788258521),
('XpNkgwkGNZAGVyGLMyOG0M2NrUctNoTdqPRz579a', NULL, '127.0.0.1', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:154.0) Gecko/20100101 Firefox/154.0', 'eyJfdG9rZW4iOiJPQXhqU1FFUm1XbVZHeE5jVGs5eXh6dmsza0VEVFlyUTRVWVIycG5mIiwidXJsIjp7ImludGVuZGVkIjoiaHR0cDpcL1wvbG9jYWxob3N0XC9zd2lzcy1lY29tXC9lY29tbWVyY2VcL3B1YmxpY1wvYWRtaW4ifSwiX3ByZXZpb3VzIjp7InVybCI6Imh0dHA6XC9cL2xvY2FsaG9zdFwvc3dpc3MtZWNvbVwvZWNvbW1lcmNlXC9wdWJsaWNcL2FkbWluIiwicm91dGUiOiJhZG1pbi5kYXNoYm9hcmQifSwiX2ZsYXNoIjp7Im9sZCI6W10sIm5ldyI6W119fQ==', 1788289408),
('YOLxhEWoLRdaYRA4jN7ySNcKa5BgoPn6Ap5sxXD2', NULL, '127.0.0.1', 'Symfony', 'eyJfdG9rZW4iOiJIZFNCN3VIWk9zVnBMektWRVBaOFZPMzZlQ1VNMTBDUXZ2UlFRd0Z2IiwidXJsIjp7ImludGVuZGVkIjoiaHR0cDpcL1wvbG9jYWxob3N0XC9hZG1pbiJ9LCJfcHJldmlvdXMiOnsidXJsIjoiaHR0cDpcL1wvbG9jYWxob3N0XC9hZG1pbiIsInJvdXRlIjoiYWRtaW4uZGFzaGJvYXJkIn0sIl9mbGFzaCI6eyJvbGQiOltdLCJuZXciOltdfX0=', 1788289714);

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

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `group` varchar(255) NOT NULL,
  `key` varchar(255) NOT NULL,
  `value` 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 `settings`
--

INSERT INTO `settings` (`id`, `group`, `key`, `value`, `created_at`, `updated_at`) VALUES
(1, 'general', 'store_name', 'Swiss Ecom', '2026-08-27 00:46:29', '2026-08-31 02:18:12'),
(2, 'general', 'store_email', 'shop@test.com', '2026-08-27 00:46:29', '2026-08-31 02:18:12'),
(3, 'general', 'store_phone', '+92 321 1111111', '2026-08-27 00:46:29', '2026-08-31 02:18:12'),
(4, 'general', 'store_logo', 'settings/QgtyrtZMo4lyQpdCvMd9Bi9uBYnCaCDf8CfmPwA7.png', '2026-08-27 00:46:29', '2026-09-01 03:23:46'),
(5, 'checkout', 'guest_checkout', '1', '2026-08-27 00:46:29', '2026-08-31 02:18:12'),
(6, 'checkout', 'registration', '1', '2026-08-27 00:46:29', '2026-08-31 02:18:12'),
(7, 'checkout', 'email_verification', '0', '2026-08-27 00:46:29', '2026-08-31 02:18:12'),
(8, 'order', 'order_prefix', 'ORD', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(9, 'order', 'invoice_prefix', 'INV', '2026-08-27 00:46:29', '2026-08-27 00:46:29'),
(10, 'tax', 'default_tax_rate', '5', '2026-08-27 00:46:29', '2026-08-31 02:18:12'),
(11, 'shipping', 'default_shipping_cost', '150', '2026-08-27 00:46:29', '2026-08-31 02:18:12'),
(12, 'inventory', 'low_stock_threshold', '3', '2026-08-27 00:46:29', '2026-08-31 02:18:12'),
(14, 'general', 'store_address', '123 Main St', '2026-08-31 01:49:33', '2026-08-31 02:18:12'),
(15, 'general', 'store_hours', 'Mon - Sat: 9am - 6pm', '2026-08-31 01:49:33', '2026-08-31 01:49:33'),
(16, 'general', 'favicon', 'settings/vzGZwp15S9xB8Ib2vCEVRPUsF06HLeygJYzl67kh.png', '2026-08-31 01:56:33', '2026-09-01 03:23:12'),
(17, 'general', 'store_tagline', 'Best Shop', '2026-08-31 02:03:43', '2026-08-31 02:18:12'),
(18, 'general', 'store_description', 'Great products', '2026-08-31 02:16:52', '2026-08-31 02:18:12'),
(19, 'general', 'city', 'Lahore', '2026-08-31 02:16:52', '2026-08-31 02:18:12'),
(20, 'general', 'country', 'Pakistan', '2026-08-31 02:16:52', '2026-08-31 02:16:52'),
(21, 'general', 'whatsapp', '+92 321 1111111', '2026-08-31 02:16:52', '2026-08-31 02:18:12'),
(22, 'general', 'business_hours', 'Mon-Fri 10am-5pm', '2026-08-31 02:16:52', '2026-08-31 02:18:12'),
(23, 'seo', 'meta_title', 'My Shop - Best Shop', '2026-08-31 02:16:52', '2026-08-31 02:18:12'),
(24, 'seo', 'meta_description', 'Shop now', '2026-08-31 02:16:52', '2026-08-31 02:18:12'),
(25, 'seo', 'meta_keywords', 'shop, lahore', '2026-08-31 02:16:52', '2026-08-31 02:18:12'),
(26, 'display', 'currency', 'PKR', '2026-08-31 02:16:52', '2026-08-31 02:16:52'),
(27, 'display', 'products_per_page', '24', '2026-08-31 02:16:52', '2026-08-31 02:18:12'),
(28, 'social', 'tiktok_url', 'https://www.tiktok.com/@myshop', '2026-08-31 02:16:52', '2026-08-31 03:19:38'),
(29, 'social', 'facebook_url', 'https://facebook.com/myshop', '2026-08-31 02:18:12', '2026-08-31 02:18:12');

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

--
-- Table structure for table `shipping_methods`
--

CREATE TABLE `shipping_methods` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `base_cost` decimal(12,2) NOT NULL DEFAULT 0.00,
  `per_kg_cost` decimal(12,2) DEFAULT NULL,
  `estimated_days` int(11) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `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_methods`
--

INSERT INTO `shipping_methods` (`id`, `name`, `description`, `base_cost`, `per_kg_cost`, `estimated_days`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(5, 'Standard Shipping', 'Reliable economy delivery across Pakistan. Best for non-urgent orders.', 100.00, 20.00, 5, 1, 1, '2026-08-30 23:36:02', '2026-08-30 23:36:02'),
(6, 'Urgent Shipping', 'Express next-day / same-city delivery for time-sensitive orders.', 250.00, 50.00, 1, 1, 2, '2026-08-30 23:36:02', '2026-08-30 23:36:02');

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

--
-- Table structure for table `shipping_rules`
--

CREATE TABLE `shipping_rules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `shipping_zone_id` bigint(20) UNSIGNED NOT NULL,
  `shipping_method_id` bigint(20) UNSIGNED NOT NULL,
  `price` decimal(12,2) NOT NULL,
  `free_shipping_threshold` decimal(12,2) DEFAULT NULL,
  `min_weight` decimal(8,2) DEFAULT NULL,
  `max_weight` decimal(8,2) DEFAULT NULL,
  `min_order_value` decimal(12,2) DEFAULT NULL,
  `max_order_value` decimal(12,2) DEFAULT NULL,
  `min_quantity` int(11) DEFAULT NULL,
  `max_quantity` int(11) 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 `shipping_rules`
--

INSERT INTO `shipping_rules` (`id`, `shipping_zone_id`, `shipping_method_id`, `price`, `free_shipping_threshold`, `min_weight`, `max_weight`, `min_order_value`, `max_order_value`, `min_quantity`, `max_quantity`, `is_active`, `created_at`, `updated_at`) VALUES
(10, 10, 5, 100.00, 2000.00, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(11, 10, 6, 250.00, 3000.00, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(12, 11, 5, 120.00, 2000.00, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(13, 11, 6, 280.00, 3000.00, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(14, 12, 5, 90.00, 2000.00, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(15, 12, 6, 220.00, 3000.00, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(16, 13, 5, 150.00, 2000.00, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(17, 13, 6, 320.00, 3000.00, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2026-08-30 23:44:46', '2026-08-30 23:44:46');

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

--
-- Table structure for table `shipping_zones`
--

CREATE TABLE `shipping_zones` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `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_zones`
--

INSERT INTO `shipping_zones` (`id`, `name`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(10, 'Punjab', 1, 1, '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(11, 'Sindh', 1, 2, '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(12, 'Federal Capital', 1, 3, '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(13, 'Khyber Pakhtunkhwa', 1, 4, '2026-08-30 23:44:46', '2026-08-30 23:44:46');

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

--
-- Table structure for table `shipping_zone_cities`
--

CREATE TABLE `shipping_zone_cities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `shipping_zone_id` bigint(20) UNSIGNED NOT NULL,
  `city` varchar(255) 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_zone_cities`
--

INSERT INTO `shipping_zone_cities` (`id`, `shipping_zone_id`, `city`, `created_at`, `updated_at`) VALUES
(11, 10, 'Lahore', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(12, 10, 'Faisalabad', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(13, 10, 'Rawalpindi', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(14, 10, 'Gujranwala', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(15, 10, 'Multan', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(16, 10, 'Sialkot', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(17, 11, 'Karachi', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(18, 11, 'Hyderabad', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(19, 11, 'Sukkur', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(20, 12, 'Islamabad', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(21, 13, 'Peshawar', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(22, 13, 'Abbottabad', '2026-08-30 23:44:46', '2026-08-30 23:44:46'),
(23, 13, 'Mardan', '2026-08-30 23:44:46', '2026-08-30 23:44:46');

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

--
-- Table structure for table `tags`
--

CREATE TABLE `tags` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) 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 `tags`
--

INSERT INTO `tags` (`id`, `name`, `slug`, `created_at`, `updated_at`) VALUES
(1, 'hello', 'hello', '2026-08-29 06:22:19', '2026-08-29 06:22:19'),
(2, 'new', 'new', '2026-08-31 02:41:42', '2026-08-31 02:41:42'),
(3, 'sale', 'sale', '2026-08-31 02:41:42', '2026-08-31 02:41:42'),
(4, 'hot', 'hot', '2026-08-31 02:42:09', '2026-08-31 02:42:09');

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

--
-- Table structure for table `tax_rules`
--

CREATE TABLE `tax_rules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `rate` decimal(5,2) NOT NULL,
  `type` enum('percentage','fixed') NOT 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;

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

--
-- Table structure for table `tax_rule_targets`
--

CREATE TABLE `tax_rule_targets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tax_rule_id` bigint(20) UNSIGNED NOT NULL,
  `target_type` enum('product','category','global') NOT NULL,
  `target_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- 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,
  `phone` varchar(20) DEFAULT NULL,
  `phone_verified_at` timestamp NULL DEFAULT NULL,
  `avatar` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_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`, `phone`, `phone_verified_at`, `avatar`, `is_active`, `remember_token`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Admin', 'admin@swiss-ecom.com', '2026-08-27 00:46:29', '$2y$12$iorzrYVOPvvKiHRCLJf1ueK8S/XT6Wf8aBcsrUIouv8CUkmKrAeua', NULL, NULL, NULL, 1, 'D5pkbK0sEp2rmHuDr4smszbyf4CfQQYUCvl5Ktl3FKDPc3AEyF8QFrFMx31B', '2026-08-27 00:46:29', '2026-08-29 01:16:38', NULL),
(3, 'test test', 'test@admin.com', NULL, '$2y$12$w2JXGwwIsc99UOu7uOWJWuyPThv3./DSLvHuKWDDlrtMYYvKE2o1S', NULL, NULL, NULL, 1, NULL, '2026-08-27 07:26:06', '2026-08-29 01:16:50', NULL),
(4, 'testest testest', 'test@test.com', NULL, '$2y$12$WSaWTwNZOaeFSmsmb9v/9ugVJ/CCt/BvCvr25SOfREkzUhA763uam', '1234567890', NULL, NULL, 1, NULL, '2026-08-31 01:12:28', '2026-08-31 01:12:28', NULL);

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

--
-- Table structure for table `user_role`
--

CREATE TABLE `user_role` (
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_role`
--

INSERT INTO `user_role` (`user_id`, `role_id`) VALUES
(1, 6);

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

--
-- Table structure for table `variant_attribute_values`
--

CREATE TABLE `variant_attribute_values` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `product_variant_id` bigint(20) UNSIGNED NOT NULL,
  `attribute_value_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `wishlists`
--

CREATE TABLE `wishlists` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED 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 `wishlists`
--

INSERT INTO `wishlists` (`id`, `customer_id`, `created_at`, `updated_at`) VALUES
(1, 1, '2026-08-28 01:58:12', '2026-08-28 01:58:12');

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

--
-- Table structure for table `wishlist_items`
--

CREATE TABLE `wishlist_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `wishlist_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `attributes`
--
ALTER TABLE `attributes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `attributes_slug_unique` (`slug`),
  ADD KEY `attributes_is_filterable_index` (`is_filterable`),
  ADD KEY `attributes_is_variant_index` (`is_variant`),
  ADD KEY `attributes_sort_order_index` (`sort_order`);

--
-- Indexes for table `attribute_values`
--
ALTER TABLE `attribute_values`
  ADD PRIMARY KEY (`id`),
  ADD KEY `attribute_values_attribute_id_index` (`attribute_id`),
  ADD KEY `attribute_values_sort_order_index` (`sort_order`);

--
-- Indexes for table `audit_logs`
--
ALTER TABLE `audit_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `audit_logs_user_id_index` (`user_id`),
  ADD KEY `audit_logs_entity_type_index` (`entity_type`),
  ADD KEY `audit_logs_entity_id_index` (`entity_id`),
  ADD KEY `audit_logs_action_index` (`action`),
  ADD KEY `audit_logs_created_at_index` (`created_at`);

--
-- Indexes for table `banners`
--
ALTER TABLE `banners`
  ADD PRIMARY KEY (`id`),
  ADD KEY `banners_is_active_index` (`is_active`),
  ADD KEY `banners_sort_order_index` (`sort_order`),
  ADD KEY `banners_position_index` (`position`),
  ADD KEY `banners_starts_at_index` (`starts_at`),
  ADD KEY `banners_ends_at_index` (`ends_at`);

--
-- Indexes for table `blog_posts`
--
ALTER TABLE `blog_posts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `blog_posts_slug_unique` (`slug`),
  ADD KEY `blog_posts_author_id_foreign` (`author_id`),
  ADD KEY `blog_posts_status_index` (`status`),
  ADD KEY `blog_posts_published_at_index` (`published_at`),
  ADD KEY `blog_posts_slug_index` (`slug`);

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

--
-- 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 `campaign_categories`
--
ALTER TABLE `campaign_categories`
  ADD PRIMARY KEY (`campaign_id`,`category_id`),
  ADD KEY `campaign_categories_category_id_foreign` (`category_id`);

--
-- Indexes for table `campaign_products`
--
ALTER TABLE `campaign_products`
  ADD PRIMARY KEY (`campaign_id`,`product_id`),
  ADD KEY `campaign_products_product_id_foreign` (`product_id`);

--
-- Indexes for table `carts`
--
ALTER TABLE `carts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `carts_customer_id_index` (`customer_id`),
  ADD KEY `carts_session_id_index` (`session_id`);

--
-- Indexes for table `cart_items`
--
ALTER TABLE `cart_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `cart_items_cart_product_variant_unique` (`cart_id`,`product_id`,`variant_id`),
  ADD KEY `cart_items_product_id_foreign` (`product_id`),
  ADD KEY `cart_items_variant_id_foreign` (`variant_id`),
  ADD KEY `cart_items_cart_id_index` (`cart_id`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `categories_slug_unique` (`slug`),
  ADD KEY `categories_parent_id_index` (`parent_id`),
  ADD KEY `categories_is_active_index` (`is_active`),
  ADD KEY `categories_sort_order_index` (`sort_order`);

--
-- Indexes for table `coupons`
--
ALTER TABLE `coupons`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `coupons_code_unique` (`code`),
  ADD KEY `coupons_type_index` (`type`),
  ADD KEY `coupons_is_active_index` (`is_active`),
  ADD KEY `coupons_starts_at_expires_at_index` (`starts_at`,`expires_at`);

--
-- Indexes for table `coupon_categories`
--
ALTER TABLE `coupon_categories`
  ADD PRIMARY KEY (`coupon_id`,`category_id`),
  ADD KEY `coupon_categories_category_id_foreign` (`category_id`);

--
-- Indexes for table `coupon_products`
--
ALTER TABLE `coupon_products`
  ADD PRIMARY KEY (`coupon_id`,`product_id`),
  ADD KEY `coupon_products_product_id_foreign` (`product_id`);

--
-- Indexes for table `coupon_usages`
--
ALTER TABLE `coupon_usages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `coupon_usages_coupon_id_index` (`coupon_id`),
  ADD KEY `coupon_usages_customer_id_index` (`customer_id`),
  ADD KEY `coupon_usages_order_id_index` (`order_id`);

--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `customers_email_unique` (`email`),
  ADD KEY `customers_user_id_foreign` (`user_id`),
  ADD KEY `customers_phone_index` (`phone`);

--
-- Indexes for table `customer_addresses`
--
ALTER TABLE `customer_addresses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_addresses_customer_id_is_default_index` (`customer_id`,`is_default`),
  ADD KEY `customer_addresses_city_index` (`city`);

--
-- Indexes for table `customer_verifications`
--
ALTER TABLE `customer_verifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_verifications_token_index` (`token`),
  ADD KEY `customer_verifications_customer_id_type_index` (`customer_id`,`type`);

--
-- Indexes for table `discount_campaigns`
--
ALTER TABLE `discount_campaigns`
  ADD PRIMARY KEY (`id`),
  ADD KEY `discount_campaigns_is_active_index` (`is_active`),
  ADD KEY `discount_campaigns_starts_at_ends_at_index` (`starts_at`,`ends_at`);

--
-- Indexes for table `enquiries`
--
ALTER TABLE `enquiries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `enquiries_user_id_foreign` (`user_id`);

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

--
-- Indexes for table `flash_sales`
--
ALTER TABLE `flash_sales`
  ADD PRIMARY KEY (`id`),
  ADD KEY `flash_sales_is_active_index` (`is_active`),
  ADD KEY `flash_sales_starts_at_ends_at_index` (`starts_at`,`ends_at`);

--
-- Indexes for table `flash_sale_categories`
--
ALTER TABLE `flash_sale_categories`
  ADD PRIMARY KEY (`flash_sale_id`,`category_id`),
  ADD KEY `flash_sale_categories_category_id_foreign` (`category_id`);

--
-- Indexes for table `flash_sale_products`
--
ALTER TABLE `flash_sale_products`
  ADD PRIMARY KEY (`flash_sale_id`,`product_id`),
  ADD KEY `flash_sale_products_product_id_foreign` (`product_id`);

--
-- Indexes for table `inventories`
--
ALTER TABLE `inventories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `inventories_product_id_foreign` (`product_id`),
  ADD KEY `inventories_variant_id_foreign` (`variant_id`);

--
-- Indexes for table `inventory_movements`
--
ALTER TABLE `inventory_movements`
  ADD PRIMARY KEY (`id`),
  ADD KEY `inventory_movements_performed_by_foreign` (`performed_by`),
  ADD KEY `inventory_movements_inventory_id_index` (`inventory_id`),
  ADD KEY `inventory_movements_type_index` (`type`),
  ADD KEY `inventory_movements_created_at_index` (`created_at`);

--
-- Indexes for table `invoices`
--
ALTER TABLE `invoices`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `invoices_invoice_number_unique` (`invoice_number`),
  ADD KEY `invoices_order_id_index` (`order_id`),
  ADD KEY `invoices_customer_id_index` (`customer_id`),
  ADD KEY `invoices_payment_status_index` (`payment_status`),
  ADD KEY `invoices_issued_at_index` (`issued_at`),
  ADD KEY `invoices_created_at_index` (`created_at`);

--
-- Indexes for table `invoice_items`
--
ALTER TABLE `invoice_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoice_items_invoice_id_index` (`invoice_id`),
  ADD KEY `invoice_items_order_item_id_index` (`order_item_id`),
  ADD KEY `invoice_items_sku_index` (`sku`);

--
-- 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 `notifications`
--
ALTER TABLE `notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`),
  ADD KEY `notifications_notifiable_id_index` (`notifiable_id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `orders_order_number_unique` (`order_number`),
  ADD KEY `orders_customer_id_foreign` (`customer_id`),
  ADD KEY `orders_user_id_foreign` (`user_id`),
  ADD KEY `orders_status_index` (`status`),
  ADD KEY `orders_payment_status_index` (`payment_status`),
  ADD KEY `orders_created_at_index` (`created_at`);

--
-- Indexes for table `order_addresses`
--
ALTER TABLE `order_addresses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_addresses_order_id_foreign` (`order_id`);

--
-- Indexes for table `order_charges`
--
ALTER TABLE `order_charges`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_charges_order_id_foreign` (`order_id`);

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

--
-- Indexes for table `order_status_histories`
--
ALTER TABLE `order_status_histories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_status_histories_changed_by_foreign` (`changed_by`),
  ADD KEY `order_status_histories_order_id_index` (`order_id`);

--
-- Indexes for table `pages`
--
ALTER TABLE `pages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `pages_slug_unique` (`slug`),
  ADD KEY `pages_status_index` (`status`),
  ADD KEY `pages_sort_order_index` (`sort_order`);

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_unique` (`name`),
  ADD UNIQUE KEY `permissions_slug_unique` (`slug`),
  ADD KEY `permissions_group_name_index` (`group_name`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `products_slug_unique` (`slug`),
  ADD UNIQUE KEY `products_sku_unique` (`sku`),
  ADD KEY `products_sku_index` (`sku`),
  ADD KEY `products_is_active_index` (`is_active`),
  ADD KEY `products_is_featured_index` (`is_featured`),
  ADD KEY `products_is_new_index` (`is_new`),
  ADD KEY `products_published_at_index` (`published_at`),
  ADD KEY `products_base_price_index` (`base_price`),
  ADD KEY `products_stock_status_index` (`stock_status`);

--
-- Indexes for table `product_attribute_values`
--
ALTER TABLE `product_attribute_values`
  ADD PRIMARY KEY (`product_id`,`attribute_id`,`attribute_value_id`),
  ADD KEY `product_attribute_values_attribute_id_foreign` (`attribute_id`),
  ADD KEY `product_attribute_values_attribute_value_id_foreign` (`attribute_value_id`);

--
-- Indexes for table `product_brands`
--
ALTER TABLE `product_brands`
  ADD PRIMARY KEY (`product_id`,`brand_id`),
  ADD KEY `product_brands_brand_id_foreign` (`brand_id`);

--
-- Indexes for table `product_categories`
--
ALTER TABLE `product_categories`
  ADD PRIMARY KEY (`product_id`,`category_id`),
  ADD KEY `product_categories_category_id_foreign` (`category_id`);

--
-- Indexes for table `product_images`
--
ALTER TABLE `product_images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_images_product_id_index` (`product_id`),
  ADD KEY `product_images_variant_id_index` (`variant_id`),
  ADD KEY `product_images_sort_order_index` (`sort_order`),
  ADD KEY `product_images_is_primary_index` (`is_primary`);

--
-- Indexes for table `product_tags`
--
ALTER TABLE `product_tags`
  ADD PRIMARY KEY (`product_id`,`tag_id`),
  ADD KEY `product_tags_tag_id_foreign` (`tag_id`);

--
-- Indexes for table `product_variants`
--
ALTER TABLE `product_variants`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `product_variants_product_sku_unique` (`product_id`,`sku`),
  ADD KEY `product_variants_product_id_index` (`product_id`),
  ADD KEY `product_variants_sku_index` (`sku`),
  ADD KEY `product_variants_is_active_index` (`is_active`),
  ADD KEY `product_variants_stock_status_index` (`stock_status`);

--
-- Indexes for table `returns`
--
ALTER TABLE `returns`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `returns_return_number_unique` (`return_number`),
  ADD KEY `returns_order_id_index` (`order_id`),
  ADD KEY `returns_customer_id_index` (`customer_id`),
  ADD KEY `returns_status_index` (`status`);

--
-- Indexes for table `return_items`
--
ALTER TABLE `return_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `return_items_return_reason_id_foreign` (`return_reason_id`),
  ADD KEY `return_items_return_id_index` (`return_id`),
  ADD KEY `return_items_order_item_id_index` (`order_item_id`);

--
-- Indexes for table `return_reasons`
--
ALTER TABLE `return_reasons`
  ADD PRIMARY KEY (`id`),
  ADD KEY `return_reasons_is_active_index` (`is_active`),
  ADD KEY `return_reasons_sort_order_index` (`sort_order`);

--
-- Indexes for table `return_status_histories`
--
ALTER TABLE `return_status_histories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `return_status_histories_return_id_index` (`return_id`),
  ADD KEY `return_status_histories_changed_by_index` (`changed_by`);

--
-- Indexes for table `reviews`
--
ALTER TABLE `reviews`
  ADD PRIMARY KEY (`id`),
  ADD KEY `reviews_customer_id_index` (`customer_id`),
  ADD KEY `reviews_product_id_index` (`product_id`),
  ADD KEY `reviews_order_id_index` (`order_id`),
  ADD KEY `reviews_status_index` (`status`),
  ADD KEY `reviews_rating_index` (`rating`);

--
-- Indexes for table `review_images`
--
ALTER TABLE `review_images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `review_images_review_id_index` (`review_id`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_unique` (`name`),
  ADD UNIQUE KEY `roles_slug_unique` (`slug`),
  ADD KEY `roles_is_system_index` (`is_system`);

--
-- Indexes for table `role_permission`
--
ALTER TABLE `role_permission`
  ADD PRIMARY KEY (`role_id`,`permission_id`),
  ADD KEY `role_permission_permission_id_foreign` (`permission_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 `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `settings_group_key_unique` (`group`,`key`),
  ADD KEY `settings_group_index` (`group`);

--
-- Indexes for table `shipping_methods`
--
ALTER TABLE `shipping_methods`
  ADD PRIMARY KEY (`id`),
  ADD KEY `shipping_methods_is_active_index` (`is_active`),
  ADD KEY `shipping_methods_sort_order_index` (`sort_order`);

--
-- Indexes for table `shipping_rules`
--
ALTER TABLE `shipping_rules`
  ADD PRIMARY KEY (`id`),
  ADD KEY `shipping_rules_shipping_zone_id_index` (`shipping_zone_id`),
  ADD KEY `shipping_rules_shipping_method_id_index` (`shipping_method_id`),
  ADD KEY `shipping_rules_is_active_index` (`is_active`);

--
-- Indexes for table `shipping_zones`
--
ALTER TABLE `shipping_zones`
  ADD PRIMARY KEY (`id`),
  ADD KEY `shipping_zones_is_active_index` (`is_active`),
  ADD KEY `shipping_zones_sort_order_index` (`sort_order`);

--
-- Indexes for table `shipping_zone_cities`
--
ALTER TABLE `shipping_zone_cities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `shipping_zone_cities_shipping_zone_id_index` (`shipping_zone_id`),
  ADD KEY `shipping_zone_cities_city_index` (`city`);

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

--
-- Indexes for table `tax_rules`
--
ALTER TABLE `tax_rules`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tax_rules_is_active_index` (`is_active`);

--
-- Indexes for table `tax_rule_targets`
--
ALTER TABLE `tax_rule_targets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tax_rule_targets_tax_rule_id_index` (`tax_rule_id`),
  ADD KEY `tax_rule_targets_target_type_index` (`target_type`),
  ADD KEY `tax_rule_targets_target_id_index` (`target_id`);

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

--
-- Indexes for table `user_role`
--
ALTER TABLE `user_role`
  ADD PRIMARY KEY (`user_id`,`role_id`),
  ADD KEY `user_role_role_id_foreign` (`role_id`);

--
-- Indexes for table `variant_attribute_values`
--
ALTER TABLE `variant_attribute_values`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `variant_attr_value_unique` (`product_variant_id`,`attribute_value_id`),
  ADD KEY `variant_attribute_values_attribute_value_id_foreign` (`attribute_value_id`);

--
-- Indexes for table `wishlists`
--
ALTER TABLE `wishlists`
  ADD PRIMARY KEY (`id`),
  ADD KEY `wishlists_customer_id_index` (`customer_id`);

--
-- Indexes for table `wishlist_items`
--
ALTER TABLE `wishlist_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `wishlist_items_wishlist_id_product_id_unique` (`wishlist_id`,`product_id`),
  ADD KEY `wishlist_items_product_id_index` (`product_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- 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=81;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `attribute_values`
--
ALTER TABLE `attribute_values`
  ADD CONSTRAINT `attribute_values_attribute_id_foreign` FOREIGN KEY (`attribute_id`) REFERENCES `attributes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `audit_logs`
--
ALTER TABLE `audit_logs`
  ADD CONSTRAINT `audit_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `blog_posts`
--
ALTER TABLE `blog_posts`
  ADD CONSTRAINT `blog_posts_author_id_foreign` FOREIGN KEY (`author_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `campaign_categories`
--
ALTER TABLE `campaign_categories`
  ADD CONSTRAINT `campaign_categories_campaign_id_foreign` FOREIGN KEY (`campaign_id`) REFERENCES `discount_campaigns` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `campaign_categories_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `campaign_products`
--
ALTER TABLE `campaign_products`
  ADD CONSTRAINT `campaign_products_campaign_id_foreign` FOREIGN KEY (`campaign_id`) REFERENCES `discount_campaigns` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `campaign_products_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `carts`
--
ALTER TABLE `carts`
  ADD CONSTRAINT `carts_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `cart_items`
--
ALTER TABLE `cart_items`
  ADD CONSTRAINT `cart_items_cart_id_foreign` FOREIGN KEY (`cart_id`) REFERENCES `carts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `cart_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `cart_items_variant_id_foreign` FOREIGN KEY (`variant_id`) REFERENCES `product_variants` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `categories`
--
ALTER TABLE `categories`
  ADD CONSTRAINT `categories_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `categories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `coupon_categories`
--
ALTER TABLE `coupon_categories`
  ADD CONSTRAINT `coupon_categories_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `coupon_categories_coupon_id_foreign` FOREIGN KEY (`coupon_id`) REFERENCES `coupons` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `coupon_products`
--
ALTER TABLE `coupon_products`
  ADD CONSTRAINT `coupon_products_coupon_id_foreign` FOREIGN KEY (`coupon_id`) REFERENCES `coupons` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `coupon_products_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `coupon_usages`
--
ALTER TABLE `coupon_usages`
  ADD CONSTRAINT `coupon_usages_coupon_id_foreign` FOREIGN KEY (`coupon_id`) REFERENCES `coupons` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `coupon_usages_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `coupon_usages_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `customers`
--
ALTER TABLE `customers`
  ADD CONSTRAINT `customers_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `customer_addresses`
--
ALTER TABLE `customer_addresses`
  ADD CONSTRAINT `customer_addresses_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `customer_verifications`
--
ALTER TABLE `customer_verifications`
  ADD CONSTRAINT `customer_verifications_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `enquiries`
--
ALTER TABLE `enquiries`
  ADD CONSTRAINT `enquiries_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `flash_sale_categories`
--
ALTER TABLE `flash_sale_categories`
  ADD CONSTRAINT `flash_sale_categories_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `flash_sale_categories_flash_sale_id_foreign` FOREIGN KEY (`flash_sale_id`) REFERENCES `flash_sales` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `flash_sale_products`
--
ALTER TABLE `flash_sale_products`
  ADD CONSTRAINT `flash_sale_products_flash_sale_id_foreign` FOREIGN KEY (`flash_sale_id`) REFERENCES `flash_sales` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `flash_sale_products_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `inventories`
--
ALTER TABLE `inventories`
  ADD CONSTRAINT `inventories_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `inventories_variant_id_foreign` FOREIGN KEY (`variant_id`) REFERENCES `product_variants` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `inventory_movements`
--
ALTER TABLE `inventory_movements`
  ADD CONSTRAINT `inventory_movements_inventory_id_foreign` FOREIGN KEY (`inventory_id`) REFERENCES `inventories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `inventory_movements_performed_by_foreign` FOREIGN KEY (`performed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `invoices`
--
ALTER TABLE `invoices`
  ADD CONSTRAINT `invoices_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `invoices_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `invoice_items`
--
ALTER TABLE `invoice_items`
  ADD CONSTRAINT `invoice_items_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `invoice_items_order_item_id_foreign` FOREIGN KEY (`order_item_id`) REFERENCES `order_items` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `orders`
--
ALTER TABLE `orders`
  ADD CONSTRAINT `orders_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `orders_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `order_addresses`
--
ALTER TABLE `order_addresses`
  ADD CONSTRAINT `order_addresses_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `order_charges`
--
ALTER TABLE `order_charges`
  ADD CONSTRAINT `order_charges_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE 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 ON UPDATE CASCADE,
  ADD CONSTRAINT `order_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `order_items_variant_id_foreign` FOREIGN KEY (`variant_id`) REFERENCES `product_variants` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `order_status_histories`
--
ALTER TABLE `order_status_histories`
  ADD CONSTRAINT `order_status_histories_changed_by_foreign` FOREIGN KEY (`changed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `order_status_histories_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `product_attribute_values`
--
ALTER TABLE `product_attribute_values`
  ADD CONSTRAINT `product_attribute_values_attribute_id_foreign` FOREIGN KEY (`attribute_id`) REFERENCES `attributes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `product_attribute_values_attribute_value_id_foreign` FOREIGN KEY (`attribute_value_id`) REFERENCES `attribute_values` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `product_attribute_values_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `product_brands`
--
ALTER TABLE `product_brands`
  ADD CONSTRAINT `product_brands_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `product_brands_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `product_categories`
--
ALTER TABLE `product_categories`
  ADD CONSTRAINT `product_categories_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `product_categories_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `product_images`
--
ALTER TABLE `product_images`
  ADD CONSTRAINT `product_images_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `product_images_variant_id_foreign` FOREIGN KEY (`variant_id`) REFERENCES `product_variants` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `product_tags`
--
ALTER TABLE `product_tags`
  ADD CONSTRAINT `product_tags_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `product_tags_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `product_variants`
--
ALTER TABLE `product_variants`
  ADD CONSTRAINT `product_variants_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `returns`
--
ALTER TABLE `returns`
  ADD CONSTRAINT `returns_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `returns_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `return_items`
--
ALTER TABLE `return_items`
  ADD CONSTRAINT `return_items_order_item_id_foreign` FOREIGN KEY (`order_item_id`) REFERENCES `order_items` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `return_items_return_id_foreign` FOREIGN KEY (`return_id`) REFERENCES `returns` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `return_items_return_reason_id_foreign` FOREIGN KEY (`return_reason_id`) REFERENCES `return_reasons` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `return_status_histories`
--
ALTER TABLE `return_status_histories`
  ADD CONSTRAINT `return_status_histories_changed_by_foreign` FOREIGN KEY (`changed_by`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `return_status_histories_return_id_foreign` FOREIGN KEY (`return_id`) REFERENCES `returns` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `reviews`
--
ALTER TABLE `reviews`
  ADD CONSTRAINT `reviews_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `reviews_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `reviews_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `review_images`
--
ALTER TABLE `review_images`
  ADD CONSTRAINT `review_images_review_id_foreign` FOREIGN KEY (`review_id`) REFERENCES `reviews` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `role_permission`
--
ALTER TABLE `role_permission`
  ADD CONSTRAINT `role_permission_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `role_permission_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `shipping_rules`
--
ALTER TABLE `shipping_rules`
  ADD CONSTRAINT `shipping_rules_shipping_method_id_foreign` FOREIGN KEY (`shipping_method_id`) REFERENCES `shipping_methods` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `shipping_rules_shipping_zone_id_foreign` FOREIGN KEY (`shipping_zone_id`) REFERENCES `shipping_zones` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `shipping_zone_cities`
--
ALTER TABLE `shipping_zone_cities`
  ADD CONSTRAINT `shipping_zone_cities_shipping_zone_id_foreign` FOREIGN KEY (`shipping_zone_id`) REFERENCES `shipping_zones` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `tax_rule_targets`
--
ALTER TABLE `tax_rule_targets`
  ADD CONSTRAINT `tax_rule_targets_tax_rule_id_foreign` FOREIGN KEY (`tax_rule_id`) REFERENCES `tax_rules` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `user_role`
--
ALTER TABLE `user_role`
  ADD CONSTRAINT `user_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `user_role_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `variant_attribute_values`
--
ALTER TABLE `variant_attribute_values`
  ADD CONSTRAINT `variant_attribute_values_attribute_value_id_foreign` FOREIGN KEY (`attribute_value_id`) REFERENCES `attribute_values` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `variant_attribute_values_product_variant_id_foreign` FOREIGN KEY (`product_variant_id`) REFERENCES `product_variants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `wishlists`
--
ALTER TABLE `wishlists`
  ADD CONSTRAINT `wishlists_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `wishlist_items`
--
ALTER TABLE `wishlist_items`
  ADD CONSTRAINT `wishlist_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `wishlist_items_wishlist_id_foreign` FOREIGN KEY (`wishlist_id`) REFERENCES `wishlists` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
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 */;
