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

START TRANSACTION;



--
-- Database: `aurumsafe_fsf`
--

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

--
-- Table structure for table `bots`
--

CREATE TABLE `bots` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `bot_type` varchar(255) NOT NULL,
  `trading_pair` varchar(255) DEFAULT 'BTC/USDT',
  `status` varchar(255) DEFAULT 'active',
  `min_amount` decimal(18,8) NOT NULL,
  `max_amount` decimal(18,8) NOT NULL,
  `duration` varchar(255) NOT NULL DEFAULT '24h',
  `total_profit` decimal(18,8) DEFAULT 0.00000000,
  `total_subscribers` int(11) DEFAULT 0,
  `settings` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`settings`)),
  `last_trade_at` timestamp NULL 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 `bots`
--

INSERT INTO `bots` (`id`, `name`, `bot_type`, `trading_pair`, `status`, `min_amount`, `max_amount`, `duration`, `total_profit`, `total_subscribers`, `settings`, `last_trade_at`, `created_at`, `updated_at`) VALUES
(1, 'BTC Grid Pro', 'grid', 'BTC/USDT', 'active', 200.00000000, 20000.00000000, '24h', 15.75000000, 15, '{\"grid_levels\": 12, \"upper_price\": 35000, \"lower_price\": 30000}', NULL, '2025-01-20 08:25:32', '2025-01-23 15:48:13'),
(2, 'ETH DCA Master', 'dca', 'ETH/USDT', 'active', 50.00000000, 5000.00000000, '7d', 8.45000000, 9, '{\"interval_hours\": 6, \"target_profit\": 3}', NULL, '2025-01-20 08:25:32', '2025-01-22 14:08:13'),
(3, 'Quick Arbitrage', 'arbitrage', 'USDT/BUSD', 'active', 200.00000000, 20000.00000000, '4h', 5.25000000, 2, '{\"min_spread\": 0.8, \"exchanges\": [\"binance\", \"huobi\"]}', NULL, '2025-01-20 08:25:32', '2025-01-20 08:25:32');

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

--
-- Table structure for table `bot_settings`
--

CREATE TABLE `bot_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bot_type` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `parameters` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`parameters`)),
  `supported_pairs` text DEFAULT NULL,
  `duration_options` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`duration_options`)),
  `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 `bot_settings`
--

INSERT INTO `bot_settings` (`id`, `bot_type`, `name`, `is_active`, `parameters`, `supported_pairs`, `duration_options`, `created_at`, `updated_at`) VALUES
(1, 'grid', 'Grid Trading Bot', 1, '{\"grid_levels\":\"10\",\"upper_limit\":\"1.05\",\"lower_limit\":\"0.95\"}', '[\"BTC\\/USDT\",\"ETH\\/USDT\",\"LTC\\/USDT\",\"XRP\\/USDT\",\"BNB\\/USDT\",\"ADA\\/USDT\",\"SOL\\/USDT\",\"DOGE\\/USDT\",\"DASH\\/USDT\",\"XLM\\/USDT\"]', '[\"5m\",\"10m\",\"15m\",\"30m\",\"1h\",\"4h\",\"12h\",\"24h\",\"3d\",\"7d\",\"30d\"]', '2025-01-20 08:25:32', '2025-01-22 16:09:51'),
(2, 'dca', 'DCA Trading Bot', 1, '{\"interval_hours\": 4, \"price_deviation\": 2}', NULL, '[\"24h\", \"7d\", \"30d\"]', '2025-01-20 08:25:32', '2025-01-20 08:25:32'),
(3, 'arbitrage', 'Arbitrage Bot', 1, '{\"min_spread\": 0.5, \"max_slippage\": 0.1}', NULL, '[\"1h\", \"4h\", \"12h\", \"24h\"]', '2025-01-20 08:25:32', '2025-01-20 08:25:32');

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

--
-- Table structure for table `bot_subscriptions`
--

CREATE TABLE `bot_subscriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bot_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(18,8) NOT NULL,
  `current_profit` decimal(18,8) DEFAULT 0.00000000,
  `total_profit` decimal(18,8) DEFAULT 0.00000000,
  `status` varchar(255) DEFAULT 'active',
  `subscribed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `expires_at` timestamp NULL 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 `bot_subscriptions`
--

INSERT INTO `bot_subscriptions` (`id`, `bot_id`, `user_id`, `amount`, `current_profit`, `total_profit`, `status`, `subscribed_at`, `expires_at`, `created_at`, `updated_at`) VALUES
(21, 1, 8, 1000.00000000, 0.00000000, 0.00000000, 'active', '2025-01-23 15:48:12', '2025-01-23 15:53:12', '2025-01-23 15:48:12', '2025-01-23 15:48:12');

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

--
-- Table structure for table `bot_trades`
--

CREATE TABLE `bot_trades` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bot_id` bigint(20) UNSIGNED NOT NULL,
  `trading_pair` varchar(255) NOT NULL,
  `action` varchar(255) NOT NULL,
  `amount` decimal(18,8) NOT NULL,
  `price` decimal(18,8) NOT NULL,
  `profit` decimal(18,8) DEFAULT NULL,
  `result` enum('win','loss') DEFAULT NULL,
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),
  `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 `bot_trades`
--

INSERT INTO `bot_trades` (`id`, `bot_id`, `trading_pair`, `action`, `amount`, `price`, `profit`, `result`, `metadata`, `created_at`, `updated_at`) VALUES
(18, 1, 'BTC/USDT', 'sell', 1000.00000000, 106078.83000000, 0.00000000, NULL, '{\"notes\":\"User subscribed to bot with dynamic pair.\",\"updated_for_trade\":\"2025-01-23 16:48:13\"}', '2025-01-23 15:48:12', '2025-01-23 15:48:13');

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

--
-- Table structure for table `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cache`
--

INSERT INTO `cache` (`key`, `value`, `expiration`) VALUES
('crypto_prices', 'a:11:{s:7:\"bitcoin\";a:3:{s:3:\"usd\";d:95544;s:14:\"usd_24h_change\";d:-1.421;s:12:\"last_updated\";i:1739470037;}s:8:\"ethereum\";a:3:{s:3:\"usd\";d:2623.1;s:14:\"usd_24h_change\";d:-1.437;s:12:\"last_updated\";i:1739470037;}s:6:\"tether\";a:3:{s:3:\"usd\";i:1;s:14:\"usd_24h_change\";i:0;s:12:\"last_updated\";i:1739470037;}s:4:\"tron\";a:3:{s:3:\"usd\";d:0.2345;s:14:\"usd_24h_change\";d:-3.854;s:12:\"last_updated\";i:1739470037;}s:11:\"binancecoin\";a:3:{s:3:\"usd\";d:667.52;s:14:\"usd_24h_change\";d:-0.401;s:12:\"last_updated\";i:1739470037;}s:8:\"polkadot\";a:3:{s:3:\"usd\";d:5.099;s:14:\"usd_24h_change\";d:-0.971;s:12:\"last_updated\";i:1739470037;}s:12:\"bitcoin-cash\";a:3:{s:3:\"usd\";d:328.9;s:14:\"usd_24h_change\";d:-1.762;s:12:\"last_updated\";i:1739470037;}s:8:\"litecoin\";a:3:{s:3:\"usd\";d:124.1;s:14:\"usd_24h_change\";d:3.486;s:12:\"last_updated\";i:1739470037;}s:7:\"stellar\";a:3:{s:3:\"usd\";d:0.325;s:14:\"usd_24h_change\";d:0.526;s:12:\"last_updated\";i:1739470037;}s:4:\"dash\";a:3:{s:3:\"usd\";d:27.25;s:14:\"usd_24h_change\";d:0.591;s:12:\"last_updated\";i:1739470037;}s:6:\"solana\";a:3:{s:3:\"usd\";d:191.4;s:14:\"usd_24h_change\";d:-1.243;s:12:\"last_updated\";i:1739470037;}}', 1739470097);

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

--
-- Table structure for table `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `cards`
--

