-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `zilnex`
--

-- --------------------------------------------------------

--
-- Table structure for table `custom_messages`
--

CREATE TABLE `custom_messages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `receiver_email` varchar(255) DEFAULT NULL,
  `message` varchar(255) 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 `deposit`
--

CREATE TABLE `deposit` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `payment_method_id` int(11) NOT NULL,
  `amount` double NOT NULL DEFAULT 0,
  `image` text NOT NULL,
  `status` enum('processing','failed','cancelled','completed','pending') NOT NULL DEFAULT 'processing',
  `wallet_address` text DEFAULT NULL,
  `reference` varchar(255) 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 `deposit`
--

INSERT INTO `deposit` (`id`, `user_id`, `payment_method_id`, `amount`, `image`, `status`, `wallet_address`, `reference`, `created_at`, `updated_at`) VALUES
(1, 2, 2, 500, '1723819561aba.jpg', 'completed', '0x1248b2afAaE66a276239b0A5A2B08F626c44a72e', '66bf6629525a2', '2024-08-16 13:46:01', '2024-08-16 13:51:51');

-- --------------------------------------------------------

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `investments`
--

CREATE TABLE `investments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `package_id` int(11) NOT NULL,
  `amount` double NOT NULL DEFAULT 0,
  `profit` double NOT NULL DEFAULT 0,
  `reference` varchar(255) NOT NULL,
  `duration` int(11) NOT NULL,
  `duration_interval` int(11) NOT NULL,
  `status` enum('active','in-active','completed') NOT NULL DEFAULT 'active',
  `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(255) 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, '2024_05_10_203735_create_roles_table', 1),
(6, '2024_05_10_203852_create_settings_table', 1),
(7, '2024_05_10_203931_create_payment_method_table', 1),
(8, '2024_05_10_204038_create_packages_table', 1),
(10, '2024_05_10_204450_create_deposit_table', 1),
(11, '2024_05_10_204542_create_investments_table', 1),
(12, '2024_05_10_204618_create_withdrawal_table', 1),
(13, '2024_05_10_204347_create_wallets_table', 2),
(14, '2024_08_16_151436_create_custom_messages_table', 2);

-- --------------------------------------------------------

--
-- Table structure for table `packages`
--

CREATE TABLE `packages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `min_deposit` double NOT NULL DEFAULT 0,
  `max_deposit` double NOT NULL DEFAULT 0,
  `interest` double NOT NULL DEFAULT 0,
  `referral_percentage` double NOT NULL DEFAULT 0,
  `duration` varchar(255) DEFAULT NULL,
  `description` varchar(255) 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`, `name`, `min_deposit`, `max_deposit`, `interest`, `referral_percentage`, `duration`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Basic', 50, 1500, 200, 6, '2', 'Ideal for Beginners', '2024-06-04 17:36:21', '2024-07-02 16:19:54'),
(2, 'Starter', 1500, 6000, 6, 10, '21', 'Medium-Term Growth', '2024-06-04 17:36:21', '2024-06-04 17:36:21'),
(3, 'Growth', 6000, 20000, 10, 15, '60', 'Long-Term Investment', '2024-06-04 17:36:21', '2024-06-04 17:36:21');

-- --------------------------------------------------------

--
-- Table structure for table `payment_method`
--

CREATE TABLE `payment_method` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `wallet_address` text NOT NULL,
  `network` varchar(255) 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 `payment_method`
--

INSERT INTO `payment_method` (`id`, `name`, `wallet_address`, `network`, `created_at`, `updated_at`) VALUES
(2, 'Usdt', '0x1248b2afAaE66a276239b0A5A2B08F626c44a72e', 'Erc20', '2024-06-04 17:35:31', '2024-07-02 16:32:45'),
(3, 'Bitcoin', 'bc1qcxee4fedzznzydfnf2ry85ftn9une056fqyhzc', 'BTC', '2024-06-04 17:35:31', '2024-07-02 16:33:17'),
(4, 'Matic', '0x1248b2afAaE66a276239b0A5A2B08F626c44a72e', 'Polygon', '2024-06-04 17:35:31', '2024-07-02 16:33:59'),
(5, 'Usdt', 'TPBzWwJPKdWP64EmtKv53VvUyh3phLcBDe', 'Trc20', '2024-06-04 17:35:31', '2024-07-02 16:35:18');

-- --------------------------------------------------------

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) 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 `roles`
--

INSERT INTO `roles` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Client', '2024-06-04 18:30:17', '2024-06-04 18:30:17'),
(2, 'Super Admin', '2024-06-04 18:30:17', '2024-06-04 18:30:17');

-- --------------------------------------------------------

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `settings_key` text NOT NULL,
  `settings_value` text NOT NULL,
  `settings_description` text NOT NULL,
  `settings_type` enum('website information') DEFAULT NULL,
  `settings_input_type` enum('text','number','checkbox','file') NOT NULL DEFAULT 'text',
  `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 `settings`
