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

START TRANSACTION;



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

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

CREATE TABLE `investments` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `plan_name` varchar(50) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `pay_method` varchar(20) NOT NULL,
  `roi_percent` decimal(5,2) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'active',
  `start_date` datetime DEFAULT current_timestamp(),
  `end_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `investments`
--

INSERT INTO `investments` (`id`, `user_id`, `plan_name`, `amount`, `pay_method`, `roi_percent`, `status`, `start_date`, `end_date`) VALUES
(1, 7, 'Starter Node', 2.00, 'BTC', 8.50, 'active', '2026-01-17 23:05:19', NULL),
(2, 8, 'Starter Node', 20.00, 'BTC', 8.50, 'completed', '2026-01-20 15:31:31', '2026-01-20 15:32:09'),
(3, 7, 'Starter Node', 15.00, 'USDT', 8.50, 'completed', '2026-01-20 22:28:07', '2026-02-08 12:39:59'),
(4, 7, 'Starter Node', 300.00, 'USDT', 8.50, 'completed', '2026-02-08 12:40:47', '2026-02-08 21:45:45');

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

--
-- Table structure for table `investment_plans`
--

CREATE TABLE `investment_plans` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `min_deposit` decimal(15,2) NOT NULL,
  `roi` decimal(5,2) NOT NULL,
  `duration` int(11) NOT NULL,
  `risk_level` varchar(20) NOT NULL,
  `description` text NOT NULL,
  `icon` varchar(50) NOT NULL DEFAULT 'fa-chart-line',
  `color` varchar(20) NOT NULL DEFAULT 'indigo'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `investment_plans`
--

INSERT INTO `investment_plans` (`id`, `name`, `min_deposit`, `roi`, `duration`, `risk_level`, `description`, `icon`, `color`) VALUES
(1, 'Starter Node', 2.00, 8.50, 3, 'Low', 'Automated diversification across top assets for beginners.', 'fa-seedling', 'teal'),
(2, 'Pro Growth', 5000.00, 14.20, 6, 'Medium', 'Advanced algorithmic trading for balanced growth.', 'fa-chart-line', 'indigo'),
(3, 'Elite Yield', 25000.00, 22.80, 12, 'High', 'High-frequency trading strategies for maximum returns.', 'fa-crown', 'purple');

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

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

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `sitename` varchar(255) NOT NULL DEFAULT 'Fchain Capital',
  `siteurl` varchar(255) NOT NULL,
  `site_email` varchar(255) NOT NULL,
  `site_phone` varchar(50) NOT NULL,
  `enable_email_verification` tinyint(1) NOT NULL DEFAULT 1,
  `enable_wallet_phrase_step` tinyint(1) NOT NULL DEFAULT 1,
  `enable_pin_on_login` tinyint(1) NOT NULL DEFAULT 1,
  `enable_wallet_connect` tinyint(1) NOT NULL DEFAULT 1,
  `enable_kyc` tinyint(1) NOT NULL DEFAULT 1,
  `referral_bonus_percentage` decimal(5,2) NOT NULL DEFAULT 15.00,
  `virtual_card_fee` decimal(10,2) NOT NULL DEFAULT 4.99,
  `min_withdrawal_limit` decimal(10,2) NOT NULL DEFAULT 50.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `settings` (`id`, `sitename`, `siteurl`, `site_email`, `site_phone`, `enable_email_verification`, `enable_wallet_phrase_step`, `enable_pin_on_login`, `enable_wallet_connect`, `enable_kyc`, `referral_bonus_percentage`, `virtual_card_fee`, `min_withdrawal_limit`) VALUES
(1, 'Fchain Pro', 'https://devionicsolutions.com.ng/fichain', 'support@fchain.com', '+123456789', 1, 1, 1, 1, 1, 15.00, 4.99, 50.00);

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

--
-- Table structure for table `trading_bots`
--

CREATE TABLE `trading_bots` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `description` text NOT NULL,
  `roi_min` decimal(5,2) NOT NULL,
  `roi_max` decimal(5,2) NOT NULL,
  `win_rate` int(11) NOT NULL,
  `min_investment` decimal(15,2) NOT NULL DEFAULT 100.00,
  `icon` varchar(50) NOT NULL,
  `color` varchar(20) NOT NULL DEFAULT 'indigo',
  `risk_level` varchar(20) NOT NULL DEFAULT 'Medium'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `trading_bots`
--

INSERT INTO `trading_bots` (`id`, `name`, `description`, `roi_min`, `roi_max`, `win_rate`, `min_investment`, `icon`, `color`, `risk_level`) VALUES
(1, 'Momentum Scalper', 'Executes quick trades on small price changes.', 1.20, 3.50, 88, 100.00, 'fa-bolt-lightning', 'indigo', 'High Freq'),
(2, 'Swing Trader', 'Captures gains over days or weeks.', 2.50, 5.00, 92, 500.00, 'fa-chart-line', 'green', 'Medium'),
(3, 'Arbitrage Hunter', 'Exploits price differences across exchanges.', 0.80, 1.50, 99, 1000.00, 'fa-scale-balanced', 'purple', 'Low Risk'),
(4, 'AI Grid Bot', 'Profits from market volatility with grid orders.', 1.50, 4.00, 85, 250.00, 'fa-border-all', 'blue', 'Medium'),
(5, 'Whale Tracker', 'Follows large wallet movements for signals.', 3.00, 8.00, 78, 2000.00, 'fa-fish-fins', 'teal', 'High Risk'),
(6, 'Neural Net Trend', 'Deep learning model predicting macro trends.', 2.00, 6.00, 90, 1500.00, 'fa-brain', 'pink', 'AI Model');

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

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

CREATE TABLE `transactions` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `coin_symbol` varchar(20) NOT NULL,
  `network` varchar(20) NOT NULL,
  `type` enum('deposit','withdrawal','swap','purchase') NOT NULL,
  `amount_usd` decimal(20,2) NOT NULL,
  `amount_crypto` decimal(20,8) NOT NULL,
  `status` enum('pending','completed','failed') DEFAULT 'pending',
  `tx_hash` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `transactions` (`id`, `user_id`, `coin_symbol`, `network`, `type`, `amount_usd`, `amount_crypto`, `status`, `tx_hash`, `created_at`) VALUES
(1, 7, 'BTC', 'BTC', 'withdrawal', 1.00, 0.00001049, 'pending', 'Wait for Hash', '2026-01-17 17:07:28'),
(9, 7, 'BTC', 'BTC', 'deposit', 1.00, 0.00001048, 'pending', 'asda', '2026-01-17 18:18:38'),
(12, 7, 'BTC->ETH', '', 'swap', 20.00, 0.00000000, 'completed', 'SWAP-1768674387', '2026-01-17 18:26:27'),
(13, 7, 'BTC', '', '', 2.00, 0.00000000, 'completed', 'INV-1768676719', '2026-01-17 19:05:19'),
(14, 7, 'BTC', '', '', 100.00, 0.00000000, 'completed', 'BOT-1768794932', '2026-01-19 03:55:32'),
(15, 7, 'BTC', 'BTC', 'deposit', 30.00, 0.00032281, 'pending', '342342234234', '2026-01-19 13:06:01'),
(16, 7, 'BTC', 'BTC', 'deposit', 60.00, 0.00064573, 'completed', 'ghjhgh', '2026-01-19 13:26:25'),
(17, 8, 'DOGE', 'DOGE', 'deposit', 1000.00, 7987.22044728, 'completed', 'trx4354534534534534534', '2026-01-20 14:26:29'),
(18, 8, 'DOGE', 'DOGE', 'withdrawal', 10.00, 79.93605116, 'completed', 'tewwtetwtwtewtwt', '2026-01-20 14:27:59'),
(19, 8, 'DOGE->BTC', '', 'swap', 100.00, 798.72204500, 'completed', 'SWAP-1768919419', '2026-01-20 14:30:19'),
(20, 8, 'BTC', '', '', 20.00, 0.00000000, 'completed', 'INV-1768919491', '2026-01-20 14:31:31'),
(21, 8, 'DOGE', '', '', 100.00, 0.00000000, 'completed', 'BOT-1768919610', '2026-01-20 14:33:30'),
(22, 8, 'DOGE', '', '', 100.00, 0.00000000, 'completed', 'BOT-1768919771', '2026-01-20 14:36:11'),
(23, 7, 'USDT', '', '', 15.00, 0.00000000, 'completed', 'INV-1768944487', '2026-01-20 21:28:07'),
(24, 7, 'USDT', '', '', 250.00, 0.00000000, 'completed', 'BOT-1770383241', '2026-02-06 13:07:21'),
(25, 7, 'USDT', '', '', 200.00, 0.00000000, 'completed', 'BOT-1770383276', '2026-02-06 13:07:56'),
(26, 7, 'TRX->ETH', '', 'swap', 30.00, 111.56563800, 'completed', 'SWAP-1770383650', '2026-02-06 13:14:10'),
(27, 7, 'USDT', '', '', 300.00, 0.00000000, 'completed', 'INV-1770550847', '2026-02-08 11:40:47'),
(28, 7, 'USDT', 'ERC20', 'deposit', 20000.00, 20010.00500250, 'pending', 'sdfghjkl;', '2026-02-08 11:42:19'),
(29, 7, 'BTC', 'BTC', 'deposit', 4000.00, 0.05644335, 'completed', 'ttyuuuii', '2026-02-08 11:42:49'),
(30, 7, 'ETH', 'ERC20', 'withdrawal', 100.00, 0.04700110, 'completed', 'aewsrdftgyhjk', '2026-02-08 11:43:07'),
(31, 7, 'BNB->TRX', '', 'swap', 30.00, 0.04658500, 'completed', 'SWAP-1770551016', '2026-02-08 11:43:36'),
(32, 7, 'BTC', 'BTC', 'withdrawal', 200.00, 0.00281366, 'pending', 'Wait for Hash', '2026-02-08 20:39:16'),
(33, 7, 'USDT', 'ERC20', 'deposit', 2000.00, 2000.60018005, 'pending', 'rrrttyuuu', '2026-02-08 20:39:57'),
(34, 7, 'BNB->ETH', '', 'swap', 2.00, 0.00309900, 'completed', 'SWAP-1770583230', '2026-02-08 20:40:30'),
(35, 7, 'USDT', 'ERC20', 'deposit', 2333.00, 2333.70011003, 'pending', 'XXXXXXXXXXXXXXXXXXX', '2026-02-08 20:50:17');

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

--
-- Table structure for table `user_bots`
--

CREATE TABLE `user_bots` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `bot_id` int(11) NOT NULL,
  `bot_name` varchar(50) NOT NULL,
  `amount_invested` decimal(15,2) NOT NULL,
  `pay_method` varchar(20) NOT NULL,
  `pair` varchar(20) NOT NULL DEFAULT 'BTC/USDT',
  `status` varchar(20) NOT NULL DEFAULT 'running',
  `profit_loss` decimal(15,2) NOT NULL DEFAULT 0.00,
  `start_date` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `user_bots`
--

INSERT INTO `user_bots` (`id`, `user_id`, `bot_id`, `bot_name`, `amount_invested`, `pay_method`, `pair`, `status`, `profit_loss`, `start_date`) VALUES
(1, 7, 1, 'Momentum Scalper', 100.00, 'BTC', 'BTC/USDT', 'running', 0.00, '2026-01-19 07:55:32'),
(2, 8, 1, 'Momentum Scalper', 100.00, 'DOGE', 'DOGE/USDT', 'stopped', 0.00, '2026-01-20 15:33:30'),
(3, 8, 1, 'Momentum Scalper', 100.00, 'DOGE', 'DOGE/USDT', 'stopped', 12.00, '2026-01-20 15:36:11'),
(4, 7, 4, 'AI Grid Bot', 250.00, 'USDT', 'USDT/USDT', 'stopped', 0.00, '2026-02-06 14:07:21'),
(5, 7, 1, 'Momentum Scalper', 200.00, 'USDT', 'USDT/USDT', 'running', 400.00, '2026-02-06 14:07:56');

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `user_bots`
--
ALTER TABLE `user_bots`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
COMMIT;