CREATE TABLE `cards` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `crypto_asset_id` bigint(20) UNSIGNED NOT NULL,
  `card_number` varchar(255) NOT NULL,
  `card_holder` varchar(255) NOT NULL,
  `expiry_month` varchar(2) NOT NULL,
  `expiry_year` varchar(2) NOT NULL,
  `cvv` varchar(4) NOT NULL,
  `billing_address` text NOT NULL,
  `zip_code` varchar(255) NOT NULL,
  `status` enum('active','inactive','frozen') NOT NULL DEFAULT 'inactive',
  `balance` decimal(10,2) NOT NULL DEFAULT 0.00,
  `card_type` enum('virtual','physical') NOT NULL DEFAULT 'virtual',
  `last_four` varchar(4) NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `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 `cards`
--

INSERT INTO `cards` (`id`, `user_id`, `crypto_asset_id`, `card_number`, `card_holder`, `expiry_month`, `expiry_year`, `cvv`, `billing_address`, `zip_code`, `status`, `balance`, `card_type`, `last_four`, `is_default`, `created_at`, `updated_at`, `deleted_at`) VALUES
(4, 8, 19, '41461407279035685', 'solomon ordu', '03', '27', '862', '651 N Broad Street, Middletown, Delaware, US', '19703', 'active', 100.00, 'virtual', '5685', 1, '2024-12-17 00:58:41', '2024-12-17 03:10:23', '2024-12-17 03:10:23'),
(5, 8, 19, '4187001496149331', 'solomon ordu', '12', '27', '902', '651 N Broad Street, Middletown, Delaware, US', '19709', 'inactive', 0.00, 'virtual', '7985', 1, '2024-12-17 03:51:58', '2024-12-17 05:00:21', NULL);

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

--
-- Table structure for table `card_transactions`
--

CREATE TABLE `card_transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `card_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `type` varchar(255) NOT NULL,
  `description` text 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 `card_transactions`
--

INSERT INTO `card_transactions` (`id`, `card_id`, `amount`, `type`, `description`, `created_at`, `updated_at`) VALUES
(9, 4, 100.00, 'credit', 'Credit', '2024-12-17 00:59:10', '2024-12-17 00:59:10');

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

--
-- Table structure for table `crypto_assets`
--

CREATE TABLE `crypto_assets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `btc_balance` decimal(18,4) DEFAULT 0.0000,
  `btc_status` tinyint(1) DEFAULT 1,
  `btc_address` varchar(255) DEFAULT NULL,
  `usdt_trc20_balance` decimal(18,4) DEFAULT 0.0000,
  `usdt_trc20_status` tinyint(1) DEFAULT 1,
  `usdt_trc20_address` varchar(255) DEFAULT NULL,
  `usdt_erc20_balance` decimal(18,4) DEFAULT 0.0000,
  `usdt_erc20_status` tinyint(1) DEFAULT 1,
  `usdt_erc20_address` varchar(255) DEFAULT NULL,
  `eth_balance` decimal(18,4) DEFAULT 0.0000,
  `eth_status` tinyint(1) DEFAULT 1,
  `eth_address` varchar(255) DEFAULT NULL,
  `trx_balance` decimal(18,4) DEFAULT 0.0000,
  `trx_status` tinyint(1) DEFAULT 1,
  `trx_address` varchar(255) DEFAULT NULL,
  `usdt_bep20_balance` decimal(18,4) DEFAULT 0.0000,
  `usdt_bep20_status` tinyint(1) DEFAULT 1,
  `usdt_bep20_address` varchar(255) DEFAULT NULL,
  `bch_balance` decimal(18,4) DEFAULT 0.0000,
  `bch_status` tinyint(1) DEFAULT 1,
  `bch_address` varchar(255) DEFAULT NULL,
  `ltc_balance` decimal(18,4) DEFAULT 0.0000,
  `ltc_status` tinyint(1) DEFAULT 1,
  `ltc_address` varchar(255) DEFAULT NULL,
  `xlm_balance` decimal(18,4) DEFAULT 0.0000,
  `xlm_status` tinyint(1) DEFAULT 1,
  `xlm_address` varchar(255) DEFAULT NULL,
  `dash_balance` decimal(18,4) DEFAULT 0.0000,
  `dash_status` tinyint(1) DEFAULT 1,
  `dash_address` varchar(255) DEFAULT NULL,
  `sol_balance` decimal(18,4) DEFAULT 0.0000,
  `sol_status` tinyint(1) DEFAULT 1,
  `sol_address` varchar(255) DEFAULT NULL,
  `bnb_balance` decimal(18,4) DEFAULT 0.0000,
  `bnb_status` tinyint(1) DEFAULT 1,
  `bnb_address` varchar(255) DEFAULT NULL,
  `dot_balance` decimal(18,4) DEFAULT 0.0000,
  `dot_status` tinyint(1) DEFAULT 1,
  `dot_address` varchar(255) DEFAULT NULL,
  `btc_fee` decimal(10,4) DEFAULT 0.0000,
  `usdt_trc20_fee` decimal(10,4) DEFAULT 0.0000,
  `usdt_erc20_fee` decimal(10,4) DEFAULT 0.0000,
  `eth_fee` decimal(10,4) DEFAULT 0.0000,
  `trx_fee` decimal(10,4) DEFAULT 0.0000,
  `usdt_bep20_fee` decimal(10,4) DEFAULT 0.0000,
  `bch_fee` decimal(10,4) DEFAULT 0.0000,
  `ltc_fee` decimal(10,4) DEFAULT 0.0000,
  `xlm_fee` decimal(10,4) DEFAULT 0.0000,
  `dash_fee` decimal(10,4) DEFAULT 0.0000,
  `sol_fee` decimal(10,4) DEFAULT 0.0000,
  `bnb_fee` decimal(10,4) DEFAULT 0.0000,
  `dot_fee` decimal(10,4) DEFAULT 0.0000,
  `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 `crypto_assets`
--

INSERT INTO `crypto_assets` (`id`, `user_id`, `btc_balance`, `btc_status`, `btc_address`, `usdt_trc20_balance`, `usdt_trc20_status`, `usdt_trc20_address`, `usdt_erc20_balance`, `usdt_erc20_status`, `usdt_erc20_address`, `eth_balance`, `eth_status`, `eth_address`, `trx_balance`, `trx_status`, `trx_address`, `usdt_bep20_balance`, `usdt_bep20_status`, `usdt_bep20_address`, `bch_balance`, `bch_status`, `bch_address`, `ltc_balance`, `ltc_status`, `ltc_address`, `xlm_balance`, `xlm_status`, `xlm_address`, `dash_balance`, `dash_status`, `dash_address`, `sol_balance`, `sol_status`, `sol_address`, `bnb_balance`, `bnb_status`, `bnb_address`, `dot_balance`, `dot_status`, `dot_address`, `btc_fee`, `usdt_trc20_fee`, `usdt_erc20_fee`, `eth_fee`, `trx_fee`, `usdt_bep20_fee`, `bch_fee`, `ltc_fee`, `xlm_fee`, `dash_fee`, `sol_fee`, `bnb_fee`, `dot_fee`, `created_at`, `updated_at`) VALUES
(19, 8, 0.3281, 1, 'bcce8b2f3dd5b1e0089fff82b83bf06f6882db3e0f', 13600.0000, 1, 'Taef0196eb8712efced75024ef79657d3dfcd3751', 494.7864, 1, '0xe9792622d052665245e62815e4ac78b3711d6fd0', 0.2404, 1, '0x6705c63595946b18939aea9807f189cea2e62d41', 50.0000, 1, 'Teda40bcf195065c320f03f4e66edd1e868b4733d', 0.0000, 1, '0x389316e2b36830cfc2968b65e43b884cc28f4a05', 0.0000, 1, '113a5f40eec1194a52da849d7829fdd0a68ea7f49', 0.0000, 1, 'L4373a23b7ccbfac653c4d052ed7619f7bf2aa351', 0.0000, 1, 'G33f4d4ae79b426a7e2c94b0d5ff136db98a8a9a1719ac48cef9aa7f5', 0.0000, 1, 'Xc514ed992f9b03578915087b09c75d68ac', 0.0000, 1, 'Sob64651b31a17538edb995f39cde7b8e64cf9d963e9d8', 0.0000, 1, 'bnb62b04922d14e5d579fd9b0f00145ebe1e117bb', 0.0000, 1, '57e68b37a512e6b0eb81aedcf9ff5382389318d69a0a8f196', 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, '2024-12-16 23:52:55', '2025-02-13 15:57:27'),
(31, 18, 0.2000, 1, 'ahhay3g3g', 0.0000, 1, 'a99qj', 0.0000, 1, '293j', 0.0000, 1, 'iq91', 0.0000, 1, 'jsjjs', 0.0000, 1, 's99w', 0.0000, 1, 's99j2', 0.0000, 1, 'sn83u', 0.0000, 1, '38hsh', 0.0000, 1, 'sn83h', 0.0000, 1, '8shhs', 0.0000, 1, 's8bsb3', 0.0000, 1, 'su8383', 0.0005, 5.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, '2025-02-13 15:57:27', '2025-02-13 16:13:32');

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

--
-- 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 `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) 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, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2024_12_07_080343_add_passcode_to_users_table', 1),
(6, '2024_12_14_150621_create_card', 2),
(7, '2024_12_14_153904_card_transactions', 3),
(8, '2024_12_14_171924_transactions', 4),
(9, '2024_12_15_150052_create_notifications_table', 5);

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

