text: -- phpMyAdmin SQL Dump
  -- version 4.9.0.1
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: May 28, 2020 at 02:22 PM
  -- Server version: 10.3.15-MariaDB
  -- PHP Version: 7.3.6
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  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: `ecommers`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `cart`
  --
  
  CREATE TABLE `cart` (
    `id` int(10) UNSIGNED NOT NULL,
    `products_id` int(11) NOT NULL,
    `product_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `product_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `product_color` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `size` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `price` double(8,2) NOT NULL,
    `quantity` int(11) NOT NULL,
    `user_email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `session_id` varchar(191) COLLATE utf8mb4_unicode_ci 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 `categories`
  --
  
  CREATE TABLE `categories` (
    `id` int(10) UNSIGNED NOT NULL,
    `parent_id` int(11) DEFAULT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `url` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `status` tinyint(4) NOT NULL DEFAULT 0,
    `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci 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 `coupons`
  --
  
  CREATE TABLE `coupons` (
    `id` int(10) UNSIGNED NOT NULL,
    `coupon_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `amount` int(11) NOT NULL,
    `amount_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `expiry_date` date NOT NULL,
    `status` tinyint(4) 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 `delivery_address`
  --
  
  CREATE TABLE `delivery_address` (
    `id` int(10) UNSIGNED NOT NULL,
    `users_id` int(11) NOT NULL,
    `users_email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `address` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `city` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `mobile` varchar(191) COLLATE utf8mb4_unicode_ci 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 `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` int(10) UNSIGNED NOT NULL,
    `migration` varchar(191) COLLATE utf8mb4_unicode_ci 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, '2014_10_12_000000_create_users_table', 1),
  (2, '2014_10_12_100000_create_password_resets_table', 1),
  (3, '2018_10_20_040609_create_categories_table', 1),
  (4, '2018_10_24_075802_create_products_table', 1),
  (5, '2018_11_08_024109_create_product_att_table', 1),
  (6, '2018_11_20_055123_create_tblgallery_table', 1),
  (7, '2018_11_26_070031_create_cart_table', 1),
  (8, '2018_11_28_072535_create_coupons_table', 1),
  (9, '2018_12_03_043804_add_more_fields_to_users_table', 1),
  (10, '2018_12_03_093548_create_delivery_address_table', 1),
  (11, '2018_12_05_024718_create_orders_table', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `orders`
  --
  
  CREATE TABLE `orders` (
    `id` int(10) UNSIGNED NOT NULL,
    `users_id` int(11) NOT NULL,
    `users_email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `address` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `city` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `mobile` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `shipping_charges` double(8,2) NOT NULL,
    `coupon_code` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `coupon_amount` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `order_status` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `payment_method` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `grand_total` varchar(100) COLLATE utf8mb4_unicode_ci 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 `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `products`
  --
  
  CREATE TABLE `products` (
    `id` int(10) UNSIGNED NOT NULL,
    `categories_id` int(11) NOT NULL,
    `p_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `p_code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `p_color` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `price` double(8,2) NOT NULL,
    `image` varchar(191) COLLATE utf8mb4_unicode_ci 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 `product_att`
  --
  
  CREATE TABLE `product_att` (
    `id` int(10) UNSIGNED NOT NULL,
    `products_id` int(11) NOT NULL,
    `sku` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `size` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `price` double(8,2) NOT NULL,
    `stock` int(11) 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 `tblgallery`
  --
  
  CREATE TABLE `tblgallery` (
    `id` int(10) UNSIGNED NOT NULL,
    `products_id` int(11) NOT NULL,
    `image` varchar(191) COLLATE utf8mb4_unicode_ci 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 `users`
  --
  
  CREATE TABLE `users` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email_verified_at` timestamp NULL DEFAULT NULL,
    `password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `admin` tinyint(4) DEFAULT NULL,
    `penjual` tinyint(4) DEFAULT NULL,
    `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    `address` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `pincode` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `mobile` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `cart`
  --
  ALTER TABLE `cart`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `categories`
  --
  ALTER TABLE `categories`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `slug` (`name`);
  
  --
  -- Indexes for table `coupons`
  --
  ALTER TABLE `coupons`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `delivery_address`
  --
  ALTER TABLE `delivery_address`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `orders`
  --
  ALTER TABLE `orders`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indexes for table `products`
  --
  ALTER TABLE `products`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `product_att`
  --
  ALTER TABLE `product_att`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `tblgallery`
  --
  ALTER TABLE `tblgallery`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `cart`
  --
  ALTER TABLE `cart`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `categories`
  --
  ALTER TABLE `categories`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `coupons`
  --
  ALTER TABLE `coupons`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `delivery_address`
  --
  ALTER TABLE `delivery_address`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
  
  --
  -- AUTO_INCREMENT for table `orders`
  --
  ALTER TABLE `orders`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `products`
  --
  ALTER TABLE `products`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `product_att`
  --
  ALTER TABLE `product_att`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `tblgallery`
  --
  ALTER TABLE `tblgallery`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
  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 */;
  