text: -- phpMyAdmin SQL Dump
  -- version 5.1.1
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Mar 07, 2022 at 09:03 PM
  -- Server version: 10.4.20-MariaDB
  -- PHP Version: 7.3.0
  
  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: `laravel`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `ads`
  --
  
  CREATE TABLE `ads` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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 `ads`
  --
  
  INSERT INTO `ads` (`id`, `title`, `created_at`, `updated_at`, `deleted_at`) VALUES
  (1, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (2, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (3, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (4, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (5, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (6, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (7, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (8, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (9, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (10, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (11, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL),
  (12, 'Bitcoin', '2022-03-07 18:05:00', '2022-03-07 18:05:00', NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `earnings`
  --
  
  CREATE TABLE `earnings` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `ad_id` bigint(20) UNSIGNED NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    `deleted_at` timestamp NULL DEFAULT NULL,
    `user_id` bigint(20) UNSIGNED NOT NULL,
    `paid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `amount` double(8,2) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `earnings`
  --
  
  INSERT INTO `earnings` (`id`, `ad_id`, `created_at`, `updated_at`, `deleted_at`, `user_id`, `paid`, `amount`) VALUES
  (11, 1, '2022-03-07 14:06:53', '2022-03-07 14:06:53', NULL, 1, 'no', 0.12),
  (12, 1, '2022-03-07 14:08:36', '2022-03-07 14:08:36', NULL, 1, 'no', 0.13);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `failed_jobs`
  --
  
  CREATE TABLE `failed_jobs` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `uuid` varchar(255) COLLATE utf8mb4_unicode_ci 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, '2019_12_14_000001_create_personal_access_tokens_table', 1),
  (5, '2022_03_01_184039_add_status_column_in_users_table', 1),
  (6, '2022_03_01_185214_add_role_column_in_users_table', 1),
  (7, '2022_03_02_184242_create_recharges_table', 1),
  (8, '2022_03_02_192714_add_refer_id_in_users_table', 1),
  (9, '2022_03_04_184353_add_image_column_in_recharges_table', 1),
  (10, '2022_03_04_185727_create_packages_table', 1),
  (11, '2022_03_04_191024_add_columns_in_packages_table', 1),
  (12, '2022_03_04_192409_add_package_id_in_recharges_table', 1),
  (13, '2022_03_04_201327_create_ads_table', 1),
  (14, '2022_03_04_205554_create_earnings_table', 1),
  (15, '2022_03_05_152145_add_user_id_and_paid_columns_in_earnings_table', 1),
  (16, '2022_03_05_154348_add_amount_column_in_earnings_table', 1),
  (17, '2022_03_05_163504_create_withdraws_table', 1),
  (18, '2022_03_07_175258_add_min_max_columns_in_packages_table', 2),
  (19, '2022_03_07_182756_add_usdt_column_in_users_table', 3);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `packages`
  --
  
  CREATE TABLE `packages` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    `deleted_at` timestamp NULL DEFAULT NULL,
    `requirements` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `ads` int(11) NOT NULL,
    `earn` double(8,2) NOT NULL,
    `min` double NOT NULL,
    `max` double NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `packages`
  --
  
  INSERT INTO `packages` (`id`, `name`, `created_at`, `updated_at`, `deleted_at`, `requirements`, `description`, `ads`, `earn`, `min`, `max`) VALUES
  (1, 'Package 1', '2022-03-07 17:46:12', '2022-03-07 17:46:12', NULL, '50-100$', 'Ledsurad fakd jfak', 10, 0.13, 50, 100),
  (2, 'Package 2', '2022-03-07 17:46:12', '2022-03-07 17:46:12', NULL, '100-500$', 'Ledsurad fakd jfak', 11, 0.13, 101, 500),
  (3, 'Package 3', '2022-03-07 17:46:12', '2022-03-07 17:46:12', NULL, '501-1000$', 'Ledsurad fakd jfak', 11, 0.13, 501, 1000);
  
  -- --------------------------------------------------------
  
  --
  -- 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;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `personal_access_tokens`
  --
  
  CREATE TABLE `personal_access_tokens` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `tokenable_id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
    `abilities` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `last_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 `recharges`
  --
  
  CREATE TABLE `recharges` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `user_id` bigint(20) UNSIGNED NOT NULL,
    `amount` double(8,2) NOT NULL,
    `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    `deleted_at` timestamp NULL DEFAULT NULL,
    `image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `package_id` bigint(20) UNSIGNED NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `recharges`
  --
  
  INSERT INTO `recharges` (`id`, `user_id`, `amount`, `status`, `created_at`, `updated_at`, `deleted_at`, `image`, `package_id`) VALUES
  (9, 1, 50.00, 'approved', '2022-03-07 14:49:01', '2022-03-07 14:49:53', '2022-03-07 14:49:53', '1-1646682541.PNG', 1),
  (10, 1, 100.00, 'approved', '2022-03-07 14:49:53', '2022-03-07 14:51:32', '2022-03-07 14:51:32', '1-1646682593.PNG', 2),
  (11, 1, 500.00, 'approved', '2022-03-07 14:51:32', '2022-03-07 14:53:02', NULL, '1-1646682692.PNG', 3);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email_verified_at` timestamp NULL DEFAULT NULL,
    `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
    `role` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'user',
    `refer_id` bigint(20) UNSIGNED DEFAULT NULL,
    `deleted_at` timestamp NULL DEFAULT NULL,
    `usdt` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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`, `remember_token`, `created_at`, `updated_at`, `status`, `role`, `refer_id`, `deleted_at`, `usdt`) VALUES
  (1, 'Nadeem', 'mnadeem24434@gmail.com', '2022-03-07 12:43:56', '$2y$10$SdjolUvxK5BfbMQAHt48F./s1uZYzUOki/8bR7HntWEqX/TJIJg9O', NULL, '2022-03-07 12:43:20', '2022-03-07 14:53:02', 'active', 'user', NULL, NULL, 'sfajksdfjakdsfklajdsf'),
  (2, 'admin', 'm.nadeem.asghar@gmail.com', '2022-03-07 12:43:56', '$2y$10$SdjolUvxK5BfbMQAHt48F./s1uZYzUOki/8bR7HntWEqX/TJIJg9O', NULL, '2022-03-07 12:43:20', '2022-03-07 12:58:43', 'approved', 'admin', NULL, NULL, 'jajdfaklsdjklfakjdslfjkaldskjflakkdsjl');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `withdraws`
  --
  
  CREATE TABLE `withdraws` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `user_id` bigint(20) UNSIGNED NOT NULL,
    `amount` double(8,2) NOT NULL,
    `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `ads`
  --
  ALTER TABLE `ads`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `earnings`
  --
  ALTER TABLE `earnings`
    ADD PRIMARY KEY (`id`),
    ADD KEY `earnings_ad_id_foreign` (`ad_id`),
    ADD KEY `earnings_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 `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `packages`
  --
  ALTER TABLE `packages`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indexes for table `personal_access_tokens`
  --
  ALTER TABLE `personal_access_tokens`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
    ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);
  
  --
  -- Indexes for table `recharges`
  --
  ALTER TABLE `recharges`
    ADD PRIMARY KEY (`id`),
    ADD KEY `recharges_user_id_foreign` (`user_id`),
    ADD KEY `recharges_package_id_foreign` (`package_id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`),
    ADD KEY `users_refer_id_foreign` (`refer_id`);
  
  --
  -- Indexes for table `withdraws`
  --
  ALTER TABLE `withdraws`
    ADD PRIMARY KEY (`id`),
    ADD KEY `withdraws_user_id_foreign` (`user_id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `ads`
  --
  ALTER TABLE `ads`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
  
  --
  -- AUTO_INCREMENT for table `earnings`
  --
  ALTER TABLE `earnings`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
  
  --
  -- 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=20;
  
  --
  -- AUTO_INCREMENT for table `packages`
  --
  ALTER TABLE `packages`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `personal_access_tokens`
  --
  ALTER TABLE `personal_access_tokens`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `recharges`
  --
  ALTER TABLE `recharges`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `withdraws`
  --
  ALTER TABLE `withdraws`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `earnings`
  --
  ALTER TABLE `earnings`
    ADD CONSTRAINT `earnings_ad_id_foreign` FOREIGN KEY (`ad_id`) REFERENCES `ads` (`id`) ON DELETE CASCADE,
    ADD CONSTRAINT `earnings_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `recharges`
  --
  ALTER TABLE `recharges`
    ADD CONSTRAINT `recharges_package_id_foreign` FOREIGN KEY (`package_id`) REFERENCES `packages` (`id`) ON DELETE CASCADE,
    ADD CONSTRAINT `recharges_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `users`
  --
  ALTER TABLE `users`
    ADD CONSTRAINT `users_refer_id_foreign` FOREIGN KEY (`refer_id`) REFERENCES `users` (`id`);
  
  --
  -- Constraints for table `withdraws`
  --
  ALTER TABLE `withdraws`
    ADD CONSTRAINT `withdraws_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`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 */;
  