--
-- Table structure for table `notifications`
--

CREATE TABLE `notifications` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT 0,
  `extra_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `notifications`
--

INSERT INTO `notifications` (`id`, `user_id`, `type`, `title`, `message`, `is_read`, `extra_data`, `created_at`, `updated_at`) VALUES
(17, 1, 'send_crypto', 'Pending Transaction', 'Incoming deposit of 1000.00000000 usdt_bep20 is pending.', 0, '{\"transaction_hash\":null,\"status\":\"pending\"}', '2024-12-17 04:28:14', '2024-12-17 04:28:14'),
(18, 1, 'send_crypto', 'Pending Transaction', 'Incoming deposit of 0.48500000 eth is pending.', 0, '{\"transaction_hash\":null,\"status\":\"pending\"}', '2024-12-17 04:33:59', '2024-12-17 04:33:59'),
(24, 8, 'kyc_upload', 'KYC Documents Uploaded', 'Your KYC documents have been submitted for verification.', 0, '\"{\\\"documents_uploaded\\\":[\\\"front_id\\\",\\\"back_id\\\",\\\"proof_of_residence\\\"],\\\"upload_timestamp\\\":\\\"2025-01-22 19:08:34\\\"}\"', '2025-01-22 18:08:34', '2025-01-22 18:08:34'),
(25, 8, 'kyc', 'KYC Approved', 'Your KYC verification has been approved.', 1, NULL, '2025-01-22 18:21:02', '2025-01-24 13:59:44'),
(26, 8, 'crypto_swap', 'Crypto Swap', 'Swapped 0.0040 BTC to 423.6376 USDT_ERC20', 0, '\"{\\\"transaction_id\\\":52,\\\"from_crypto\\\":\\\"btc\\\",\\\"to_crypto\\\":\\\"usdt_erc20\\\",\\\"from_amount\\\":0.004,\\\"to_amount\\\":423.63759999999996,\\\"usd_value\\\":423.63759999999996}\"', '2025-01-24 14:02:24', '2025-01-24 14:02:24'),
(27, 8, 'crypto_swap', 'Crypto Swap', 'Swapped 0.0033 BTC to 0.1039 ETH', 0, '\"{\\\"transaction_id\\\":53,\\\"from_crypto\\\":\\\"btc\\\",\\\"to_crypto\\\":\\\"eth\\\",\\\"from_amount\\\":0.0033,\\\"to_amount\\\":0.1039051018055859,\\\"usd_value\\\":347.06278199999997}\"', '2025-01-26 19:32:29', '2025-01-26 19:32:29'),
(28, 8, 'referral_bonus', 'Referral Bonus Received', 'You have received a referral bonus of $50.00 USDT for referring john von', 0, '\"{\\\"amount\\\":\\\"50.00\\\",\\\"referred_user\\\":\\\"john von\\\"}\"', '2025-02-13 15:40:38', '2025-02-13 15:40:38'),
(29, 8, 'referral_bonus', 'Referral Bonus Received', 'You have received a referral bonus of $50.00 USDT for referring john pen', 0, '\"{\\\"amount\\\":\\\"50.00\\\",\\\"referred_user\\\":\\\"john pen\\\"}\"', '2025-02-13 15:57:27', '2025-02-13 15:57:27');

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

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('8zj43PqC3U3uPUFj2OA4IP4fjYQWM048GTQkGQmP', NULL, '51.254.49.102', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZ0ZNcG5GaVpsSUtiSjh0ckgxaTJxQkMyeEgySm10MlNUU01LQ3FRciI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjg6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1739466470),
('dwKQhTtaHI2XRy2nK4tsb5cktLB3orSma31a57Y5', NULL, '51.254.49.108', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZ1JXNWVIREQwZU5FOUJlbThmYzhLSVRaN2JIc0tmSW5hVFVrSXJnSiI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjg6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1739469979),
('Fe1y25wa4elQYjvjAc1dTO6BKDboP7Akv3c1eMQC', NULL, '188.165.87.98', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoieDBJa1FJMzlmWVN2NXg3VUwxblpsNGkycVh4RExHaHNCNWtobGxIOSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjg6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1739462071),
('GOnNjIi13Nq0qP9gho3QJ9AnYxxYvlNt7beu122G', NULL, '51.254.49.105', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiRGl2cDBXTDRDajluT2NGVm55WktiZHRSVUNrTFVjTlRzRUprdGY0MCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzI6Imh0dHBzOi8vd3d3LnRlc3QuY3ljbG9udmVyc2UuY29tIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1739466054),
('KAzzwk2xRqMki2wfYjvYyu2rsxUD0JVVmRPwDOEL', NULL, '47.242.224.70', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiMktZYVNaclNtcmhzNE1ac0pnQnFvUXVEVWNZbmRqaU05Zlc5YVNrUSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjg6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1739465332),
('kQ6PHPeD92XeiEDAwzZQ4Sf8Hxlr0fibBNho1HFf', NULL, '51.254.0.2', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiclJmWkJsekdBSWdQdXhQaTBiUWlDcDFZUFhrV1JjRFNFYzg1b044UiI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mjg6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1739462771),
('Kug9mB9NsMn3gU9fDq61lgBIF4TVel0bCGpeXURO', 18, '102.90.100.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36', 'YTo3OntzOjY6Il90b2tlbiI7czo0MDoiS1JKRmxnQTEzbHZqaFJ2U3pkWmR6ZGNnNFNqMWtqY2xySE1yZ1hIUSI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NTU6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20vbm90aWZpY2F0aW9ucy91bnJlYWQtY291bnQiO31zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToxODtzOjM6InVybCI7YToxOntzOjg6ImludGVuZGVkIjtzOjM4OiJodHRwczovL3Rlc3QuY3ljbG9udmVyc2UuY29tL2Rhc2hib2FyZCI7fXM6MTc6InBhc3Njb2RlX3ZlcmlmaWVkIjtiOjE7czoyMDoicGFzc2NvZGVfdmVyaWZpZWRfYXQiO086MjU6IklsbHVtaW5hdGVcU3VwcG9ydFxDYXJib24iOjM6e3M6NDoiZGF0ZSI7czoyNjoiMjAyNS0wMi0xMyAxODowNzoxOC4zNzUxOTIiO3M6MTM6InRpbWV6b25lX3R5cGUiO2k6MztzOjg6InRpbWV6b25lIjtzOjM6IlVUQyI7fX0=', 1739470038),
('kZ44YLRHsXMhXMb5nrE7scBIvSxJhRRiVUeBQdec', NULL, '196.49.26.134', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoieTlvMkNQUmZpaUlhckpNcEI4NVR2OXhQWGxDNHFXa0hXZTFra2FuYiI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czoxNzk6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20vdmVyaWZ5LWVtYWlsLzE4Lzk4NmQyMmJlZWY4MjkxYjc0NDkzNDU4OWMyMGJiODA1MDliODI2YjM/ZXhwaXJlcz0xNzM5NDY5NDQ3JnNpZ25hdHVyZT1jYmY3Y2FjMTU5OGY3ZGFkNGRlZDdhZWMzNDIwM2ZiZTI0OGQ4YTQzMzdkOGVjZTVmMWMxMzUyMWNhYmY0NTM2Ijt9czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzQ6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20vbG9naW4iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1739466011),
('LY0Rx70VhgumLdyzeT2BHwAIZjCI6kkYFZRpIVZj', NULL, '188.165.87.111', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiMTJtbHJXemU0RjJvcFFZcW5MZWdmRmFuUE9KMG1MSkx0QnRoMTFDNSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzI6Imh0dHBzOi8vd3d3LnRlc3QuY3ljbG9udmVyc2UuY29tIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1739462381),
('rpQ6PunOHUeWH3J3q6kfDic633Ar48TajUSP44K9', 1, '102.90.82.65', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Mobile Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiZm1hWHJVQ3B3VkFzVkxhVlFPdXNoaDV4NkRJeHlabElsNHNneWlIQyI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NDA6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20vYWRtaW4vdXNlcnMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToxO30=', 1739466813),
('Uwf6o5RmS9ncMkP4cwpWPgEgb4FjZlIhAGdZmXvB', NULL, '47.242.224.70', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiWEh1bGF6SVJsdHB0TWxoU3Jzcm5jZDZLRnUyQzN3d1lQWWxDVVp2cyI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzI6Imh0dHBzOi8vd3d3LnRlc3QuY3ljbG9udmVyc2UuY29tIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1739465332),
('wa5bNvhenJOuh4STJEMVKN1NtsIxA540f0RoAKTY', NULL, '37.59.165.88', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoibHY3M1VwdkxodWVPbk1yUUVqaHlHUWNCWmFEN0VTMlBjanhhSFZLcCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzI6Imh0dHBzOi8vd3d3LnRlc3QuY3ljbG9udmVyc2UuY29tIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1739462651),
('wIWvow51NFcZKNnE9TEwF3dLb7UlXSIPwyeu5yGg', NULL, '196.49.26.134', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiZ2RMTWg5dGo4V1d2Q3NVUldZbXVweEZoRkJ0V2w1dmhMOERiM0dBaSI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czoxNzk6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20vdmVyaWZ5LWVtYWlsLzE3Lzk4NmQyMmJlZWY4MjkxYjc0NDkzNDU4OWMyMGJiODA1MDliODI2YjM/ZXhwaXJlcz0xNzM5NDY4NDM5JnNpZ25hdHVyZT1lNTk2ZTY0ZGEzMmZmOWQ3YTU1ZGVlYjEyZDE1MDQ2ZTg1OWQyMDM3MTAyMmUyZDA3NTU1ZjBmYTE5ZjQyYjc1Ijt9czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzQ6Imh0dHBzOi8vdGVzdC5jeWNsb252ZXJzZS5jb20vbG9naW4iO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1739465015),
('YyRZxEMU54NaDhYVzIP5nGxWJomkC1JywIT4Ao78', NULL, '51.254.49.106', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiSTZuYnN3YmZTZUVmeDhGN0hnd2l0NmhZaXBrZ2UxRmtISjI5eVZWdyI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MzI6Imh0dHBzOi8vd3d3LnRlc3QuY3ljbG9udmVyc2UuY29tIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1739469528);

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

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

CREATE TABLE `settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `key` varchar(255) NOT NULL,
  `value` text DEFAULT NULL,
  `group` varchar(255) NOT NULL DEFAULT 'general',
  `type` varchar(255) NOT NULL DEFAULT 'text',
  `display_name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `is_public` tinyint(1) NOT NULL DEFAULT 0,
  `order` int(11) 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;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `key`, `value`, `group`, `type`, `display_name`, `description`, `is_public`, `order`, `created_at`, `updated_at`) VALUES
(1, 'site_logo', 'uploads/logos/1734287653_favicon-1.png', 'general', 'file', 'Site Logo', NULL, 1, 0, '2024-12-15 16:50:09', '2024-12-15 23:34:13'),
(2, 'site_favicon', 'uploads/favicon/1734287653_favicon-1.png', 'general', 'file', 'Site Favicon', NULL, 1, 0, '2024-12-15 16:50:09', '2024-12-15 23:34:13'),
(3, 'site_name', 'Defibit', 'general', 'text', 'Site Name', NULL, 1, 0, '2024-12-15 16:50:09', '2025-02-13 10:22:53'),
(4, 'company_name', 'Defibit', 'general', 'text', 'Company Name', NULL, 1, 0, '2024-12-15 16:50:09', '2025-02-13 10:22:53'),
(5, 'company_address', 'ccc', 'general', 'textarea', 'Company Address', NULL, 1, 0, '2024-12-15 16:50:09', '2025-02-13 10:22:53'),
(6, 'company_phone', '+18272002982777', 'general', 'text', 'Company Phone', NULL, 1, 0, '2024-12-15 16:50:09', '2025-02-13 10:22:53'),
(7, 'company_email', 'support@defibit.pro', 'general', 'email', 'Company Email', NULL, 1, 0, '2024-12-15 16:50:09', '2025-02-13 10:22:53'),
(8, 'email_header_logo', 'uploads/email/1734416321_IMG-20241210-WA0053.jpg', 'email', 'file', 'Email Header Logo', NULL, 1, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(9, 'mail_mailer', 'smtp', 'email', 'text', 'Mail Mailer', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(10, 'mail_host', 'defibit.pro', 'email', 'text', 'Mail Host', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(11, 'mail_port', '465', 'email', 'text', 'Mail Port', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(12, 'mail_username', 'system@defibit.pro', 'email', 'text', 'Mail Username', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(13, 'mail_encryption', 'tls', 'email', 'text', 'Mail Encryption', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(14, 'mail_from_address', 'info@defibit.pro', 'email', 'email', 'Mail From Address', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(15, 'mail_from_name', 'Defibit', 'email', 'text', 'Mail From Name', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(16, 'mail_password', 'vk*I5vlr&04{', 'email', 'password', 'Mail Password', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(17, 'notify_admin_on_user_register', '1', 'notifications', 'boolean', 'Notify Admin On User Register', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(18, 'notify_admin_on_kyc_submission', '1', 'notifications', 'boolean', 'Notify Admin On Kyc Submission', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(19, 'notify_user_on_kyc_approval', '1', 'notifications', 'boolean', 'Notify User On Kyc Approval', NULL, 0, 0, '2024-12-17 11:18:41', '2024-12-17 11:18:41'),
(20, 'referral_enabled', '1', 'referral', 'boolean', 'Enable Referral System', NULL, 1, 0, '2025-02-13 10:22:53', '2025-02-13 10:22:53'),
(21, 'referral_bonus_amount', '50.00', 'referral', 'number', 'Referral Bonus Amount', NULL, 1, 0, '2025-02-13 10:22:53', '2025-02-13 10:22:53'),
(22, 'referral_bonus_type', 'instant', 'referral', 'select', 'Referral Bonus Distribution Type', NULL, 1, 0, '2025-02-13 10:22:53', '2025-02-13 10:22:53'),
(23, 'btc_address', 'ahhay3g3g', 'wallets', 'text', 'Btc address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:26:14'),
(24, 'eth_address', 'iq91', 'wallets', 'text', 'Eth address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(25, 'usdt_trc20_address', 'a99qj', 'wallets', 'text', 'Usdt trc20 address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(26, 'usdt_erc20_address', '293j', 'wallets', 'text', 'Usdt erc20 address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(27, 'usdt_bep20_address', 's99w', 'wallets', 'text', 'Usdt bep20 address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(28, 'trx_address', 'jsjjs', 'wallets', 'text', 'Trx address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(29, 'bch_address', 's99j2', 'wallets', 'text', 'Bch address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(30, 'ltc_address', 'sn83u', 'wallets', 'text', 'Ltc address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(31, 'xlm_address', '38hsh', 'wallets', 'text', 'Xlm address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(32, 'dash_address', 'sn83h', 'wallets', 'text', 'Dash address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(33, 'sol_address', '8shhs', 'wallets', 'text', 'Sol address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(34, 'bnb_address', 's8bsb3', 'wallets', 'text', 'Bnb address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51'),
(35, 'dot_address', 'su8383', 'wallets', 'text', 'Dot address', NULL, 0, 0, '2025-02-13 14:13:24', '2025-02-13 14:22:51');

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

--
-- Table structure for table `subscription_profits`
--

CREATE TABLE `subscription_profits` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bot_subscription_id` bigint(20) UNSIGNED NOT NULL,
  `bot_trade_id` bigint(20) UNSIGNED NOT NULL,
  `amount` decimal(18,8) NOT NULL,
  `profit` decimal(18,8) 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;

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

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