--

INSERT INTO `settings` (`id`, `settings_key`, `settings_value`, `settings_description`, `settings_type`, `settings_input_type`, `created_at`, `updated_at`) VALUES
(1, 'official_email', 'support@alldarkcodes.com', 'Official Email', 'website information', 'text', '2024-06-04 18:30:17', '2024-06-04 18:30:17'),
(2, 'official_phone', '08114313795', 'Official Phone', 'website information', 'text', '2024-06-04 18:30:17', '2024-06-04 18:30:17'),
(3, 'official_address', '500 E Las Olas Blvd, FL 33301', 'Official Address', 'website information', 'text', '2024-06-04 18:30:17', '2024-06-04 18:30:17'),
(4, 'footer_about', 'With almost 20 years of experience,we are   one of the largest stock exchange-listed FX & CFD brokers in the world.', 'Footer About', 'website information', 'text', '2024-06-04 18:30:17', '2024-06-04 18:30:17'),
(5, 'live_chat', 'https://embed.tawk.to/6683eb249d7f358570d622f8/1i1pkt2ji', 'Tawk To Live Chat', 'website information', 'text', '2024-06-04 18:30:17', '2024-06-04 18:30:17');

-- --------------------------------------------------------

--
-- Table structure for table `wallets`
--

CREATE TABLE `wallets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `balance` double NOT NULL DEFAULT 0,
  `active_investment` double NOT NULL DEFAULT 0,
  `profit` double NOT NULL DEFAULT 0,
  `total_withdrawn` double NOT NULL DEFAULT 0,
  `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 `withdrawal`
--

CREATE TABLE `withdrawal` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `withdrawal_details` varchar(255) DEFAULT NULL,
  `amount` double NOT NULL DEFAULT 0,
  `id_type` varchar(255) DEFAULT NULL,
  `remote_code` varchar(255) DEFAULT NULL,
  `account_number` varchar(255) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `id_number` varchar(255) DEFAULT NULL,
  `reference` varchar(255) NOT NULL,
  `payment_method_id` int(11) DEFAULT NULL,
  `payment_method` varchar(255) DEFAULT NULL,
  `status` enum('processing','failed','cancelled','completed','pending') NOT NULL DEFAULT 'processing',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `custom_messages`
--
ALTER TABLE `custom_messages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `deposit`
--
ALTER TABLE `deposit`
  ADD PRIMARY KEY (`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 `investments`
--
ALTER TABLE `investments`
  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 `payment_method`
--
ALTER TABLE `payment_method`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `wallets`
--
ALTER TABLE `wallets`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `withdrawal`
--
ALTER TABLE `withdrawal`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `custom_messages`
--
ALTER TABLE `custom_messages`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `deposit`
--
ALTER TABLE `deposit`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `investments`
--
ALTER TABLE `investments`
  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=15;

--
-- AUTO_INCREMENT for table `packages`
--
ALTER TABLE `packages`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `payment_method`
--
ALTER TABLE `payment_method`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `wallets`
--
ALTER TABLE `wallets`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `withdrawal`
--
ALTER TABLE `withdrawal`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;

