text: -- phpMyAdmin SQL Dump
  -- version 4.8.5
  -- https://www.phpmyadmin.net/
  --
  -- Host: localhost:3306
  -- Generation Time: Nov 26, 2020 at 11:18 AM
  -- Server version: 5.7.24
  -- PHP Version: 7.2.11
  
  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: `aamarbazar`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `failed_jobs`
  --
  
  CREATE TABLE `failed_jobs` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `connection` text COLLATE utf8_unicode_ci NOT NULL,
    `queue` text COLLATE utf8_unicode_ci NOT NULL,
    `payload` longtext COLLATE utf8_unicode_ci NOT NULL,
    `exception` longtext COLLATE utf8_unicode_ci NOT NULL,
    `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` int(10) UNSIGNED NOT NULL,
    `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `batch` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_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),
  (6, '2020_09_16_074442_create_roles_table', 2),
  (7, '2020_11_25_073414_create_permission_tables', 3);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `model_has_permissions`
  --
  
  CREATE TABLE `model_has_permissions` (
    `permission_id` bigint(20) UNSIGNED NOT NULL,
    `model_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `model_id` bigint(20) UNSIGNED NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `model_has_roles`
  --
  
  CREATE TABLE `model_has_roles` (
    `role_id` bigint(20) UNSIGNED NOT NULL,
    `model_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `model_id` bigint(20) UNSIGNED NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `model_has_roles`
  --
  
  INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
  (4, 'App\\User', 9),
  (3, 'App\\User', 11),
  (2, 'App\\User', 12),
  (2, 'App\\User', 13);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `permissions`
  --
  
  CREATE TABLE `permissions` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `guard_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `permissions`
  --
  
  INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
  (1, 'role-list', 'web', '2020-11-25 05:53:20', '2020-11-25 05:53:20'),
  (2, 'role-create', 'web', '2020-11-25 05:53:20', '2020-11-25 05:53:20'),
  (3, 'role-edit', 'web', '2020-11-25 05:53:20', '2020-11-25 05:53:20'),
  (4, 'role-delete', 'web', '2020-11-25 05:53:20', '2020-11-25 05:53:20'),
  (5, 'product-list', 'web', '2020-11-25 05:53:20', '2020-11-25 05:53:20'),
  (6, 'product-create', 'web', '2020-11-25 05:53:20', '2020-11-25 05:53:20'),
  (7, 'product-edit', 'web', '2020-11-25 05:53:20', '2020-11-25 05:53:20'),
  (8, 'product-delete', 'web', '2020-11-25 05:53:20', '2020-11-25 05:53:20'),
  (9, 'brand-list', 'web', '2020-11-26 05:00:09', '2020-11-26 05:00:09'),
  (10, 'brand-create', 'web', '2020-11-26 05:01:46', '2020-11-26 05:01:46'),
  (11, 'brand-edit', 'web', '2020-11-26 05:01:58', '2020-11-26 05:01:58'),
  (12, 'brand-delete', 'web', '2020-11-26 05:02:10', '2020-11-26 05:02:10'),
  (13, 'staff-list', 'web', '2020-11-26 05:03:00', '2020-11-26 05:03:00'),
  (14, 'staff-create', 'web', '2020-11-26 05:03:13', '2020-11-26 05:03:13'),
  (15, 'staff-edit', 'web', '2020-11-26 05:03:28', '2020-11-26 05:03:28'),
  (16, 'staff-delete', 'web', '2020-11-26 05:03:55', '2020-11-26 05:03:55');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `roles`
  --
  
  CREATE TABLE `roles` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `guard_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `roles`
  --
  
  INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
  (2, 'Sales Executive', 'web', '2020-11-25 23:35:27', '2020-11-25 23:35:27'),
  (3, 'Sub Admin', 'web', '2020-11-25 23:37:27', '2020-11-25 23:37:27'),
  (4, 'Super Admin', 'web', '2020-11-26 03:13:00', '2020-11-26 03:13:00');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `role_has_permissions`
  --
  
  CREATE TABLE `role_has_permissions` (
    `permission_id` bigint(20) UNSIGNED NOT NULL,
    `role_id` bigint(20) UNSIGNED NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `role_has_permissions`
  --
  
  INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
  (5, 2),
  (1, 3),
  (2, 3),
  (3, 3),
  (1, 4),
  (2, 4),
  (3, 4),
  (4, 4),
  (5, 4),
  (6, 4),
  (7, 4),
  (8, 4);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(10) UNSIGNED NOT NULL,
    `referred_by` int(11) DEFAULT NULL,
    `provider_id` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
    `user_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'customer',
    `name` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
    `email` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
    `email_verified_at` timestamp NULL DEFAULT NULL,
    `verification_code` text COLLATE utf8_unicode_ci,
    `new_email_verificiation_code` text COLLATE utf8_unicode_ci,
    `password` varchar(191) COLLATE utf8_unicode_ci DEFAULT NULL,
    `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `avatar` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL,
    `avatar_original` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL,
    `address` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL,
    `country` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
    `city` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
    `postal_code` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
    `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
    `balance` double(8,2) NOT NULL DEFAULT '0.00',
    `banned` tinyint(4) NOT NULL DEFAULT '0',
    `referral_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `customer_package_id` int(11) DEFAULT NULL,
    `remaining_uploads` int(11) DEFAULT '0',
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `referred_by`, `provider_id`, `user_type`, `name`, `email`, `email_verified_at`, `verification_code`, `new_email_verificiation_code`, `password`, `remember_token`, `avatar`, `avatar_original`, `address`, `country`, `city`, `postal_code`, `phone`, `balance`, `banned`, `referral_code`, `customer_package_id`, `remaining_uploads`, `created_at`, `updated_at`) VALUES
  (3, NULL, NULL, 'seller', 'Mr. Seller', 'seller@example.com', '2018-12-11 18:00:00', NULL, NULL, '$2y$10$eUKRlkmm2TAug75cfGQ4i.WoUbcJ2uVPqUlVkox.cv4CCyGEIMQEm', '1zoU4eQxnOC5yxRWLsTzMNBPpJuOvTk4g3GMUVYIrbGijiXHOfIlFq0wHrIn', 'https://lh3.googleusercontent.com/-7OnRtLyua5Q/AAAAAAAAAAI/AAAAAAAADRk/VqWKMl4f8CI/photo.jpg?sz=50', 'uploads/ucQhvfz4EQXNeTbN8Eif0Cpq5LnOwvg8t7qKNKVs.jpeg', 'Demo address', 'US', 'Demo city', '1234', NULL, 0.00, 0, '3dLUoHsR1l', NULL, NULL, '2018-10-07 04:42:57', '2020-03-05 01:33:22'),
  (8, NULL, NULL, 'customer', 'Mr. Customer', 'customer@example.com', '2018-12-11 18:00:00', NULL, NULL, '$2y$10$eUKRlkmm2TAug75cfGQ4i.WoUbcJ2uVPqUlVkox.cv4CCyGEIMQEm', '9ndcz5o7xgnuxctJIbvUQcP41QKmgnWCc7JDSnWdHOvipOP2AijpamCNafEe', 'https://lh3.googleusercontent.com/-7OnRtLyua5Q/AAAAAAAAAAI/AAAAAAAADRk/VqWKMl4f8CI/photo.jpg?sz=50', 'uploads/ucQhvfz4EQXNeTbN8Eif0Cpq5LnOwvg8t7qKNKVs.jpeg', 'Demo address', 'US', 'Demo city', '1234', NULL, 0.00, 0, '8zJTyXTlTT', NULL, NULL, '2018-10-07 04:42:57', '2020-03-03 04:26:11'),
  (9, NULL, NULL, 'admin', 'Admin', 'admin@starit.com', '2020-11-14 22:11:59', NULL, NULL, '$2y$10$rFx59avby7W8TteFxZmlcuI2aBSokGoLhqhb8cUNFskujKc/CUO1.', 'EsrXuv7kSq4TpoSrewrjXjXPie1a4TWdoLEVJiwp1LY760jqVRYxGCItUQDb', NULL, NULL, NULL, NULL, NULL, NULL, '01723144514', 0.00, 0, NULL, NULL, 0, '2020-11-14 22:39:59', '2020-11-26 04:08:02'),
  (13, NULL, NULL, 'staff', 'M Chowdhuri', 'm@gmail.com', NULL, NULL, NULL, '$2y$10$sQ/Kq4BQYC1EJDwh8qmPc.1zUUaQa9GTz5aYY/kJIl9ISu46CfY7K', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '01723144520', 0.00, 0, NULL, NULL, 0, '2020-11-26 02:43:02', '2020-11-26 02:43:02');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- 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 `model_has_permissions`
  --
  ALTER TABLE `model_has_permissions`
    ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
    ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`);
  
  --
  -- Indexes for table `model_has_roles`
  --
  ALTER TABLE `model_has_roles`
    ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
    ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`);
  
  --
  -- Indexes for table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indexes for table `permissions`
  --
  ALTER TABLE `permissions`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `roles`
  --
  ALTER TABLE `roles`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `role_has_permissions`
  --
  ALTER TABLE `role_has_permissions`
    ADD PRIMARY KEY (`permission_id`,`role_id`),
    ADD KEY `role_has_permissions_role_id_foreign` (`role_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 `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=8;
  
  --
  -- AUTO_INCREMENT for table `permissions`
  --
  ALTER TABLE `permissions`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
  
  --
  -- AUTO_INCREMENT for table `roles`
  --
  ALTER TABLE `roles`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `model_has_permissions`
  --
  ALTER TABLE `model_has_permissions`
    ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `model_has_roles`
  --
  ALTER TABLE `model_has_roles`
    ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `role_has_permissions`
  --
  ALTER TABLE `role_has_permissions`
    ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
    ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`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 */;
  