text: -- phpMyAdmin SQL Dump
  -- version 5.0.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Oct 11, 2020 at 08:00 PM
  -- Server version: 10.4.14-MariaDB
  -- PHP Version: 7.4.9
  
  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: `test1`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `brands`
  --
  
  CREATE TABLE `brands` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `brand_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` varchar(255) 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;
  
  --
  -- Dumping data for table `brands`
  --
  
  INSERT INTO `brands` (`id`, `brand_name`, `description`, `created_at`, `updated_at`) VALUES
  (1, 'Aliza', NULL, '2020-10-11 09:02:39', '2020-10-11 09:02:39'),
  (2, 'Adidas', NULL, '2020-10-11 09:49:45', '2020-10-11 09:49:45'),
  (3, 'Nize', NULL, '2020-10-11 09:49:54', '2020-10-11 09:49:54');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `categories`
  --
  
  CREATE TABLE `categories` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` varchar(255) 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;
  
  --
  -- Dumping data for table `categories`
  --
  
  INSERT INTO `categories` (`id`, `title`, `description`, `created_at`, `updated_at`) VALUES
  (1, 'Shoes', NULL, '2020-10-11 08:16:15', '2020-10-11 08:16:15'),
  (2, 'Clothes', NULL, '2020-10-11 08:16:25', '2020-10-11 08:16:25'),
  (3, 'Accessories', NULL, '2020-10-11 08:16:44', '2020-10-11 08:16:44');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `companies`
  --
  
  CREATE TABLE `companies` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `company_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `location` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `user_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 `companies`
  --
  
  INSERT INTO `companies` (`id`, `company_name`, `location`, `phone`, `description`, `user_id`, `created_at`, `updated_at`) VALUES
  (1, 'Amazon', 'Phnom Penh, less than 1 km from Tuol Sleng Genocide Museum and 1.1 km from Royal Palace Phnom Penh', '969604049 / 66280228 / 129966100', 'Aliza have a lot of product sell', 1, '2020-10-11 09:02:27', '2020-10-11 09:02:27');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `contacts`
  --
  
  CREATE TABLE `contacts` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `message` varchar(255) 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 `failed_jobs`
  --
  
  CREATE TABLE `failed_jobs` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
  ) 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) 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, '2019_08_19_000000_create_failed_jobs_table', 1),
  (4, '2020_09_06_073857_create_categories_table', 1),
  (5, '2020_09_06_073947_create_sizes_table', 1),
  (6, '2020_10_02_160956_create_companies_table', 1),
  (7, '2020_10_02_161011_create_brands_table', 1),
  (8, '2020_10_02_164042_create_products_table', 1),
  (9, '2020_10_10_100424_create_contacts_table', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `password_resets`
  --
  
  INSERT INTO `password_resets` (`email`, `token`, `created_at`) VALUES
  ('keobora008@gmail.com', '$2y$10$iDT8J1HD6S4dY8YwpMGD4eTKrt5A/Zj9g6QtgKPwSsGJ1nzQjf7kq', '2020-10-11 10:04:03');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `products`
  --
  
  CREATE TABLE `products` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `product_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `category_id` bigint(20) UNSIGNED NOT NULL,
    `brand_id` bigint(20) UNSIGNED NOT NULL,
    `price` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `discount` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `size_id` bigint(20) UNSIGNED NOT NULL,
    `company_id` bigint(20) UNSIGNED NOT NULL,
    `published` varchar(255) 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;
  
  --
  -- Dumping data for table `products`
  --
  
  INSERT INTO `products` (`id`, `product_name`, `category_id`, `brand_id`, `price`, `discount`, `description`, `image`, `size_id`, `company_id`, `published`, `created_at`, `updated_at`) VALUES
  (1, 'Jack & Jones Men\'s T-shirt (Blue)', 2, 1, '52', '50', 'This is A nice clothe in 2020', '20201011160451.png', 1, 1, NULL, '2020-10-11 09:04:51', '2020-10-11 09:04:51'),
  (2, 'Red Shoe', 1, 1, '15', '40', 'This is nice shoe in 2020', '20201011160535.png', 1, 1, NULL, '2020-10-11 09:05:35', '2020-10-11 09:05:35');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `sizes`
  --
  
  CREATE TABLE `sizes` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `size_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` varchar(255) 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;
  
  --
  -- Dumping data for table `sizes`
  --
  
  INSERT INTO `sizes` (`id`, `size_name`, `description`, `created_at`, `updated_at`) VALUES
  (1, 'Small', NULL, '2020-10-11 09:02:59', '2020-10-11 09:02:59'),
  (2, 'Big', NULL, '2020-10-11 09:51:26', '2020-10-11 09:51:26'),
  (3, 'Midium', NULL, '2020-10-11 09:51:40', '2020-10-11 09:51:40');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `first_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `last_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `remember_token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `password_confirmation` varchar(255) 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;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `first_name`, `last_name`, `username`, `email`, `remember_token`, `password`, `password_confirmation`, `created_at`, `updated_at`) VALUES
  (1, 'System', 'Admin', 'System Admin', 'systemadmin@gmail.com', NULL, '$2y$10$EPyRnNQRtSGZ.SS8289zU.2egubAW.t4ByJoC0KI3MVnPNlUZpUbO', '$2y$10$Sioi8fD54lxEEsw4IScZTOJd8h9xCotIvd/lG5OreEiqP7d5iPqGa', '2020-10-11 08:15:19', '2020-10-11 08:15:19'),
  (2, 'Keo', 'Bora', 'Keo Bora', 'keobora008@gmail.com', NULL, '$2y$10$zGyYw.ybe7Xilq/ts.xbMe729F.9chQV1sukXgsMWAzoBzv5IYg5y', '$2y$10$dy8gKPmpLoynWFa0U283PO6xyP7G6XR4uIGypPew.0An21egzzUx6', '2020-10-11 10:03:55', '2020-10-11 10:03:55');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `brands`
  --
  ALTER TABLE `brands`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `brands_brand_name_unique` (`brand_name`);
  
  --
  -- Indexes for table `categories`
  --
  ALTER TABLE `categories`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `categories_title_unique` (`title`);
  
  --
  -- Indexes for table `companies`
  --
  ALTER TABLE `companies`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `companies_company_name_unique` (`company_name`),
    ADD KEY `companies_user_id_foreign` (`user_id`);
  
  --
  -- Indexes for table `contacts`
  --
  ALTER TABLE `contacts`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `failed_jobs`
  --
  ALTER TABLE `failed_jobs`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `migrations`
  --
  ALTER TABLE `migrations`
    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`),
    ADD KEY `products_category_id_foreign` (`category_id`),
    ADD KEY `products_brand_id_foreign` (`brand_id`),
    ADD KEY `products_size_id_foreign` (`size_id`),
    ADD KEY `products_company_id_foreign` (`company_id`);
  
  --
  -- Indexes for table `sizes`
  --
  ALTER TABLE `sizes`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `sizes_size_name_unique` (`size_name`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`),
    ADD UNIQUE KEY `users_remember_token_unique` (`remember_token`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `brands`
  --
  ALTER TABLE `brands`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `categories`
  --
  ALTER TABLE `categories`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `companies`
  --
  ALTER TABLE `companies`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `contacts`
  --
  ALTER TABLE `contacts`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `failed_jobs`
  --
  ALTER TABLE `failed_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=10;
  
  --
  -- AUTO_INCREMENT for table `products`
  --
  ALTER TABLE `products`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `sizes`
  --
  ALTER TABLE `sizes`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `companies`
  --
  ALTER TABLE `companies`
    ADD CONSTRAINT `companies_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `products`
  --
  ALTER TABLE `products`
    ADD CONSTRAINT `products_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE CASCADE,
    ADD CONSTRAINT `products_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
    ADD CONSTRAINT `products_company_id_foreign` FOREIGN KEY (`company_id`) REFERENCES `companies` (`id`) ON DELETE CASCADE,
    ADD CONSTRAINT `products_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`) ON DELETE 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 */;
  