CREATE TABLE `transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `cryptoasset_id` bigint(20) UNSIGNED NOT NULL,
  `type` enum('deposit','withdrawal','swap','funding','refund') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `which_crypto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `from_crypto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `to_crypto` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transaction_hash` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `from_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `to_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount_in` decimal(20,8) DEFAULT NULL,
  `amount_out` decimal(20,8) DEFAULT NULL,
  `network_fee` decimal(20,8) DEFAULT NULL,
  `rate` decimal(20,8) DEFAULT NULL,
  `status` enum('pending','processing','completed','failed','cancelled','reversed') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `related_transaction_id` bigint(20) UNSIGNED DEFAULT NULL,
  `processed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `transactions` (`id`, `user_id`, `cryptoasset_id`, `type`, `which_crypto`, `from_crypto`, `to_crypto`, `transaction_hash`, `from_address`, `to_address`, `amount_in`, `amount_out`, `network_fee`, `rate`, `status`, `metadata`, `related_transaction_id`, `processed_at`, `created_at`, `updated_at`) VALUES
(42, 8, 19, 'deposit', 'btc', NULL, NULL, NULL, NULL, NULL, 0.04500000, NULL, NULL, NULL, 'completed', NULL, NULL, NULL, '2024-12-17 03:39:51', '2024-12-17 03:44:17'),
(47, 8, 19, 'deposit', 'trx', NULL, NULL, NULL, NULL, NULL, 600.00000000, NULL, NULL, NULL, 'completed', NULL, NULL, NULL, '2024-12-17 04:36:46', '2024-12-17 04:39:03'),
(48, 8, 19, 'swap', 'trx', 'trx', 'btc', NULL, NULL, NULL, 1200.00000000, 0.00335847, NULL, 0.00000280, 'completed', '{\"from_price_usd\":0.29559999999999997388755446081631816923618316650390625,\"to_price_usd\":105619.610000000000582076609134674072265625,\"usd_value\":354.71999999999997044142219237983226776123046875}', NULL, NULL, '2024-12-17 04:39:56', '2024-12-17 04:39:56'),
(49, 8, 19, 'swap', 'btc', 'btc', 'eth', NULL, NULL, NULL, 0.00320000, 0.08939268, NULL, 27.93521315, 'completed', '{\"from_price_usd\":95167.17,\"to_price_usd\":3406.71,\"usd_value\":304.534944}', NULL, NULL, '2024-12-28 21:15:23', '2024-12-28 21:15:23'),
(50, 8, 19, 'swap', 'btc', 'btc', 'eth', NULL, NULL, NULL, 0.00140000, 0.03909186, NULL, 27.92275721, 'completed', '{\"from_price_usd\":95130.6,\"to_price_usd\":3406.92,\"usd_value\":133.18284}', NULL, NULL, '2024-12-28 21:16:59', '2024-12-28 21:16:59'),
(51, 8, 19, 'swap', 'eth', 'eth', 'usdt_erc20', NULL, NULL, NULL, 0.01500000, 51.14880000, NULL, 3409.92000000, 'completed', '{\"from_price_usd\":3409.92,\"to_price_usd\":1,\"usd_value\":51.1488}', NULL, NULL, '2024-12-28 21:22:23', '2024-12-28 21:22:23'),
(52, 8, 19, 'swap', 'btc', 'btc', 'usdt_erc20', NULL, NULL, NULL, 0.00400000, 423.63760000, NULL, 105909.40000000, 'completed', '{\"from_price_usd\":105909.4,\"to_price_usd\":1,\"usd_value\":423.63759999999996}', NULL, NULL, '2025-01-24 14:02:24', '2025-01-24 14:02:24'),
(53, 8, 19, 'swap', 'btc', 'btc', 'eth', NULL, NULL, NULL, 0.00330000, 0.10390510, NULL, 31.48639449, 'completed', '{\"from_price_usd\":105170.54,\"to_price_usd\":3340.19,\"usd_value\":347.06278199999997}', NULL, NULL, '2025-01-26 19:32:29', '2025-01-26 19:32:29');

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(10) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `is_admin` tinyint(1) DEFAULT 0,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `passcode` varchar(255) DEFAULT NULL,
  `kyc_status` enum('not_submitted','pending','approved','rejected') DEFAULT 'not_submitted',
  `front_id` varchar(255) DEFAULT NULL,
  `back_id` varchar(255) DEFAULT NULL,
  `proof_of_residence` varchar(255) DEFAULT NULL,
  `require_kyc` tinyint(1) DEFAULT 1,
  `enable_crypto_sending` tinyint(1) DEFAULT 0,
  `wallet_phrase` varchar(255) DEFAULT NULL,
  `is_wallet_connected` tinyint(1) DEFAULT 0,
  `referral_code` varchar(255) DEFAULT NULL,
  `referred_by` bigint(20) UNSIGNED DEFAULT NULL,
  `referral_count` int(11) DEFAULT 0,
  `two_factor_secret` text DEFAULT NULL,
  `two_factor_recovery_codes` text DEFAULT NULL,
  `two_factor_confirmed_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `uuid`, `name`, `email`, `email_verified_at`, `password`, `is_admin`, `remember_token`, `created_at`, `updated_at`, `passcode`, `kyc_status`, `front_id`, `back_id`, `proof_of_residence`, `require_kyc`, `enable_crypto_sending`, `wallet_phrase`, `is_wallet_connected`, `referral_code`, `referred_by`, `referral_count`, `two_factor_secret`, `two_factor_recovery_codes`, `two_factor_confirmed_at`) VALUES
(1, 'admin', 'Admin', 'admin@mail.com', '2024-12-07 07:20:15', '$2y$12$B1tJYJtvv9AdKA2MuypX8O8cptmJkbq4bZtmaoMSUQMlU9UwcGwgm', 1, NULL, '2024-12-07 07:20:15', '2025-02-13 12:24:21', '$2y$12$YHBU2fy0jvkH.qUQkuanQ.1TFidkxyDaJ55nnzCxfooxNob1MTEZa', 'not_submitted', NULL, NULL, NULL, 1, 0, NULL, 0, 'REFA2255667', NULL, 0, 'ZXPWSG7XRCOUDOJ3', '[\"2yDSwtrOcM\",\"RRQmWV4EA2\",\"NQCdxmGW5A\",\"UZ3H0hABRF\",\"0KgABPzCbB\",\"XitibL3uVv\",\"zDNHuqzltY\",\"sghp68l9EY\"]', NULL),
(8, 'TDYJJBT', 'solomon ordu', 'sternhub7@gmail.com', '2024-12-18 09:47:38', '$2y$12$kUpUcge.04ztxRzfPMBjzOyyg2S.r7qHnQX2oorTSc.PXySlOkbja', 0, NULL, '2024-12-16 23:52:55', '2025-02-13 15:57:27', '$2y$12$/fksRNCgi2zgsNYbgpb47OPaYEJ820oeYXd/Q3XYotXzBM1aetJg2', 'approved', 'kycs/cmRjJZOixpr4r3Nj5nB8dXOKAPDcvWCWu0PV1HAJ.jpg', 'kycs/EIUccQQCUTlTZ40BVTDsX2Ke4HEHY4ARR99L87qm.jpg', 'kycs/RLT6S38H1wS9QFlXv8FR8uhiAIMoiS4DCSB5ZwU8.jpg', 0, 0, NULL, 0, 'REFA2255E88', NULL, 1, NULL, NULL, NULL),
(18, 'TROGV7I', 'john pen', 'ordu.solomon@gmail.com', '2025-02-13 15:58:01', '$2y$12$Z0ch36VdxQ3RCH2b0QRFoucfMf0QKaPJgcE79.6g/5Tkhg8luHB2y', 0, NULL, '2025-02-13 15:57:27', '2025-02-13 16:00:32', '$2y$12$TygVgz2KE6KuiWdf.z7JYuCZxpV22.bUVa01SfkgQC86x6eyqxUoS', 'approved', NULL, NULL, NULL, 1, 0, NULL, 0, 'REFKWGTHYJI', 8, 0, NULL, NULL, NULL);

--
-- Indexes for dumped tables
--

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

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

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

--
-- Indexes for table `bot_trades`
--
ALTER TABLE `bot_trades`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bot_id` (`bot_id`);

