text: -- phpMyAdmin SQL Dump
  -- version 5.1.0
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Feb 20, 2022 at 09:29 PM
  -- Server version: 10.4.18-MariaDB
  -- PHP Version: 7.4.16
  
  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: `mpr`
  --
  
  -- --------------------------------------------------------
  
  --
  -- 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, '2019_08_19_000000_create_failed_jobs_table', 1),
  (2, '2022_02_12_115210_create_packages_table', 1),
  (3, '2022_02_15_133016_users', 1),
  (4, '2022_02_20_164755_create_user_packages_table', 1),
  (5, '2022_02_20_195533_create_user_profits_table', 2);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `packages`
  --
  
  CREATE TABLE `packages` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `package_title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `min_investment_amount` int(11) NOT NULL,
    `max_investment_amount` int(11) NOT NULL,
    `comission_level` int(11) NOT NULL,
    `activation_charges` int(11) NOT NULL,
    `deleted_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 `packages`
  --
  
  INSERT INTO `packages` (`id`, `package_title`, `min_investment_amount`, `max_investment_amount`, `comission_level`, `activation_charges`, `deleted_at`, `created_at`, `updated_at`) VALUES
  (1, 'silverr', 100, 1000, 10, 5, NULL, NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `referal_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT 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,
    `phone_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `referance_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `user_status` enum('admin','user') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'user',
    `account_status` enum('enable','disable') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'enable',
    `activation_time` timestamp NOT NULL DEFAULT current_timestamp(),
    `deleted_at` timestamp NULL DEFAULT NULL,
    `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;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `referal_id`, `username`, `email`, `email_verified_at`, `password`, `phone_no`, `referance_id`, `user_status`, `account_status`, `activation_time`, `deleted_at`, `remember_token`, `created_at`, `updated_at`) VALUES
  (1, '1111', 'anas', 'anas@gmail.com', NULL, '$2y$10$PypMM8T3Q.ufZ61lOpLUZ.nHaxVEGfMQNrpZEf/sLLSNnC23v5PU.', '03361240403', NULL, 'user', 'enable', '2022-02-20 19:28:48', NULL, NULL, NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_packages`
  --
  
  CREATE TABLE `user_packages` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `user_id` int(11) NOT NULL,
    `package_id` int(11) NOT NULL,
    `investment_amount` decimal(8,2) NOT NULL,
    `status` enum('active','deactive','pending') 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 `user_packages`
  --
  
  INSERT INTO `user_packages` (`id`, `user_id`, `package_id`, `investment_amount`, `status`, `created_at`, `updated_at`) VALUES
  (1, 1, 1, '500.00', 'active', NULL, NULL),
  (2, 1, 1, '600.00', 'active', NULL, NULL),
  (3, 1, 1, '800.00', 'active', NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_profits`
  --
  
  CREATE TABLE `user_profits` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `user_id` int(11) NOT NULL,
    `user_package_id` int(11) NOT NULL,
    `profit_amount` decimal(8,2) NOT NULL,
    `profit_percentage` decimal(8,2) NOT NULL,
    `profit_date` date 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 `user_profits`
  --
  
  INSERT INTO `user_profits` (`id`, `user_id`, `user_package_id`, `profit_amount`, `profit_percentage`, `profit_date`, `created_at`, `updated_at`) VALUES
  (1, 1, 1, '15.00', '3.00', '2022-02-20', '2022-02-20 15:13:51', '2022-02-20 15:13:51'),
  (2, 1, 2, '18.00', '3.00', '2022-02-20', '2022-02-20 15:15:58', '2022-02-20 15:15:58'),
  (3, 1, 3, '24.00', '3.00', '2022-02-20', '2022-02-20 15:15:58', '2022-02-20 15:15:58');
  
  --
  -- 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 `packages`
  --
  ALTER TABLE `packages`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`);
  
  --
  -- Indexes for table `user_packages`
  --
  ALTER TABLE `user_packages`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `user_profits`
  --
  ALTER TABLE `user_profits`
    ADD PRIMARY KEY (`id`);
  
  --
  -- 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=6;
  
  --
  -- AUTO_INCREMENT for table `packages`
  --
  ALTER TABLE `packages`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `user_packages`
  --
  ALTER TABLE `user_packages`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `user_profits`
  --
  ALTER TABLE `user_profits`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  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 */;
  