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

START TRANSACTION;



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

--
-- Table structure for table `admin_login_history`
--

CREATE TABLE `admin_login_history` (
  `id` int(11) NOT NULL,
  `AdminID` int(11) NOT NULL,
  `login_time` timestamp NOT NULL DEFAULT current_timestamp(),
  `login_ip` varchar(45) NOT NULL,
  `user_agent` text NOT NULL,
  `country_code` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admin_login_history`
--

INSERT INTO `admin_login_history` (`id`, `AdminID`, `login_time`, `login_ip`, `user_agent`, `country_code`) VALUES
(1, 1, '2024-11-13 16:27:29', '::1', 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36', ''),
(2, 1, '2024-11-13 16:29:46', '::1', 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36', ''),
(3, 1, '2024-11-13 16:30:30', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(4, 1, '2024-11-13 16:31:54', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(5, 1, '2024-11-13 16:35:44', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(6, 1, '2024-11-14 03:45:09', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(7, 1, '2024-11-15 01:40:18', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(8, 1, '2024-11-15 16:21:27', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(9, 1, '2024-11-15 22:51:05', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(10, 1, '2024-11-19 17:51:51', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(11, 1, '2024-11-19 18:03:43', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(12, 1, '2024-11-19 18:22:59', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(13, 1, '2024-11-20 00:12:00', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(14, 1, '2024-11-21 02:51:20', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(15, 1, '2024-11-21 02:51:53', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(16, 1, '2024-11-22 00:45:46', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(17, 1, '2024-11-22 00:45:59', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(18, 1, '2024-11-22 00:46:59', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(19, 1, '2024-11-22 01:53:18', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(20, 1, '2024-11-22 03:25:05', '::1', 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36', ''),
(21, 1, '2024-12-14 23:34:48', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0', ''),
(22, 2, '2025-01-21 13:44:01', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(23, 2, '2025-01-21 14:40:22', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(24, 2, '2025-01-21 14:42:02', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(25, 2, '2025-01-21 14:42:32', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(26, 2, '2025-01-23 00:02:18', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(27, 2, '2025-01-23 12:49:10', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(28, 2, '2025-01-23 13:36:57', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(29, 2, '2025-01-23 14:49:15', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(30, 2, '2025-01-23 16:20:05', '::1', 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36', 'LOCAL'),
(31, 2, '2025-01-23 22:23:01', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(32, 3, '2025-01-24 03:51:49', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(33, 3, '2025-01-24 11:09:16', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(34, 3, '2025-01-24 11:31:40', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(35, 3, '2025-01-24 12:28:13', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL'),
(36, 3, '2025-01-24 12:41:07', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'LOCAL');

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

--
-- Table structure for table `check_deposits`
--

CREATE TABLE `check_deposits` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `deposit_date` date NOT NULL,
  `scheduled_deposit_date` date DEFAULT NULL,
  `image` varchar(255) NOT NULL,
  `transaction_trx` varchar(255) DEFAULT NULL,
  `details` longtext DEFAULT NULL,
  `status` enum('pending','completed','rejected') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `check_deposits`
--

INSERT INTO `check_deposits` (`id`, `user_id`, `amount`, `deposit_date`, `scheduled_deposit_date`, `image`, `transaction_trx`, `details`, `status`, `created_at`, `updated_at`) VALUES
(35, 165, 8997.00, '2025-01-23', NULL, 'bg-img.jpg', 'TRX-d21664c2-2898-4235-aec2-416a0e07c373', 'fee', 'rejected', '2025-01-23 12:48:24', '2025-01-23 13:23:19'),
(36, 165, 8997.00, '2025-01-23', NULL, 'bg-img.jpg', 'TRX-be1091d6-a1e8-492d-88ad-37d6f26097b5', 'fee', 'rejected', '2025-01-23 12:48:38', '2025-01-23 13:24:00'),
(37, 165, 8997.00, '2025-01-23', NULL, 'background_orance3.jpg', 'TRX-ee00ae7c-a2a8-4604-9b52-6d747dd91c50', 'fee', 'completed', '2025-01-23 12:51:25', '2025-01-23 13:30:58'),
(38, 165, 12000.00, '2025-01-23', NULL, 'bg-img.jpg', 'TRX-60ec8772-3f53-4d10-9d06-68b694b6fcd9', 'fee', 'completed', '2025-01-23 12:55:08', '2025-01-23 13:31:27'),
(39, 165, 1200.00, '2025-01-24', '2025-01-24', 'blog15.jpg', 'TRX-746175b0-f874-4f23-8c28-9672ed65b064', 'fee', 'pending', '2025-01-24 03:26:24', '2025-01-24 03:26:24');

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

--
-- Table structure for table `crypto_deposits`
--

CREATE TABLE `crypto_deposits` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `crypto_type` varchar(50) NOT NULL,
  `amount` decimal(20,8) NOT NULL,
  `post_balance` decimal(20,8) NOT NULL,
  `wallet_address` varchar(100) DEFAULT NULL,
  `deposit_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `transaction_trx` varchar(100) DEFAULT NULL,
  `status` enum('pending','completed','failed') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `crypto_deposits`
--

INSERT INTO `crypto_deposits` (`id`, `user_id`, `crypto_type`, `amount`, `post_balance`, `wallet_address`, `deposit_date`, `transaction_trx`, `status`, `created_at`, `updated_at`) VALUES
(34, 166, 'BTC', 900.00000000, 0.00000000, '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', '2025-01-23 13:46:51', 'TRX-58152277-2617-427d-a09a-9f8e99ce44e7', 'pending', '2025-01-23 13:46:51', '2025-01-23 13:46:51'),
(35, 165, 'BTC', 2000.00000000, 0.00000000, '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', '2025-01-24 02:59:44', 'TRX-b94b7d92-3fd9-444c-82cb-3cd0c26ecc95', 'pending', '2025-01-24 02:59:44', '2025-01-24 02:59:44'),
(36, 165, 'BTC', 4099.00000000, 0.00000000, '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', '2025-01-24 03:06:09', 'TRX-7cbba2bc-4cf3-4917-b23a-70d286769910', 'pending', '2025-01-24 03:06:09', '2025-01-24 03:06:09');

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

--
-- Table structure for table `crypto_transactions`
--

CREATE TABLE `crypto_transactions` (
  `transaction_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `crypto_type` varchar(50) NOT NULL,
  `amount` decimal(18,8) NOT NULL,
  `post_balance` decimal(20,8) DEFAULT NULL,
  `transaction_trx` varchar(255) NOT NULL,
  `order_number` varchar(255) NOT NULL,
  `submitted` tinyint(1) DEFAULT 0,
  `transaction_type` enum('send','receive','withdrawal','deposit') NOT NULL,
  `transaction_status` enum('pending','completed','failed') NOT NULL DEFAULT 'pending',
  `transaction_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `wallet_address` varchar(255) NOT NULL,
  `fees` decimal(18,8) DEFAULT 0.00000000
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `crypto_transactions`
--

INSERT INTO `crypto_transactions` (`transaction_id`, `user_id`, `crypto_type`, `amount`, `post_balance`, `transaction_trx`, `order_number`, `submitted`, `transaction_type`, `transaction_status`, `transaction_date`, `wallet_address`, `fees`) VALUES
(41, 166, 'BTC', 900.00000000, 900.00000000, 'TRX-58152277-2617-427d-a09a-9f8e99ce44e7', 'ORD-0F001414-1737640011', 0, 'deposit', 'completed', '2025-01-23 13:46:51', '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', 18.00000000),
(42, 165, 'BTC', 2000.00000000, 1099.00000000, 'TRX-b94b7d92-3fd9-444c-82cb-3cd0c26ecc95', 'ORD-B72953F8-1737687584', 0, 'deposit', 'pending', '2025-01-24 02:59:44', '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', 40.00000000),
(43, 165, 'BTC', 4099.00000000, 1099.00000000, 'TRX-7cbba2bc-4cf3-4917-b23a-70d286769910', 'ORD-AD8729E8-1737687969', 0, 'deposit', 'completed', '2025-01-24 03:06:09', '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', 81.98000000),
(44, 165, 'USDC', 20.00000000, 1099.00000000, 'TRX-e11b2953-3941-41be-b772-45c7b8ddb24f', 'ORD-560AAF86-1737693432', 0, 'send', 'pending', '2025-01-24 04:37:12', '0x84F4016a4a774d2f08e1A2b1bC6200f96d94e20rr', 0.40000000),
(45, 165, 'USDC', 20.00000000, 1099.00000000, 'TRX-2ad42754-09cf-4be0-a244-b6ad4c785b88', 'ORD-4401BFCE-1737693565', 0, 'send', 'pending', '2025-01-24 04:39:25', '0x84F4016a4a774d2f08e1A2b1bC6200f96d94e20rr', 0.40000000),
(46, 165, 'USDC', 20.00000000, 1099.00000000, 'TRX-e13b4152-a47a-4fdd-afbf-636179eaf46e', 'ORD-B2D3E75F-1737693603', 0, 'send', 'pending', '2025-01-24 04:40:03', '0x84F4016a4a774d2f08e1A2b1bC6200f96d94e20rr', 0.40000000),
(47, 165, 'USDC', 120.00000000, 1099.00000000, 'TRX-fe67c496-1ec5-4545-9b68-d32bf352fd58', 'ORD-E3BF28BF-1737693623', 0, 'send', 'pending', '2025-01-24 04:40:23', '0x84F4016a4a774d2f08e1A2b1bC6200f96d94e20rr', 2.40000000),
(48, 165, 'USDC', 3000.00000000, 1099.00000000, 'TRX-3fe98d00-74d1-41f5-b8d2-ceaa7b6b4572', 'ORD-68776EDC-1737693693', 0, 'send', 'completed', '2025-01-24 04:41:33', '0x84F4016a4a774d2f08e1A2b1bC6200f96d94e20rr', 60.00000000),
(49, 165, 'USDC', 500.00000000, 1099.00000000, 'TRX-29827b95-4229-441a-9a95-253e0ce61e0b', 'ORD-10D561C1-1737693789', 0, 'send', 'failed', '2025-01-24 04:43:09', '0x84F4016a4a774d2f08e1A2b1bC6200f96d94e20rr', 10.00000000);

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

--
-- Table structure for table `crypto_wallets`
--

CREATE TABLE `crypto_wallets` (
  `id` int(11) NOT NULL,
  `crypto_type` varchar(10) NOT NULL,
  `wallet_address` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `crypto_wallets`
--

INSERT INTO `crypto_wallets` (`id`, `crypto_type`, `wallet_address`, `created_at`, `updated_at`) VALUES
(1, 'BTC', '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', '2024-11-06 02:32:55', '2025-01-23 17:26:17'),
(2, 'USDC', '0x84F4016a4a774d2f08e1A2b1bC6200f96d94e20e', '2024-11-19 02:41:26', '2024-11-19 02:41:26'),
(3, 'ETH', '0x2e6B0C8e05A307bA7f0F9bB9b72a6D8f69C9D0e5', '2024-11-19 02:42:00', '2025-01-23 17:26:42'),
(4, 'USDT', '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', '2024-11-19 02:42:18', '2024-11-19 02:42:18');

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

--
-- Table structure for table `crypto_withdrawals`
--

CREATE TABLE `crypto_withdrawals` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `crypto_type` varchar(50) NOT NULL,
  `amount` decimal(20,8) NOT NULL,
  `wallet_address` varchar(100) NOT NULL,
  `withdrawal_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `later_date` date DEFAULT NULL,
  `transaction_trx` varchar(100) DEFAULT NULL,
  `status` enum('pending','completed','failed') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `internal_beneficiaries`
--

CREATE TABLE `internal_beneficiaries` (
  `beneficiary_id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `beneficiary_name` varchar(255) DEFAULT NULL,
  `beneficiary_account_number` varchar(50) DEFAULT NULL,
  `account_type` enum('checking','savings','business') DEFAULT NULL,
  `transfer_method` enum('internal') DEFAULT NULL,
  `date_added` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `internal_beneficiaries`
--

INSERT INTO `internal_beneficiaries` (`beneficiary_id`, `user_id`, `beneficiary_name`, `beneficiary_account_number`, `account_type`, `transfer_method`, `date_added`) VALUES
(9, 166, 'John Doe Savings', '816862327474', 'checking', NULL, '2025-01-23 13:34:26'),
(10, 165, 'John Doe Savings', '816862327474', 'checking', NULL, '2025-01-24 03:31:14');

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

--
-- Table structure for table `ip_cache`
--

CREATE TABLE `ip_cache` (
  `id` int(11) DEFAULT NULL,
  `ip` varchar(45) NOT NULL,
  `country` varchar(2) NOT NULL,
  `cached_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `loans`
--

CREATE TABLE `loans` (
  `loan_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `fullname` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `loan_date` date NOT NULL,
  `note` text DEFAULT NULL,
  `loan_term_years` int(11) NOT NULL,
  `monthly_payment` decimal(20,8) NOT NULL,
  `interest_rate` decimal(10,5) NOT NULL DEFAULT 5.00000,
  `user_img` varchar(255) NOT NULL,
  `application_status` enum('pending','approved','rejected') DEFAULT 'pending',
  `transaction_trx` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `loans`
--

INSERT INTO `loans` (`loan_id`, `user_id`, `fullname`, `email`, `amount`, `loan_date`, `note`, `loan_term_years`, `monthly_payment`, `interest_rate`, `user_img`, `application_status`, `transaction_trx`, `created_at`, `updated_at`) VALUES
(18, 165, 'castilo casto', 'secisat908@citdaca.com', 700.00, '2025-01-23', 'fee', 1, 59.93000000, 5.00000, '6792879eb5928.jpg', 'approved', 'TRX-0b70ab8b-b090-4573-8b07-d2121bfdaa6c', '2025-01-23 18:17:02', '2025-01-23 18:25:08'),
(19, 165, 'castilo casto', 'secisat908@citdaca.com', 94500.00, '2025-01-23', 'fee', 5, 1740.36000000, 4.00000, '679289b86c9b3.jpg', 'rejected', 'TRX-1826cc20-ca8d-42d6-b7db-b089ec214122', '2025-01-23 18:26:00', '2025-01-23 18:36:54'),
(20, 165, 'castilo casto', 'secisat908@citdaca.com', 12000.00, '2025-01-23', 'fee', 1, 1027.29000000, 5.00000, '67928b13e935a.jpg', 'rejected', 'TRX-79f76891-168c-4296-9199-aa139d2a67ec', '2025-01-23 18:31:47', '2025-01-23 18:36:11'),
(21, 165, 'castilo casto', 'secisat908@citdaca.com', 999998.00, '2025-01-23', 'fee', 1, 85607.31000000, 5.00000, '67928c9701a84.jpg', 'rejected', 'TRX-9a910070-2bcc-489c-b5b3-c2947993c4c7', '2025-01-23 18:38:15', '2025-01-23 22:23:22'),
(22, 165, 'castilo casto', 'secisat908@citdaca.com', 120000.00, '2025-01-23', 'feee', 1, 10272.90000000, 5.00000, '6792c2091aafe.jpg', 'approved', 'TRX-7f0d76f5-f744-461b-a4b8-5ce85aedf80f', '2025-01-23 22:26:17', '2025-01-23 22:47:20');

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

--
-- Table structure for table `loan_applications`
--

CREATE TABLE `loan_applications` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `email` varchar(255) NOT NULL,
  `fullname` varchar(255) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `loan_term` int(11) NOT NULL,
  `apply_date` date NOT NULL,
  `special_note` text DEFAULT NULL,
  `utility_copy` varchar(255) NOT NULL,
  `status` enum('pending','approved','rejected') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `loan_applications`
--

INSERT INTO `loan_applications` (`id`, `user_id`, `email`, `fullname`, `amount`, `loan_term`, `apply_date`, `special_note`, `utility_copy`, `status`, `created_at`, `updated_at`) VALUES
(2, 165, 'secisat908@citdaca.com', 'castilo casto', 898.00, 1, '2025-01-23', 'fee', '67927c60ee400.jpg', 'pending', '2025-01-23 17:29:04', '2025-01-23 17:29:04'),
(3, 165, 'secisat908@citdaca.com', 'castilo casto', 850.00, 1, '2025-01-23', '', '67927d80503d6.jpg', 'pending', '2025-01-23 17:33:52', '2025-01-23 17:33:52');

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

--
-- Table structure for table `login_history`
--

CREATE TABLE `login_history` (
  `id` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `login_time` datetime NOT NULL,
  `login_ip` varchar(45) NOT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `country_code` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `login_history`
--

INSERT INTO `login_history` (`id`, `UserID`, `login_time`, `login_ip`, `user_agent`, `country_code`) VALUES
(109, 165, '2025-01-23 12:48:00', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(110, 166, '2025-01-23 13:34:08', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(111, 165, '2025-01-23 13:34:48', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(112, 166, '2025-01-23 13:36:42', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(113, 165, '2025-01-23 13:39:14', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(114, 165, '2025-01-23 17:28:48', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(115, 165, '2025-01-23 22:25:53', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(116, 166, '2025-01-23 22:28:39', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(117, 165, '2025-01-24 02:54:33', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(118, 165, '2025-01-24 12:24:48', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(119, 165, '2025-01-24 12:25:02', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost'),
(120, 165, '2025-01-24 12:44:12', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'Localhost');

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

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` int(11) NOT NULL,
  `fullname` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `messages`
--

INSERT INTO `messages` (`id`, `fullname`, `email`, `subject`, `message`, `created_at`) VALUES
(1, 'esther robert', 'teste@exemplo.us', 'trial', 'is this working perfecly', '2024-11-19 17:24:00');

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

--
-- Table structure for table `order_confirmation`
--

CREATE TABLE `order_confirmation` (
  `order_id` int(11) NOT NULL,
  `order_number` varchar(255) NOT NULL,
  `user_id` int(11) NOT NULL,
  `crypto_type` varchar(50) NOT NULL,
  `wallet_address` varchar(255) NOT NULL,
  `amount` decimal(18,8) NOT NULL,
  `order_time` timestamp NOT NULL DEFAULT current_timestamp(),
  `status` enum('pending','completed','expired') DEFAULT 'pending',
  `expiration_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `transaction_trx` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `order_confirmation`
--

INSERT INTO `order_confirmation` (`order_id`, `order_number`, `user_id`, `crypto_type`, `wallet_address`, `amount`, `order_time`, `status`, `expiration_time`, `transaction_trx`, `created_at`, `updated_at`) VALUES
(21, 'ORD-0F001414-1737640011', 166, 'BTC', '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', 900.00000000, '2025-01-23 13:46:55', 'pending', '2025-01-23 15:16:55', 'TRX-cb0cdf93-68bf-4021-8593-8b5a1490b65b', '2025-01-23 13:46:55', '2025-01-23 13:46:55'),
(22, 'ORD-B72953F8-1737687584', 165, 'BTC', '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', 2000.00000000, '2025-01-24 02:59:48', 'pending', '2025-01-24 04:29:48', 'TRX-50dd290a-b0e1-4bbf-bb3c-ad175a21dea6', '2025-01-24 02:59:48', '2025-01-24 02:59:48'),
(23, 'ORD-AD8729E8-1737687969', 165, 'BTC', '0x48a6Bd7A9F2F4B5E72FcC9A4B74339b3e32F0927', 4099.00000000, '2025-01-24 03:06:12', 'pending', '2025-01-24 04:36:12', 'TRX-56eef1f7-766f-4ab9-aea6-5b2489f8286b', '2025-01-24 03:06:12', '2025-01-24 03:06:12');

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

--
-- Table structure for table `otp_attempts`
--

CREATE TABLE `otp_attempts` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `failed_attempts` int(11) DEFAULT 0,
  `last_attempt` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `transactions`
--

CREATE TABLE `transactions` (
  `id` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `amount` decimal(20,2) NOT NULL,
  `fee` decimal(20,2) NOT NULL,
  `transaction_date` datetime DEFAULT current_timestamp(),
  `transaction_type` varchar(50) DEFAULT NULL,
  `transaction_trx` varchar(255) DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `transactions`
--

INSERT INTO `transactions` (`id`, `UserID`, `amount`, `fee`, `transaction_date`, `transaction_type`, `transaction_trx`, `status`) VALUES
(80, 165, 8997.00, 0.00, '2025-01-23 12:48:24', 'check', 'TRX-d21664c2-2898-4235-aec2-416a0e07c373', 'approve'),
(81, 165, 8997.00, 0.00, '2025-01-23 12:48:38', 'check', 'TRX-be1091d6-a1e8-492d-88ad-37d6f26097b5', 'approve'),
(82, 165, 8997.00, 0.00, '2025-01-23 12:51:25', 'check', 'TRX-ee00ae7c-a2a8-4604-9b52-6d747dd91c50', 'approve'),
(83, 165, 12000.00, 0.00, '2025-01-23 12:55:08', 'check', 'TRX-60ec8772-3f53-4d10-9d06-68b694b6fcd9', 'approve'),
(84, 165, 800.00, 16.00, '2025-01-23 13:35:22', 'internal', 'TRX-4dc69080-9fbe-47d9-8b96-d8c3188c045b', 'approve'),
(85, 166, 800.00, 0.00, '2025-01-23 13:38:06', 'deposit', 'TRX-4dc69080-9fbe-47d9-8b96-d8c3188c045b', 'approve'),
(86, 166, 200.00, 4.00, '2025-01-23 13:40:09', 'internal', 'TRX-80cd94ac-3062-4ea6-8b6d-10767cc622f6', 'pending'),
(87, 165, 12000.00, 1027.29, '2025-01-23 00:00:00', 'loan', 'TRX-79f76891-168c-4296-9199-aa139d2a67ec', 'approve'),
(88, 165, 999998.00, 85607.31, '2025-01-23 00:00:00', 'loan', 'TRX-9a910070-2bcc-489c-b5b3-c2947993c4c7', 'approve'),
(89, 165, 120000.00, 10272.90, '2025-01-23 00:00:00', 'loan', 'TRX-7f0d76f5-f744-461b-a4b8-5ce85aedf80f', 'approve'),
(90, 165, 500.00, 10.00, '2025-01-23 22:29:09', 'internal', 'TRX-82e9d69b-39ba-4a21-beb6-d38b2987dfc8', 'approve'),
(91, 166, 500.00, 0.00, '2025-01-23 22:29:44', 'deposit', 'TRX-82e9d69b-39ba-4a21-beb6-d38b2987dfc8', 'approve'),
(92, 166, 800.00, 40.00, '2025-01-24 00:49:00', 'credit', 'TRX-3ab8b086-04d1-46f4-afb6-b5d3e009e0e3', 'approve'),
(93, 165, 1200.00, 0.00, '2025-01-24 03:26:24', 'check', 'TRX-746175b0-f874-4f23-8c28-9672ed65b064', 'pending'),
(94, 165, 20000.00, 2000.00, '2025-01-24 03:53:57', 'internal', 'TRX-33a7c7f5-f3a5-4ea5-bf2f-cc95963a759f', 'pending');

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

--
-- Table structure for table `transaction_limits`
--

CREATE TABLE `transaction_limits` (
  `limit_id` int(11) NOT NULL,
  `daily_limit` decimal(20,8) DEFAULT NULL,
  `week_limit` decimal(20,8) NOT NULL,
  `monthly_limit` decimal(20,8) DEFAULT NULL,
  `per_transaction_min` decimal(20,8) DEFAULT NULL,
  `per_transaction_max` decimal(20,8) DEFAULT NULL,
  `UserID` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `transaction_limits`
--

INSERT INTO `transaction_limits` (`limit_id`, `daily_limit`, `week_limit`, `monthly_limit`, `per_transaction_min`, `per_transaction_max`, `UserID`, `created_at`, `updated_at`) VALUES
(21, 30000.00000000, 100000.00000000, 1000000.00000000, 10.00000000, 80000.00000000, 165, '2025-01-23 12:47:51', '2025-01-24 04:53:54'),
(22, 30000.00000000, 50000.00000000, 30000.00000000, 10.00000000, 80000.00000000, 166, '2025-01-23 13:33:59', '2025-01-24 01:56:46');

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

--
-- Table structure for table `transaction_log`
--

CREATE TABLE `transaction_log` (
  `transaction_id` bigint(20) UNSIGNED NOT NULL,
  `sender_id` int(11) NOT NULL,
  `receiver_id` int(11) DEFAULT NULL,
  `transfer_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`transfer_details`)),
  `transaction_trx` varchar(255) DEFAULT NULL,
  `transaction_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `amount` decimal(20,8) NOT NULL,
  `total_amount` decimal(15,2) NOT NULL,
  `fee_amount` decimal(15,2) NOT NULL,
  `status` enum('pending','approve','rejected','refunded') DEFAULT 'pending',
  `transfer_type` enum('internal','external','wire') NOT NULL,
  `currency` varchar(3) DEFAULT 'USD',
  `description` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `transaction_log`
--

INSERT INTO `transaction_log` (`transaction_id`, `sender_id`, `receiver_id`, `transfer_details`, `transaction_trx`, `transaction_date`, `amount`, `total_amount`, `fee_amount`, `status`, `transfer_type`, `currency`, `description`, `created_at`, `updated_at`) VALUES
(20, 165, 166, '{\"receivers_Account_number\":\"816862327474\",\"receivers_account_name\":\"John Doe Savings\",\"senders_account_number\":\"190960375310\",\"senders_username\":\"castilocasto\"}', 'TRX-4dc69080-9fbe-47d9-8b96-d8c3188c045b', '2025-01-23 13:35:22', 800.00000000, 816.00, 16.00, 'approve', 'internal', 'USD', 'fee', '2025-01-23 13:35:22', '2025-01-23 13:38:05'),
(21, 166, 165, '{\"receivers_Account_number\":\"190960375310\",\"receivers_account_name\":\"John Doe Savings\",\"senders_account_number\":\"816862327474\",\"senders_username\":\"testuser\"}', 'TRX-80cd94ac-3062-4ea6-8b6d-10767cc622f6', '2025-01-23 13:40:09', 200.00000000, 204.00, 4.00, 'rejected', 'internal', 'USD', 'fee', '2025-01-23 13:40:09', '2025-01-23 13:40:46'),
(22, 165, 166, '{\"receivers_Account_number\":\"816862327474\",\"receivers_account_name\":\"John Doe Savings\",\"senders_account_number\":\"190960375310\",\"senders_username\":\"castilocasto\"}', 'TRX-82e9d69b-39ba-4a21-beb6-d38b2987dfc8', '2025-01-23 22:29:09', 500.00000000, 510.00, 10.00, 'approve', 'internal', 'USD', 'fee', '2025-01-23 22:29:09', '2025-01-23 22:29:44'),
(23, 165, 166, '{\"receivers_Account_number\":\"816862327474\",\"receivers_account_name\":\"John Doe Savings\",\"senders_account_number\":\"190960375310\",\"senders_username\":\"castilocasto\"}', 'TRX-33a7c7f5-f3a5-4ea5-bf2f-cc95963a759f', '2025-01-24 03:53:57', 20000.00000000, 22000.00, 2000.00, 'pending', 'internal', 'USD', 'fee', '2025-01-24 03:53:57', '2025-01-24 03:53:57');

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

--
-- Table structure for table `transfer_fees`
--

CREATE TABLE `transfer_fees` (
  `fee_id` int(11) NOT NULL,
  `transfer_type` enum('internal','external','crypto','wire') NOT NULL,
  `fee_amount` decimal(5,2) NOT NULL,
  `transfer_valid` enum('valid','invalid') DEFAULT 'valid',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `transfer_fees`
--

INSERT INTO `transfer_fees` (`fee_id`, `transfer_type`, `fee_amount`, `transfer_valid`, `created_at`, `updated_at`) VALUES
(9, 'internal', 10.00, 'valid', '2024-11-17 21:11:33', '2025-01-24 03:52:43'),
(10, 'external', 10.00, 'valid', '2024-11-17 21:38:52', '2024-11-18 00:39:25'),
(11, 'wire', 100.00, 'invalid', '2024-11-17 21:47:17', '2025-01-23 23:20:09'),
(12, 'crypto', 20.00, 'invalid', '2024-11-18 00:41:26', '2025-01-23 23:19:56');

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

--
-- Table structure for table `user_activity_logs`
--

CREATE TABLE `user_activity_logs` (
  `log_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `transaction_type` enum('withdrawal','deposit','check','bitcoin','other') NOT NULL,
  `transaction_trx` varchar(255) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `timestamp` datetime DEFAULT current_timestamp(),
  `ip_address` varchar(45) DEFAULT NULL,
  `device_info` varchar(255) DEFAULT NULL,
  `status` enum('success','failed','pending') NOT NULL,
  `additional_details` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_activity_logs`
--

INSERT INTO `user_activity_logs` (`log_id`, `user_id`, `transaction_type`, `transaction_trx`, `amount`, `timestamp`, `ip_address`, `device_info`, `status`, `additional_details`) VALUES
(14, 165, 'deposit', 'TRX-d21664c2-2898-4235-aec2-416a0e07c373', 8997.00, '2025-01-23 12:48:28', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'pending', NULL),
(15, 165, 'deposit', 'TRX-be1091d6-a1e8-492d-88ad-37d6f26097b5', 8997.00, '2025-01-23 12:48:41', '::1', 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36', 'pending', NULL),
(16, 165, 'deposit', 'TRX-ee00ae7c-a2a8-4604-9b52-6d747dd91c50', 8997.00, '2025-01-23 12:51:28', '::1', 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36', 'pending', NULL),
(17, 165, 'deposit', 'TRX-60ec8772-3f53-4d10-9d06-68b694b6fcd9', 12000.00, '2025-01-23 12:55:11', '::1', 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36', 'pending', NULL),
(18, 165, 'deposit', 'TRX-746175b0-f874-4f23-8c28-9672ed65b064', 1200.00, '2025-01-24 03:26:28', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 OPR/115.0.0.0', 'pending', NULL);

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

--
-- Table structure for table `user_balance`
--

CREATE TABLE `user_balance` (
  `id` int(11) NOT NULL,
  `balance` decimal(20,2) DEFAULT NULL,
  `bonus` decimal(10,5) NOT NULL,
  `transaction_date` datetime NOT NULL DEFAULT current_timestamp(),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `UserID` int(11) NOT NULL,
  `transfer_valid` enum('valid','suspended','restricted') DEFAULT 'valid',
  `remark` longtext DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_balance`
--

INSERT INTO `user_balance` (`id`, `balance`, `bonus`, `transaction_date`, `created_at`, `updated_at`, `UserID`, `transfer_valid`, `remark`) VALUES
(165, 140397.00, 0.00000, '2025-01-23 12:47:29', '2025-01-23 22:47:20', '2025-01-23 12:47:29', 165, 'valid', NULL),
(166, 2100.00, 0.00000, '2025-01-24 01:49:34', '2025-01-24 00:49:34', '2025-01-24 00:49:34', 166, 'valid', 'fee');

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

--
-- Table structure for table `website_settings`
--

CREATE TABLE `website_settings` (
  `id` int(11) NOT NULL,
  `settings` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`settings`)),
  `iframe` longtext DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `website_settings`
--

INSERT INTO `website_settings` (`id`, `settings`, `iframe`, `created_at`, `updated_at`) VALUES
(1, '{\"site_name\":\"Synox\",\"site_title\":\"secure | fast  | reliables\",\"site_country\":\"united states\",\"site_url\":\"http:\\/\\/localhost\\/new_banking\",\"site_address\":\"is 270 Park Avenue, New York, NY\",\"contact_email\":\"support@synoxbanking.com\",\"site_contact_phone\":\"7137125678\",\"site_description\":\"best banking service trial\",\"site_logo_url\":\"site_logo_679388cc553994.91190031.svg\",\"favicon_url\":\"favicon_679389b10c01e3.95733623.webp\"}', 'https://maps.google.com/maps?q=2880%20Broadway,%20New%20York&t=&z=13&ie=UTF8&iwloc=&output=embed', '2024-11-18 18:04:05', '2025-01-24 13:39:47');

--
-- Indexes for table `admin_login_history`
--
ALTER TABLE `admin_login_history`
  ADD PRIMARY KEY (`id`),
  ADD KEY `AdminID` (`AdminID`);

--
-- Indexes for table `check_deposits`
--
ALTER TABLE `check_deposits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `crypto_deposits`
--
ALTER TABLE `crypto_deposits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `crypto_transactions`
--
ALTER TABLE `crypto_transactions`
  ADD PRIMARY KEY (`transaction_id`),
  ADD KEY `crypto_transactions_ibfk_1` (`user_id`);

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

--
-- Indexes for table `crypto_withdrawals`
--
ALTER TABLE `crypto_withdrawals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `internal_beneficiaries`
--
ALTER TABLE `internal_beneficiaries`
  ADD PRIMARY KEY (`beneficiary_id`),
  ADD KEY `internal_beneficiaries_ibfk_1` (`user_id`);

--
-- Indexes for table `ip_cache`
--
ALTER TABLE `ip_cache`
  ADD PRIMARY KEY (`ip`);

--
-- Indexes for table `loans`
--
ALTER TABLE `loans`
  ADD PRIMARY KEY (`loan_id`),
  ADD KEY `fk_user_id_3` (`user_id`);

--
-- Indexes for table `loan_applications`
--
ALTER TABLE `loan_applications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_user_id` (`user_id`);

--
-- Indexes for table `login_history`
--
ALTER TABLE `login_history`
  ADD PRIMARY KEY (`id`),
  ADD KEY `login_history_ibfk_1` (`UserID`);

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

--
-- Indexes for table `order_confirmation`
--
ALTER TABLE `order_confirmation`
  ADD PRIMARY KEY (`order_id`),
  ADD UNIQUE KEY `order_number` (`order_number`),
  ADD KEY `fk_user_id` (`user_id`);

--
-- Indexes for table `otp_attempts`
--
ALTER TABLE `otp_attempts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `transactions_ibfk_1` (`UserID`);

--
-- Indexes for table `transaction_limits`
--
ALTER TABLE `transaction_limits`
  ADD PRIMARY KEY (`limit_id`),
  ADD KEY `UserID` (`UserID`);

--
-- Indexes for table `transaction_log`
--
ALTER TABLE `transaction_log`
  ADD PRIMARY KEY (`transaction_id`),
  ADD KEY `sender_id` (`sender_id`);

--
-- Indexes for table `transfer_fees`
--
ALTER TABLE `transfer_fees`
  ADD PRIMARY KEY (`fee_id`);

--
-- Indexes for table `user_activity_logs`
--
ALTER TABLE `user_activity_logs`
  ADD PRIMARY KEY (`log_id`),
  ADD KEY `user_activity_logs_ibfk_1` (`user_id`);

--
-- Indexes for table `user_balance`
--
ALTER TABLE `user_balance`
  ADD PRIMARY KEY (`id`),
  ADD KEY `UserID` (`UserID`);

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

--
-- AUTO_INCREMENT for table `admin_login_history`
--
ALTER TABLE `admin_login_history`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- AUTO_INCREMENT for table `check_deposits`
--
ALTER TABLE `check_deposits`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;

--
-- AUTO_INCREMENT for table `crypto_deposits`
--
ALTER TABLE `crypto_deposits`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- AUTO_INCREMENT for table `crypto_transactions`
--
ALTER TABLE `crypto_transactions`
  MODIFY `transaction_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50;

--
-- AUTO_INCREMENT for table `crypto_wallets`
--
ALTER TABLE `crypto_wallets`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `crypto_withdrawals`
--
ALTER TABLE `crypto_withdrawals`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `internal_beneficiaries`
--
ALTER TABLE `internal_beneficiaries`
  MODIFY `beneficiary_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `loans`
--
ALTER TABLE `loans`
  MODIFY `loan_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `loan_applications`
--
ALTER TABLE `loan_applications`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `login_history`
--
ALTER TABLE `login_history`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=121;

--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `order_confirmation`
--
ALTER TABLE `order_confirmation`
  MODIFY `order_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `otp_attempts`
--
ALTER TABLE `otp_attempts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=95;

--
-- AUTO_INCREMENT for table `transaction_limits`
--
ALTER TABLE `transaction_limits`
  MODIFY `limit_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `transaction_log`
--
ALTER TABLE `transaction_log`
  MODIFY `transaction_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `transfer_fees`
--
ALTER TABLE `transfer_fees`
  MODIFY `fee_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `user_activity_logs`
--
ALTER TABLE `user_activity_logs`
  MODIFY `log_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `user_balance`
--
ALTER TABLE `user_balance`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=167;

--
-- AUTO_INCREMENT for table `website_settings`
--
ALTER TABLE `website_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `admin_login_history`
--
ALTER TABLE `admin_login_history`
  ADD CONSTRAINT `admin_login_history_ibfk_1` FOREIGN KEY (`AdminID`) REFERENCES `admins` (`admin_id`) ON DELETE CASCADE;

--
-- Constraints for table `check_deposits`
--
ALTER TABLE `check_deposits`
  ADD CONSTRAINT `check_deposits_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE;

--
-- Constraints for table `crypto_deposits`
--
ALTER TABLE `crypto_deposits`
  ADD CONSTRAINT `crypto_deposits_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE;

--
-- Constraints for table `crypto_transactions`
--
ALTER TABLE `crypto_transactions`
  ADD CONSTRAINT `crypto_transactions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `crypto_withdrawals`
--
ALTER TABLE `crypto_withdrawals`
  ADD CONSTRAINT `crypto_withdrawals_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE;

--
-- Constraints for table `internal_beneficiaries`
--
ALTER TABLE `internal_beneficiaries`
  ADD CONSTRAINT `internal_beneficiaries_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `loans`
--
ALTER TABLE `loans`
  ADD CONSTRAINT `fk_user_id_3` FOREIGN KEY (`user_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `loan_applications`
--
ALTER TABLE `loan_applications`
  ADD CONSTRAINT `loan_applications_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `login_history`
--
ALTER TABLE `login_history`
  ADD CONSTRAINT `login_history_ibfk_1` FOREIGN KEY (`UserID`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `order_confirmation`
--
ALTER TABLE `order_confirmation`
  ADD CONSTRAINT `fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE;

--
-- Constraints for table `otp_attempts`
--
ALTER TABLE `otp_attempts`
  ADD CONSTRAINT `otp_attempts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE;

--
-- Constraints for table `transactions`
--
ALTER TABLE `transactions`
  ADD CONSTRAINT `transactions_ibfk_1` FOREIGN KEY (`UserID`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `transaction_limits`
--
ALTER TABLE `transaction_limits`
  ADD CONSTRAINT `transaction_limits_ibfk_1` FOREIGN KEY (`UserID`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE;

--
-- Constraints for table `transaction_log`
--
ALTER TABLE `transaction_log`
  ADD CONSTRAINT `transaction_log_ibfk_1` FOREIGN KEY (`sender_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `user_activity_logs`
--
ALTER TABLE `user_activity_logs`
  ADD CONSTRAINT `user_activity_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `user_balance`
--
ALTER TABLE `user_balance`
  ADD CONSTRAINT `user_balance_ibfk_1` FOREIGN KEY (`UserID`) REFERENCES `UserRegistration` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