--
-- Indexes for table `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`);

--
-- Indexes for table `cards`
--
ALTER TABLE `cards`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `cards_card_number_unique` (`card_number`),
  ADD KEY `cards_user_id_foreign` (`user_id`),
  ADD KEY `cards_crypto_asset_id_foreign` (`crypto_asset_id`);

--
-- Indexes for table `card_transactions`
--
ALTER TABLE `card_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `card_transactions_card_id_foreign` (`card_id`);

--
-- Indexes for table `crypto_assets`
--
ALTER TABLE `crypto_assets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`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 `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

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

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

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

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `settings_key_unique` (`key`),
  ADD KEY `settings_key_index` (`key`);

--
-- Indexes for table `subscription_profits`
--
ALTER TABLE `subscription_profits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bot_subscription_id` (`bot_subscription_id`),
  ADD KEY `bot_trade_id` (`bot_trade_id`);

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `transactions_related_transaction_id_foreign` (`related_transaction_id`),
  ADD KEY `transactions_type_index` (`type`),
  ADD KEY `transactions_which_crypto_index` (`which_crypto`),
  ADD KEY `transactions_status_index` (`status`),
  ADD KEY `transactions_transaction_hash_index` (`transaction_hash`),
  ADD KEY `transactions_user_id_type_status_index` (`user_id`,`type`,`status`),
  ADD KEY `transactions_cryptoasset_id_which_crypto_index` (`cryptoasset_id`,`which_crypto`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD UNIQUE KEY `uuid` (`uuid`),
  ADD UNIQUE KEY `referral_code` (`referral_code`),
  ADD KEY `users_referred_by_foreign` (`referred_by`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `bot_subscriptions`
--
ALTER TABLE `bot_subscriptions`
  ADD CONSTRAINT `bot_subscriptions_ibfk_1` FOREIGN KEY (`bot_id`) REFERENCES `bots` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bot_subscriptions_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `bot_trades`
--
ALTER TABLE `bot_trades`
  ADD CONSTRAINT `bot_trades_ibfk_1` FOREIGN KEY (`bot_id`) REFERENCES `bots` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `cards`
--
ALTER TABLE `cards`
  ADD CONSTRAINT `cards_crypto_asset_id_foreign` FOREIGN KEY (`crypto_asset_id`) REFERENCES `crypto_assets` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cards_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `card_transactions`
--
ALTER TABLE `card_transactions`
  ADD CONSTRAINT `card_transactions_card_id_foreign` FOREIGN KEY (`card_id`) REFERENCES `cards` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `crypto_assets`
--
ALTER TABLE `crypto_assets`
  ADD CONSTRAINT `crypto_assets_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `notifications`
--
ALTER TABLE `notifications`
  ADD CONSTRAINT `notifications_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `subscription_profits`
--
ALTER TABLE `subscription_profits`
  ADD CONSTRAINT `subscription_profits_ibfk_1` FOREIGN KEY (`bot_subscription_id`) REFERENCES `bot_subscriptions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `subscription_profits_ibfk_2` FOREIGN KEY (`bot_trade_id`) REFERENCES `bot_trades` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `transactions`
--
ALTER TABLE `transactions`
  ADD CONSTRAINT `transactions_cryptoasset_id_foreign` FOREIGN KEY (`cryptoasset_id`) REFERENCES `crypto_assets` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `transactions_related_transaction_id_foreign` FOREIGN KEY (`related_transaction_id`) REFERENCES `transactions` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `users`
--
ALTER TABLE `users`
  ADD CONSTRAINT `users_referred_by_foreign` FOREIGN KEY (`referred_by`) REFERENCES `users` (`id`);
COMMIT;

