| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036 |
- -- MySQL dump 10.13 Distrib 9.5.0, for macos15.4 (arm64)
- --
- -- Host: rm-3nsx177900f04a7gvwo.mysql.rds.aliyuncs.com Database: copytrade
- -- ------------------------------------------------------
- -- Server version 5.7.44-log
- /*!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 */;
- /*!50503 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 */;
- SET @MYSQLDUMP_TEMP_LOG_BIN = @@SESSION.SQL_LOG_BIN;
- SET @@SESSION.SQL_LOG_BIN= 0;
- --
- -- GTID state at the beginning of the backup
- --
- SET @@GLOBAL.GTID_PURGED=/*!80000 '+'*/ 'aa235d8a-12eb-11f1-ac23-00163e0a62c3:1-38906';
- --
- -- Table structure for table `card_info_application`
- --
- DROP TABLE IF EXISTS `card_info_application`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `card_info_application` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `name` varchar(128) NOT NULL COMMENT '姓名',
- `addr` varchar(128) NOT NULL COMMENT '邮寄地址',
- `phone` varchar(128) NOT NULL COMMENT '联系电话',
- `number_cards` int(10) NOT NULL COMMENT '申请卡数量',
- `info` varchar(256) DEFAULT NULL COMMENT '交易信息',
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='卡片申请信息';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `charge_money`
- --
- DROP TABLE IF EXISTS `charge_money`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `charge_money` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `member_id` bigint(20) DEFAULT NULL COMMENT '会员id',
- `inviterId` bigint(20) DEFAULT NULL COMMENT '邀请者会员id',
- `total_amount` decimal(20,10) DEFAULT NULL COMMENT '总共充币值',
- `remind_date` date DEFAULT NULL,
- `is_add_time` tinyint(1) DEFAULT '0' COMMENT '是否已经给邀请者增加抽奖次数;1-已经,0-没有,初始值为0',
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`),
- UNIQUE KEY `memberId` (`member_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='充钱表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `close_position`
- --
- DROP TABLE IF EXISTS `close_position`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `close_position` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `position_id` bigint(20) NOT NULL COMMENT '仓位ID',
- `entrust_price` decimal(20,10) DEFAULT NULL COMMENT '委托价格',
- `quantity` decimal(20,10) NOT NULL COMMENT '平仓张数',
- `entrust_time` bigint(20) NOT NULL COMMENT '委托时间',
- `status` tinyint(2) NOT NULL COMMENT '状态(0委托中 1已撤单 2委托失败 3已成交)',
- `close_type` tinyint(2) NOT NULL COMMENT '平仓类型(0平仓 1市价全平 2一键平仓 3反向开仓 4止盈止损 5爆仓 6管理员平仓)',
- `type` tinyint(2) NOT NULL COMMENT '委托类型(1限价 0市价)',
- `close_position_no` varchar(100) DEFAULT NULL COMMENT '平仓委托单号',
- `contract_order_entrust_id` varchar(100) DEFAULT NULL COMMENT '合约委托单号',
- `copy_contract_order_entrust_id` varchar(100) DEFAULT NULL COMMENT '跟随平仓委托单号',
- `transaction_fee` decimal(20,10) DEFAULT NULL COMMENT '交易手续费',
- `transaction_price` decimal(20,10) DEFAULT NULL COMMENT '成交价格',
- `transaction_amount` decimal(20,10) DEFAULT NULL COMMENT '成交金额',
- `transaction_time` bigint(20) DEFAULT NULL COMMENT '成交时间',
- `error` varchar(100) DEFAULT NULL COMMENT '平仓委托失败原因',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `position_id` (`position_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=400632 DEFAULT CHARSET=utf8 COMMENT='平仓记录';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `copied_trade`
- --
- DROP TABLE IF EXISTS `copied_trade`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `copied_trade` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `customer_id` bigint(20) NOT NULL COMMENT '用户ID',
- `trader_id` bigint(20) NOT NULL COMMENT '交易员ID',
- `entrust_no` varchar(100) DEFAULT NULL COMMENT '委托单号',
- `contract_order_entrust_id` varchar(100) DEFAULT NULL COMMENT '合约委托单号',
- `symbol` varchar(50) DEFAULT NULL COMMENT '交易对',
- `contract_symbol_id` bigint(20) DEFAULT NULL COMMENT '交易对ID',
- `order_type` tinyint(2) DEFAULT NULL COMMENT '订单类型(10交易员订单 20用户跟单)',
- `direction` tinyint(2) DEFAULT NULL COMMENT '委托方向(0多 1空)',
- `entrust_price` decimal(20,10) DEFAULT NULL COMMENT '委托价格',
- `trigger_price` decimal(20,10) DEFAULT NULL COMMENT '计划委托触发价格',
- `leverage` smallint(3) DEFAULT NULL COMMENT '杠杆倍数',
- `type` tinyint(2) DEFAULT NULL COMMENT '委托类型(0市价 1市价 2计划委托)',
- `volume` decimal(20,10) DEFAULT NULL COMMENT '委托数量(张)',
- `stop_loss_price` decimal(20,10) DEFAULT NULL COMMENT '止损价格',
- `stop_profit_price` decimal(20,10) DEFAULT NULL COMMENT '止赢价格',
- `copy_contract_order_entrust_id` varchar(100) DEFAULT NULL COMMENT '交易员订单单号',
- `principal_amount` decimal(20,10) DEFAULT NULL COMMENT '保证金',
- `status` tinyint(2) DEFAULT NULL COMMENT '订单状态(0委托中 1已撤单 2委托失败 3已成交)',
- `entrust_time` bigint(20) DEFAULT NULL COMMENT '委托时间',
- `error` varchar(255) DEFAULT NULL COMMENT '委托失败原因',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- `open_price` decimal(20,10) DEFAULT NULL COMMENT '开仓价格',
- `position_id` bigint(20) DEFAULT NULL COMMENT '仓位ID',
- PRIMARY KEY (`id`),
- UNIQUE KEY `entrust` (`contract_order_entrust_id`),
- UNIQUE KEY `copy_unique` (`customer_id`,`copy_contract_order_entrust_id`),
- KEY `position_id` (`position_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1157136 DEFAULT CHARSET=utf8 COMMENT='跟单记录表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `customer`
- --
- DROP TABLE IF EXISTS `customer`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `customer` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
- `nickname` varchar(50) DEFAULT NULL COMMENT '用户昵称',
- `avatar` varchar(1000) DEFAULT NULL COMMENT '头像',
- `description` varchar(100) DEFAULT NULL COMMENT '描述',
- `trader` tinyint(2) NOT NULL DEFAULT '10' COMMENT '是否是ID交易员(10不是 20交易员申请审核中 30交易员 40交易员申请不通过)',
- `max_loss` decimal(20,10) DEFAULT NULL COMMENT '最大亏损USDT',
- `max_profit` decimal(20,10) DEFAULT NULL COMMENT '最大盈利USDT',
- `member_id` bigint(20) NOT NULL COMMENT 'doge会员ID',
- `automatic_unfollow` tinyint(1) NOT NULL DEFAULT '1' COMMENT '自动取消跟随开关(1关闭 2开启)',
- `trader_level_id` bigint(20) DEFAULT NULL COMMENT '交易员等级ID',
- `balance` decimal(20,10) DEFAULT NULL COMMENT '合约资产',
- `trader_time` datetime DEFAULT NULL COMMENT '成为交易员时间',
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- `min_follow_amount` bigint(20) DEFAULT NULL COMMENT '特级老师的最低跟随金额',
- `edit_data_switch` tinyint(1) DEFAULT NULL COMMENT '修改老师统计数据开关',
- `default_follow_customer` bigint(20) DEFAULT '0' COMMENT '当前跟单默认人数',
- `default_register_days` bigint(20) DEFAULT '0' COMMENT '入住的默认天数',
- `max_principal_amount` bigint(20) DEFAULT NULL COMMENT '按照固定保证金跟随时的保证金上限,null就是没有限制',
- `dividend_percent` int(6) DEFAULT NULL COMMENT '分润比例',
- PRIMARY KEY (`id`),
- UNIQUE KEY `memberId` (`member_id`),
- KEY `trader` (`trader`)
- ) ENGINE=InnoDB AUTO_INCREMENT=11268 DEFAULT CHARSET=utf8 COMMENT='用户表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `customer_follow_symbol`
- --
- DROP TABLE IF EXISTS `customer_follow_symbol`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `customer_follow_symbol` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `customer_id` bigint(20) NOT NULL COMMENT '用户id',
- `trader_id` bigint(20) DEFAULT NULL,
- `contract_symbol_id` bigint(20) NOT NULL COMMENT '交易员带单交易对ID',
- `symbol` varchar(50) NOT NULL COMMENT '交易对',
- `risk_control_id` bigint(20) NOT NULL COMMENT '风控id',
- `status` tinyint(2) NOT NULL COMMENT '跟单状态(10关闭 20开启)',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `follow_symbol_unique` (`customer_id`,`trader_id`,`contract_symbol_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=28806 DEFAULT CHARSET=utf8 COMMENT='用户跟随交易对';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `exception_log`
- --
- DROP TABLE IF EXISTS `exception_log`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `exception_log` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `message_name` varchar(128) DEFAULT NULL COMMENT '标题',
- `stack_label` varchar(128) DEFAULT NULL COMMENT '堆栈标签',
- `exception` text COMMENT '内容',
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='异常记录';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `exchange_asset_flow`
- --
- DROP TABLE IF EXISTS `exchange_asset_flow`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `exchange_asset_flow` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '流水序号,自增主键',
- `transaction_id` bigint(20) DEFAULT NULL COMMENT '交易ID',
- `from_exchange_wallet_id` bigint(20) DEFAULT NULL COMMENT '资金来源钱包id',
- `to_exchange_wallet_id` bigint(20) DEFAULT NULL COMMENT '资金去向钱包id',
- `coin_symbol` varchar(255) NOT NULL COMMENT '币种名称或代码',
- `business_type` int(11) NOT NULL COMMENT '业务类型,具体可取值见上文',
- `amount` decimal(26,8) DEFAULT '0.00000000' COMMENT '变动金额,可为正(入金)或负(出金)',
- `frozen_amount` decimal(18,8) DEFAULT '0.00000000' COMMENT '冻结变动量,可为正(冻结)或负(解冻)',
- `available_balance` decimal(26,8) DEFAULT '0.00000000' COMMENT '流水后用户钱包的可用余额',
- `fee` decimal(18,8) DEFAULT '0.00000000' COMMENT '手续费,部分业务类型可能产生的手续费',
- `remark` varchar(255) DEFAULT NULL COMMENT '流水备注,部分业务类型的备注信息',
- `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '流水创建时间',
- PRIMARY KEY (`id`),
- KEY `transaction_id` (`transaction_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1125 DEFAULT CHARSET=utf8 COMMENT='资产流水表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `exchange_coin`
- --
- DROP TABLE IF EXISTS `exchange_coin`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `exchange_coin` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `symbol` varchar(255) NOT NULL,
- `base_coin_scale` int(11) NOT NULL,
- `base_symbol` varchar(255) DEFAULT NULL,
- `coin_scale` int(11) NOT NULL,
- `coin_symbol` varchar(255) DEFAULT NULL,
- `enable` int(11) NOT NULL,
- `fee` decimal(8,4) DEFAULT NULL COMMENT '交易手续费',
- `sell_fee` decimal(8,4) NOT NULL,
- `sort` int(11) NOT NULL,
- `enable_market_buy` int(11) DEFAULT '1' COMMENT '是否启用市价买',
- `enable_market_sell` int(11) DEFAULT '1' COMMENT '是否启用市价卖',
- `min_sell_price` decimal(18,8) DEFAULT NULL COMMENT '最低挂单卖价',
- `flag` int(11) DEFAULT '0' COMMENT '默认为0,1表示推荐',
- `max_trading_order` int(11) DEFAULT '0' COMMENT '最大允许同时交易的订单数,0表示不限制',
- `max_trading_time` int(11) DEFAULT '0' COMMENT '委托超时自动下架时间,单位为秒,0表示不过期',
- `instrument` varchar(20) DEFAULT NULL COMMENT '交易类型,B2C2特有',
- `min_turnover` decimal(18,8) DEFAULT NULL COMMENT '最小挂单成交额',
- `max_volume` decimal(18,8) DEFAULT NULL COMMENT '最大下单量',
- `min_volume` decimal(18,8) DEFAULT NULL COMMENT '最小下单量',
- `zone` int(11) DEFAULT '0',
- `clear_time` varchar(30) DEFAULT '1' COMMENT '清盘时间',
- `end_time` varchar(30) DEFAULT '1' COMMENT '结束时间',
- `publish_price` decimal(18,8) DEFAULT NULL COMMENT ' 分摊发行价格',
- `publish_type` int(11) DEFAULT '1' COMMENT '发行活动类型 1:无活动,2:抢购发行,3:分摊发行',
- `start_time` varchar(30) DEFAULT '1' COMMENT '开始时间',
- `exchangeable` int(11) DEFAULT '1' COMMENT ' 是否可交易',
- `publish_amount` decimal(18,8) DEFAULT NULL COMMENT ' 活动发行数量',
- `visible` int(11) DEFAULT '1' COMMENT ' 前台可见状态',
- `max_buy_price` decimal(18,8) DEFAULT NULL COMMENT '最高买单价',
- `robot_type` int(11) DEFAULT '0' COMMENT '机器人类型',
- `enable_buy` int(11) DEFAULT '1' COMMENT '是否允许买',
- `enable_sell` int(11) DEFAULT '1' COMMENT '是否允许卖',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='币币交易对';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `exchange_deal`
- --
- DROP TABLE IF EXISTS `exchange_deal`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `exchange_deal` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `amount` decimal(32,8) NOT NULL COMMENT '金额',
- `price` decimal(32,8) NOT NULL COMMENT '价格',
- `type` int(1) DEFAULT NULL COMMENT '1.买入 2.卖出',
- `volume` decimal(32,8) NOT NULL COMMENT '数量',
- `sell_fee` decimal(16,8) DEFAULT NULL COMMENT '手续费',
- `buy_fee` decimal(16,8) NOT NULL COMMENT '手续费',
- `buy_commission_rate` decimal(16,8) NOT NULL COMMENT '买入手续费比率',
- `sell_commission_rate` decimal(16,8) DEFAULT NULL COMMENT '卖出手续费比列',
- `symbol_name` varchar(20) NOT NULL COMMENT '交易对名称',
- `buy_order_id` bigint(20) NOT NULL COMMENT '买单id',
- `sell_order_id` bigint(20) NOT NULL COMMENT '卖单id',
- `buy_account_id` bigint(20) NOT NULL COMMENT '买家id',
- `sell_account_id` bigint(20) NOT NULL COMMENT '卖家id',
- `deal_time` bigint(20) NOT NULL COMMENT '成交时间',
- `is_wallet_update` int(11) NOT NULL DEFAULT '0' COMMENT '0.未更新钱包 1.已更新钱包',
- `create_time` bigint(20) NOT NULL,
- `coin` varchar(10) NOT NULL COMMENT '交易币种',
- `base_coin` varchar(10) NOT NULL COMMENT '基础币种',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=6652 DEFAULT CHARSET=utf8mb4 COMMENT='成交表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `exchange_freeze_history`
- --
- DROP TABLE IF EXISTS `exchange_freeze_history`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `exchange_freeze_history` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `member_id` bigint(20) NOT NULL,
- `coin_id` varchar(100) NOT NULL,
- `amount` decimal(18,8) NOT NULL,
- `created_time` datetime NOT NULL,
- `updated_time` datetime NOT NULL,
- `unfreeze_time` datetime NOT NULL,
- `status` int(2) NOT NULL,
- `type` int(2) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `member_id` (`member_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `exchange_order`
- --
- DROP TABLE IF EXISTS `exchange_order`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `exchange_order` (
- `order_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
- `amount` decimal(18,8) DEFAULT NULL,
- `base_symbol` varchar(255) DEFAULT NULL,
- `canceled_time` bigint(20) DEFAULT NULL,
- `coin_symbol` varchar(255) DEFAULT NULL,
- `completed_time` bigint(20) DEFAULT NULL,
- `direction` int(11) DEFAULT NULL,
- `member_id` bigint(20) DEFAULT NULL,
- `price` decimal(18,8) DEFAULT NULL,
- `trigger_price` decimal(18,8) DEFAULT NULL,
- `fee` decimal(18,8) NOT NULL,
- `status` int(11) DEFAULT NULL,
- `symbol` varchar(255) DEFAULT NULL,
- `time` bigint(20) DEFAULT NULL,
- `traded_amount` decimal(26,16) DEFAULT NULL,
- `turnover` decimal(26,16) DEFAULT NULL,
- `type` int(11) DEFAULT NULL,
- `use_discount` varchar(255) DEFAULT NULL,
- `order_resource` int(11) DEFAULT NULL,
- `fee_rate` decimal(26,16) DEFAULT NULL COMMENT '手续费率',
- `trade_status` int(11) NOT NULL DEFAULT '0' COMMENT '撮合状态, 0 待开始 1撮合中 2 撮合停止 3 撮合完成',
- PRIMARY KEY (`order_id`) USING BTREE,
- KEY `symbol` (`symbol`,`member_id`,`status`) USING BTREE,
- KEY `member_id` (`member_id`),
- KEY `index_time` (`time`),
- KEY `index_type` (`type`)
- ) ENGINE=InnoDB AUTO_INCREMENT=12238 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='币币挂单';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `exchange_release_history`
- --
- DROP TABLE IF EXISTS `exchange_release_history`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `exchange_release_history` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `member_id` bigint(20) NOT NULL,
- `coin_id` varchar(255) NOT NULL,
- `amount` decimal(18,8) NOT NULL,
- `release_time` datetime NOT NULL,
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `member_id` (`member_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `exchange_statistics_data`
- --
- DROP TABLE IF EXISTS `exchange_statistics_data`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `exchange_statistics_data` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `stat_time` datetime NOT NULL COMMENT '统计时间',
- `member_id` bigint(20) NOT NULL COMMENT '用户ID',
- `stat_type` int(8) NOT NULL COMMENT '统计类别1:零点统计,2:16点统计',
- `coin_symbol` varchar(255) DEFAULT NULL COMMENT '资产币种',
- `position_asset_price_usdt` decimal(26,8) DEFAULT NULL COMMENT '持仓资产价格(USDT计价)',
- `daily_profit_loss_usdt` decimal(26,8) DEFAULT NULL COMMENT '当天盈亏(USDT)',
- `frozen_asset_price_usdt` decimal(26,8) DEFAULT NULL COMMENT '持仓资产价格(USDT计价)',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`,`stat_type`,`member_id`,`stat_time`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='现货统计数据表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `exchange_wallet`
- --
- DROP TABLE IF EXISTS `exchange_wallet`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `exchange_wallet` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `address` varchar(255) DEFAULT NULL,
- `balance` decimal(26,8) DEFAULT NULL COMMENT '可用余额',
- `frozen_balance` decimal(26,8) DEFAULT NULL COMMENT '冻结余额',
- `pledged_balance` decimal(18,8) DEFAULT NULL,
- `is_lock` int(11) DEFAULT '0' COMMENT '钱包不是锁定',
- `member_id` bigint(20) DEFAULT NULL,
- `to_released` decimal(18,8) DEFAULT NULL COMMENT '待释放总量',
- `daily_released` decimal(18,8) DEFAULT NULL,
- `version` int(11) NOT NULL,
- `coin_id` varchar(255) DEFAULT NULL,
- `release_date` date DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE KEY `UKm68bscpof0bpnxocxl4qdnvbe` (`member_id`,`coin_id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=103226 DEFAULT CHARSET=utf8 COMMENT='会员钱包';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `favorite`
- --
- DROP TABLE IF EXISTS `favorite`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `favorite` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `customer_id` bigint(20) DEFAULT NULL COMMENT '用户id',
- `trader_id` bigint(20) DEFAULT NULL COMMENT '交易员ID',
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`),
- UNIQUE KEY `favorite_unique` (`customer_id`,`trader_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=8467 DEFAULT CHARSET=utf8 COMMENT='关注表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `follow`
- --
- DROP TABLE IF EXISTS `follow`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `follow` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `customer_id` bigint(20) NOT NULL COMMENT '用户ID',
- `trader_id` bigint(20) NOT NULL COMMENT '交易员ID',
- `status` tinyint(2) NOT NULL DEFAULT '10' COMMENT '是否跟随(10跟随中 20用户消跟随 30被交易员移出)',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- `expire_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `follow_unique` (`customer_id`,`trader_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=12833 DEFAULT CHARSET=utf8 COMMENT='跟随表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `follow_config`
- --
- DROP TABLE IF EXISTS `follow_config`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `follow_config` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
- `config_name_en` varchar(100) DEFAULT NULL COMMENT '配置英文名',
- `config_name_cn` varchar(100) DEFAULT NULL COMMENT '配置中文名',
- `config_content` varchar(100) DEFAULT NULL COMMENT '配置内容',
- `created_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
- `updated_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
- `is_admin_edit` tinyint(1) DEFAULT '1' COMMENT '是否允许后台管理员修改;0-不可以,1-可以',
- PRIMARY KEY (`id`),
- UNIQUE KEY `config_name_cn` (`config_name_cn`),
- UNIQUE KEY `config_name_en` (`config_name_en`)
- ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COMMENT='跟单配置表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `kafka_message`
- --
- DROP TABLE IF EXISTS `kafka_message`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `kafka_message` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `topic` varchar(100) NOT NULL COMMENT '队列',
- `message` varchar(4000) NOT NULL COMMENT '消息内容',
- `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态(1未发送 2已发送)',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1211647 DEFAULT CHARSET=utf8 COMMENT='kafka消息发送';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `member_prize_time`
- --
- DROP TABLE IF EXISTS `member_prize_time`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `member_prize_time` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `member_id` bigint(20) DEFAULT NULL COMMENT '会员id',
- `time` int(11) DEFAULT '0' COMMENT '次数',
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`),
- UNIQUE KEY `memberId` (`member_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='会员抽奖次数表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `message`
- --
- DROP TABLE IF EXISTS `message`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `message` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `customer_id` bigint(20) NOT NULL,
- `title` varchar(200) DEFAULT NULL,
- `content` varchar(2000) DEFAULT NULL,
- `symbol` varchar(200) DEFAULT NULL,
- `message_type` varchar(100) DEFAULT NULL,
- `volume` decimal(18,8) DEFAULT NULL,
- `trigger_price` decimal(19,8) DEFAULT NULL,
- `deal_price` decimal(19,8) DEFAULT NULL,
- `create_time` datetime NOT NULL,
- `is_read` tinyint(1) NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1092086 DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `message_allsend`
- --
- DROP TABLE IF EXISTS `message_allsend`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `message_allsend` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '消息群发ID',
- `message_type_id` bigint(20) NOT NULL COMMENT '消息类型ID',
- `message_title` varchar(50) DEFAULT NULL COMMENT '消息标题',
- `content` varchar(2000) DEFAULT NULL COMMENT '消息内容',
- `message_creater_id` bigint(20) DEFAULT NULL COMMENT '创建者id',
- `created_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
- `updated_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
- `send_time` timestamp NULL DEFAULT NULL,
- `is_send` tinyint(1) DEFAULT '0',
- `is_specific_user` tinyint(1) DEFAULT '0',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='消息群发表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `message_config`
- --
- DROP TABLE IF EXISTS `message_config`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `message_config` (
- `id` bigint(20) NOT NULL,
- `no_disturb` tinyint(1) NOT NULL,
- `open_success` tinyint(1) NOT NULL,
- `open_failure` tinyint(1) NOT NULL,
- `close_success` tinyint(1) NOT NULL,
- `force_close` tinyint(1) NOT NULL,
- `position_profit` tinyint(1) NOT NULL,
- `position_loss` tinyint(1) NOT NULL,
- `account_profit` tinyint(1) NOT NULL,
- `account_loss` tinyint(1) NOT NULL,
- `empty_remind` tinyint(1) NOT NULL,
- `unfollow_remind` tinyint(1) NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `message_detail`
- --
- DROP TABLE IF EXISTS `message_detail`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `message_detail` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '消息详情ID',
- `message_allsend_id` bigint(20) DEFAULT NULL COMMENT '0-私聊消息,其他为消息群发表的id',
- `sender_id` bigint(20) DEFAULT NULL COMMENT '发送者id',
- `receiver_id` bigint(20) DEFAULT NULL COMMENT '接收者id',
- `content` varchar(2000) DEFAULT NULL COMMENT '消息内容,私聊消息以外的需要取消息类型表的content',
- `is_send` tinyint(1) DEFAULT '0' COMMENT '是否发送',
- `is_read` tinyint(1) DEFAULT '0' COMMENT '是否已读',
- `destination` varchar(50) DEFAULT NULL COMMENT '监听路径',
- `created_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
- `updated_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
- `is_del` tinyint(1) DEFAULT '0',
- `send_time` timestamp NULL DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='消息详情表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `message_type`
- --
- DROP TABLE IF EXISTS `message_type`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `message_type` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
- `message_type_cn` varchar(100) NOT NULL COMMENT '消息类型中文名',
- `message_type_en` varchar(100) DEFAULT NULL COMMENT '消息类型英文名',
- `created_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
- `updated_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='消息类型表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `mine_conf`
- --
- DROP TABLE IF EXISTS `mine_conf`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `mine_conf` (
- `id` bigint(20) NOT NULL,
- `pledge_quantity` decimal(26,8) NOT NULL COMMENT '最小质押数量',
- `production_ratio` decimal(10,2) NOT NULL COMMENT '产币比例,单位%',
- `bonus_one` decimal(26,8) NOT NULL COMMENT '银牌分红',
- `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `updated_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `bonus_two` decimal(26,8) NOT NULL COMMENT '金牌分红',
- `bonus_three` decimal(26,8) NOT NULL COMMENT '合伙人分红',
- `total_quantity` decimal(26,8) NOT NULL COMMENT '矿池总量',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='挖矿配置';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `mine_customer_info`
- --
- DROP TABLE IF EXISTS `mine_customer_info`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `mine_customer_info` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `pledge_number` decimal(26,8) NOT NULL COMMENT '质押数量',
- `release_number` decimal(26,8) NOT NULL COMMENT '待解押数量',
- `total_revenue` decimal(26,8) NOT NULL COMMENT '总收益',
- `available_revenue` decimal(26,8) NOT NULL COMMENT '可提取收益',
- `invite_number` int(11) NOT NULL COMMENT '邀请数量',
- `generations` int(11) NOT NULL COMMENT '代',
- `level` int(11) NOT NULL COMMENT '1.银牌商务,2.金牌商务,3.合伙人',
- `member_id` bigint(20) NOT NULL COMMENT '用户id',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户质押信息';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `mine_income_records`
- --
- DROP TABLE IF EXISTS `mine_income_records`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `mine_income_records` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `member_id` bigint(20) NOT NULL COMMENT '用户id',
- `type` int(11) NOT NULL COMMENT '类型:1.收益 2.提出',
- `created_time` datetime NOT NULL,
- `updated_time` datetime NOT NULL,
- `quantity` decimal(26,8) NOT NULL COMMENT '数量',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='收益记录';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `mine_pledge_records`
- --
- DROP TABLE IF EXISTS `mine_pledge_records`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `mine_pledge_records` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `member_id` bigint(20) NOT NULL COMMENT '用户id',
- `type` int(11) NOT NULL COMMENT '类型:1.质押 2.解押',
- `status` int(11) NOT NULL COMMENT '状态:0 待解押 1解押成功',
- `created_time` datetime NOT NULL,
- `updated_time` datetime NOT NULL,
- `quantity` decimal(26,8) NOT NULL COMMENT '数量',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='质押记录';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `position`
- --
- DROP TABLE IF EXISTS `position`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `position` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `customer_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
- `position_id` bigint(20) NOT NULL COMMENT '仓位ID',
- `trader_id` bigint(20) DEFAULT NULL COMMENT '交易员ID',
- `symbol` varchar(50) DEFAULT NULL COMMENT '交易对',
- `direction` tinyint(2) DEFAULT NULL COMMENT '方向(0多 1空)',
- `leverage` smallint(3) DEFAULT NULL COMMENT '杠杆倍数',
- `open_price` decimal(20,10) DEFAULT NULL COMMENT '开仓价格',
- `total_position` decimal(20,10) DEFAULT NULL COMMENT '总持仓张数',
- `total_principal_amount` decimal(20,10) DEFAULT NULL COMMENT '总本金',
- `available_position` decimal(20,10) DEFAULT NULL COMMENT '当前可平张数',
- `current_position` decimal(20,10) DEFAULT NULL COMMENT '当前持仓张数',
- `principal_amount` decimal(20,10) DEFAULT NULL COMMENT '保证金',
- `contract_order_entrust_id` varchar(100) DEFAULT NULL COMMENT '合约委托单号',
- `status` tinyint(2) DEFAULT NULL COMMENT '持仓状态(10未平仓 20部分平仓 30全部平仓)',
- `transaction_fee` decimal(20,10) DEFAULT NULL COMMENT '交易手续费',
- `open_time` bigint(20) DEFAULT NULL COMMENT '开仓时间',
- `close_time` bigint(20) DEFAULT NULL COMMENT '平仓时间',
- `close_price` decimal(20,10) DEFAULT NULL COMMENT '平仓均价',
- `profit_and_loss` decimal(20,10) DEFAULT NULL COMMENT '盈亏金额',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- `dividend_fee` decimal(20,10) DEFAULT NULL COMMENT '分润金额',
- `trader_position_id` bigint(20) DEFAULT NULL COMMENT '老师的仓位ID',
- `is_send_close_message` tinyint(1) DEFAULT '0' COMMENT '是否已经发送强平消息;0-未发送,1-已发送',
- PRIMARY KEY (`id`),
- KEY `status` (`status`),
- KEY `customer_id` (`customer_id`),
- KEY `position_id` (`position_id`),
- KEY `trader_position_id` (`trader_position_id`),
- KEY `close_time` (`close_time`)
- ) ENGINE=InnoDB AUTO_INCREMENT=358129 DEFAULT CHARSET=utf8 COMMENT='跟单持仓表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `prize`
- --
- DROP TABLE IF EXISTS `prize`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `prize` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '奖品ID',
- `picture` varchar(1000) DEFAULT NULL COMMENT '图片地址',
- `name` varchar(100) DEFAULT NULL COMMENT '名称',
- `probability` double(5,2) DEFAULT '1.00' COMMENT '中奖概率',
- `fiction_probability` double(5,2) DEFAULT '1.00' COMMENT '虚构中奖概率',
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='奖品表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `prize_log`
- --
- DROP TABLE IF EXISTS `prize_log`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `prize_log` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
- `member_id` bigint(20) DEFAULT NULL COMMENT '会员id',
- `username` varchar(100) DEFAULT NULL COMMENT '用户名',
- `prize_id` bigint(20) DEFAULT NULL COMMENT '奖品id',
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='中奖记录表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `risk_control`
- --
- DROP TABLE IF EXISTS `risk_control`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `risk_control` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `customer_id` bigint(20) NOT NULL COMMENT '用户ID',
- `follow_id` bigint(20) NOT NULL COMMENT '跟随ID',
- `leverage` smallint(3) DEFAULT NULL COMMENT '杠杆倍数(0代表跟随交易员)',
- `trading_amount` decimal(20,10) DEFAULT NULL COMMENT '跟单金额',
- `trading_mode` tinyint(2) DEFAULT NULL COMMENT '跟单方式(10固定比例 20固定资金)',
- `stop_loss_percentage` decimal(20,10) DEFAULT NULL COMMENT '止损比例',
- `stop_profit_percentage` decimal(20,10) DEFAULT NULL COMMENT '止赢比例',
- `max_copied_amount` decimal(20,10) DEFAULT NULL COMMENT '最大跟随金额',
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=14674 DEFAULT CHARSET=utf8 COMMENT='跟单风险控制表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `robot_match_conf`
- --
- DROP TABLE IF EXISTS `robot_match_conf`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `robot_match_conf` (
- `id` bigint(20) NOT NULL,
- `min_amount` decimal(26,8) NOT NULL COMMENT '最小数量',
- `max_amount` decimal(26,8) NOT NULL COMMENT '最大数量',
- `proportion` decimal(20,8) NOT NULL COMMENT '大盘比例:0.0001btc',
- `fixed_offset` decimal(26,16) NOT NULL COMMENT '价格固定偏移量',
- `random_offset` decimal(26,8) NOT NULL COMMENT '价格随机偏移量',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置名称';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `robot_match_plan`
- --
- DROP TABLE IF EXISTS `robot_match_plan`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `robot_match_plan` (
- `id` bigint(20) NOT NULL,
- `start_time` datetime NOT NULL COMMENT '开盘时间',
- `amplitude` decimal(26,8) NOT NULL COMMENT '幅度:单位%',
- `type` int(11) NOT NULL COMMENT '1涨 2.跌',
- `end_time` datetime NOT NULL COMMENT '结束时间',
- PRIMARY KEY (`id`),
- UNIQUE KEY `robot_match_plan_pk` (`start_time`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机器人成交计划';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `statistics_data`
- --
- DROP TABLE IF EXISTS `statistics_data`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `statistics_data` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `date_time` datetime NOT NULL COMMENT '时间',
- `customer_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
- `balance` decimal(20,10) DEFAULT NULL COMMENT '资产',
- `earnings` decimal(20,10) DEFAULT NULL COMMENT '订单收益(USDT)',
- `principal_amount` decimal(20,10) DEFAULT NULL COMMENT '总保证金',
- `open_position` bigint(20) DEFAULT NULL COMMENT '开仓笔数',
- `profit_order_count` bigint(20) DEFAULT NULL COMMENT '盈利订单笔数',
- `day_yield_14` decimal(18,8) DEFAULT NULL COMMENT '14日收益率',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=14453 DEFAULT CHARSET=utf8 COMMENT='统计数据表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `symbol_price`
- --
- DROP TABLE IF EXISTS `symbol_price`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `symbol_price` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `symbol` varchar(50) NOT NULL COMMENT '交易对',
- `price` decimal(20,10) NOT NULL COMMENT '价格',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `symbol_UNIQUE` (`symbol`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='交易对实时价格';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `tag`
- --
- DROP TABLE IF EXISTS `tag`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `tag` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `name` varchar(50) NOT NULL COMMENT '中文名称',
- `en_name` varchar(50) NOT NULL COMMENT '英文名称',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `name` (`name`)
- ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='标签表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `trader_data`
- --
- DROP TABLE IF EXISTS `trader_data`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `trader_data` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `trader_id` bigint(20) DEFAULT NULL,
- `day_yield_14` decimal(18,8) DEFAULT NULL COMMENT '14日收益率',
- `day_yield_30` decimal(18,8) DEFAULT NULL COMMENT '30日收益率',
- `win_rate_14` decimal(18,8) DEFAULT NULL COMMENT '14日胜率',
- `follow_amount` decimal(20,10) DEFAULT NULL COMMENT '累积跟随资金',
- `profit_amount` decimal(20,10) DEFAULT NULL COMMENT '累积盈利额',
- `follow_customer` bigint(20) DEFAULT NULL COMMENT '累积跟随人数',
- `order_deal_14` bigint(20) DEFAULT NULL COMMENT '14日成交单量',
- `retraction_rate_14` decimal(18,8) DEFAULT NULL COMMENT '14日最大回撤率',
- `trading_days` bigint(20) DEFAULT NULL COMMENT '累积交易天数',
- `profit_days` bigint(20) DEFAULT NULL COMMENT '累积盈利天数',
- `current_month_follow` bigint(20) DEFAULT NULL COMMENT '本月跟随人数',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- `team_profit14` decimal(20,10) DEFAULT NULL COMMENT '14日团队盈利',
- PRIMARY KEY (`id`),
- UNIQUE KEY `trader` (`trader_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=275 DEFAULT CHARSET=utf8 COMMENT='交易员统计数据';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `trader_level`
- --
- DROP TABLE IF EXISTS `trader_level`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `trader_level` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `name` varchar(200) NOT NULL COMMENT '等级名称',
- `en_name` varchar(200) NOT NULL COMMENT '英文名称',
- `asset` decimal(20,10) DEFAULT NULL COMMENT '资产要求',
- `max_follow` int(11) DEFAULT NULL COMMENT '最大跟随数',
- `dividend_percent` int(6) NOT NULL,
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`),
- UNIQUE KEY `name` (`name`)
- ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='交易员等级表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `trader_symbol`
- --
- DROP TABLE IF EXISTS `trader_symbol`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `trader_symbol` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `trader_id` bigint(20) DEFAULT NULL COMMENT '交易员ID',
- `symbol` varchar(50) DEFAULT NULL COMMENT '合约交易对',
- `contract_symbol_id` int(11) DEFAULT NULL COMMENT '外部合约交易对id',
- `created_time` datetime DEFAULT NULL COMMENT '创建时间',
- `updated_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`),
- UNIQUE KEY `trader_symbol_unique` (`trader_id`,`contract_symbol_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=721 DEFAULT CHARSET=utf8 COMMENT='交易员带单合约';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `trader_tag`
- --
- DROP TABLE IF EXISTS `trader_tag`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `trader_tag` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `trader_id` bigint(20) NOT NULL COMMENT '交易员ID',
- `tag_id` bigint(20) NOT NULL COMMENT '标签ID',
- `created_time` datetime DEFAULT NULL,
- `updated_time` datetime DEFAULT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=733 DEFAULT CHARSET=utf8 COMMENT='交易员标签表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Table structure for table `user`
- --
- DROP TABLE IF EXISTS `user`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `user` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
- `username` varchar(50) DEFAULT NULL COMMENT '用户名',
- `password` varchar(100) DEFAULT NULL COMMENT '密码',
- `mobile` varchar(50) DEFAULT NULL COMMENT '手机',
- `email` varchar(50) DEFAULT NULL COMMENT '邮箱',
- `status` tinyint(2) DEFAULT NULL COMMENT '状态',
- `created_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
- `updated_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='测试用户表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;
- /*!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-28 13:09:36
|