Files
lottery/database/ecaibackup.sql
T
feng0207 3fc4dcc777 initial commit: lottery 项目集(三工程统一管理)
- apps/lotteryServer, lotteryCapture, lotteryOpen 三个业务工程
- 忽略 archive/, tools/, infra/data/ 大目录与敏感配置文件
- 移除 lotteryServer 原嵌套 git,并入顶层统一管理
2026-09-17 19:03:32 +08:00

642 lines
26 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.
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50721
Source Host : 127.0.0.1:3306
Source Database : ecaibackup
Target Server Type : MYSQL
Target Server Version : 50721
File Encoding : 65001
Date: 2018-04-06 20:53:34
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for activity_red_packet_rain_bill
-- ----------------------------
DROP TABLE IF EXISTS `activity_red_packet_rain_bill`;
CREATE TABLE `activity_red_packet_rain_bill` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户ID',
`date` varchar(10) NOT NULL COMMENT '领取日期',
`hour` varchar(2) NOT NULL COMMENT '领取小时',
`time` varchar(20) NOT NULL COMMENT '领取时间,完整的时间',
`cost` decimal(16,5) NOT NULL COMMENT '消费',
`amount` decimal(16,5) NOT NULL COMMENT '领取金额',
`ip` varchar(25) NOT NULL COMMENT '领取IP地址',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_date_hour` (`user_id`,`date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='红包雨领取账单';
-- ----------------------------
-- Records of activity_red_packet_rain_bill
-- ----------------------------
-- ----------------------------
-- Table structure for activity_red_packet_rain_time
-- ----------------------------
DROP TABLE IF EXISTS `activity_red_packet_rain_time`;
CREATE TABLE `activity_red_packet_rain_time` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` varchar(10) NOT NULL COMMENT '日期',
`hour` varchar(2) NOT NULL COMMENT '小时',
`start_time` varchar(20) NOT NULL COMMENT '开始时间',
`end_time` varchar(20) NOT NULL COMMENT '结束时间',
PRIMARY KEY (`id`),
UNIQUE KEY `date_hour` (`date`,`hour`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='红包雨运行时间';
-- ----------------------------
-- Records of activity_red_packet_rain_time
-- ----------------------------
-- ----------------------------
-- Table structure for admin_user_action_log
-- ----------------------------
DROP TABLE IF EXISTS `admin_user_action_log`;
CREATE TABLE `admin_user_action_log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`action_id` int(10) unsigned NOT NULL,
`data` text NOT NULL,
`millisecond` bigint(20) DEFAULT NULL,
`error` int(11) NOT NULL DEFAULT '0',
`message` mediumtext,
`time` varchar(19) NOT NULL,
`user_agent` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of admin_user_action_log
-- ----------------------------
-- ----------------------------
-- Table structure for admin_user_log
-- ----------------------------
DROP TABLE IF EXISTS `admin_user_log`;
CREATE TABLE `admin_user_log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`ip` varchar(128) NOT NULL,
`address` varchar(255) DEFAULT NULL,
`action` text NOT NULL,
`time` varchar(20) NOT NULL,
`user_agent` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of admin_user_log
-- ----------------------------
-- ----------------------------
-- Table structure for game_bets
-- ----------------------------
DROP TABLE IF EXISTS `game_bets`;
CREATE TABLE `game_bets` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` int(10) NOT NULL COMMENT '用户ID',
`platform_id` int(10) NOT NULL COMMENT '平台ID',
`bets_id` varchar(128) NOT NULL COMMENT '平台方的注单ID',
`game_code` varchar(128) NOT NULL COMMENT '游戏编码,与本系统不同,是第三方自己的编码',
`game_type` varchar(128) NOT NULL COMMENT '游戏类型',
`game_name` varchar(128) NOT NULL COMMENT '游戏名',
`money` decimal(12,4) NOT NULL COMMENT '下注金额',
`prize_money` decimal(12,4) NOT NULL COMMENT '奖金金额',
`progressive_money` decimal(12,4) DEFAULT '0.0000' COMMENT '奖池下注金额',
`progressive_prize` decimal(12,4) DEFAULT '0.0000' COMMENT '奖池中奖金额',
`balance` decimal(12,4) DEFAULT '0.0000' COMMENT '余额',
`status` int(2) DEFAULT '1' COMMENT '状态,-1:未知;1:完成;2:等待中;3:进行中;4:赢;5:输;6:平局;7:拒绝;8:退钱;9:取消;10:上半场赢;11:上半场输;12:和;',
`time` varchar(50) NOT NULL COMMENT '下注时间',
`prize_time` varchar(50) DEFAULT NULL COMMENT '派奖时间',
`ext1` varchar(128) DEFAULT NULL COMMENT '额外字段1',
`ext2` varchar(128) DEFAULT NULL COMMENT '额外字段2',
`ext3` varchar(128) DEFAULT NULL COMMENT '额外字段3',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_platform_id_bets_id_game_code` (`user_id`,`platform_id`,`bets_id`,`game_code`),
KEY `user_id` (`user_id`),
KEY `platform_id` (`platform_id`),
KEY `time` (`time`),
KEY `user_id_time` (`user_id`,`time`),
KEY `user_id_platform_id_time` (`user_id`,`platform_id`,`time`),
KEY `platform_id_status_time` (`platform_id`,`status`,`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='游戏投注表';
-- ----------------------------
-- Records of game_bets
-- ----------------------------
-- ----------------------------
-- Table structure for lottery_open_code
-- ----------------------------
DROP TABLE IF EXISTS `lottery_open_code`;
CREATE TABLE `lottery_open_code` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned DEFAULT NULL,
`lottery` varchar(32) NOT NULL,
`expect` varchar(32) NOT NULL,
`code` varchar(128) NOT NULL,
`time` varchar(19) NOT NULL,
`open_status` int(11) NOT NULL DEFAULT '0',
`open_time` varchar(19) DEFAULT NULL,
`remarks` varchar(128) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_lottery_expect` (`user_id`,`lottery`,`expect`),
KEY `IDX_LOTTERY_OPEN_CODE_002` (`lottery`),
KEY `IDX_LOTTERY_OPEN_CODE_003` (`expect`),
KEY `IDX_LOTTERY_OPEN_CODE_004` (`open_status`),
KEY `IDX_LOTTERY_OPEN_CODE_005` (`open_time`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of lottery_open_code
-- ----------------------------
-- ----------------------------
-- Table structure for user_action_log
-- ----------------------------
DROP TABLE IF EXISTS `user_action_log`;
CREATE TABLE `user_action_log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`ip` varchar(128) NOT NULL,
`address` varchar(255) DEFAULT NULL,
`action` text NOT NULL,
`time` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `ip` (`ip`),
KEY `time` (`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user_action_log
-- ----------------------------
-- ----------------------------
-- Table structure for user_bets
-- ----------------------------
DROP TABLE IF EXISTS `user_bets`;
CREATE TABLE `user_bets` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`billno` varchar(32) NOT NULL COMMENT '账单号',
`user_id` int(11) NOT NULL COMMENT '用户ID',
`type` int(11) NOT NULL COMMENT '投注类型;0:普通订单;1:追号订单;2:计划订单;',
`lottery_id` int(11) NOT NULL COMMENT '彩票ID',
`expect` varchar(32) NOT NULL COMMENT '投注期号',
`rule_id` int(11) NOT NULL COMMENT '玩法ID',
`codes` mediumtext NOT NULL COMMENT '投注内容',
`nums` int(11) NOT NULL COMMENT '注数',
`model` varchar(16) NOT NULL COMMENT '资金模式;yuan,jiao,fen,li,1yuan,1jiao,1fen,1li',
`multiple` int(11) NOT NULL COMMENT '倍数',
`code` int(11) NOT NULL COMMENT '投注等级;如1956',
`point` decimal(11,1) NOT NULL COMMENT '选择返点,如7.8',
`money` decimal(16,5) NOT NULL COMMENT '投注金额',
`time` varchar(19) NOT NULL COMMENT '投注时间;yyyy-MM-dd HH:mm:ss',
`stop_time` varchar(19) NOT NULL COMMENT '截止时间;yyyy-MM-dd HH:mm:ss',
`open_time` varchar(19) NOT NULL COMMENT '开奖时间,开奖后有;yyyy-MM-dd HH:mm:ss',
`status` int(11) NOT NULL COMMENT '状态;0:未开奖;1:未中奖;2:已中奖;3:已撤单;',
`open_code` varchar(128) DEFAULT NULL COMMENT '开奖号码',
`prize_money` decimal(16,5) DEFAULT NULL COMMENT '中奖金额',
`prize_time` varchar(19) DEFAULT NULL COMMENT '开奖时间;yyyy-MM-dd HH:mm:ss',
`chase_billno` varchar(64) DEFAULT NULL COMMENT '追号单',
`chase_stop` int(11) DEFAULT '0' COMMENT '中奖后追停;1:是;0:否',
`plan_billno` varchar(64) DEFAULT NULL COMMENT '计划单号;暂未使用',
`reward_money` decimal(16,5) DEFAULT NULL COMMENT '奖励金额;暂未使用',
`is_all` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否全包',
`compressed` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '号码是否已经压缩,0:未压缩;1:已压缩',
`ip` varchar(128) DEFAULT NULL COMMENT '投注IP',
PRIMARY KEY (`id`),
UNIQUE KEY `USER_BETS_INDEX_001` (`billno`,`user_id`) USING BTREE,
KEY `USER_BETS_INDEX_002` (`user_id`) USING BTREE,
KEY `USER_BETS_INDEX_003` (`lottery_id`) USING BTREE,
KEY `USER_BETS_INDEX_004` (`expect`) USING BTREE,
KEY `USER_BETS_INDEX_005` (`time`) USING BTREE,
KEY `USER_BETS_INDEX_006` (`status`) USING BTREE,
KEY `USER_BETS_INDEX_007` (`type`) USING BTREE,
KEY `USER_BETS_INDEX_008` (`chase_billno`) USING BTREE,
KEY `USER_BETS_INDEX_009` (`plan_billno`) USING BTREE,
KEY `USER_BETS_INDEX_010` (`billno`) USING BTREE,
KEY `ip` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户投注表';
-- ----------------------------
-- Records of user_bets
-- ----------------------------
-- ----------------------------
-- Table structure for user_bill
-- ----------------------------
DROP TABLE IF EXISTS `user_bill`;
CREATE TABLE `user_bill` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`billno` varchar(32) NOT NULL,
`user_id` int(11) NOT NULL,
`account` int(11) NOT NULL,
`type` int(11) NOT NULL,
`money` decimal(16,5) NOT NULL,
`before_money` decimal(16,5) NOT NULL DEFAULT '0.00000',
`after_money` decimal(16,5) NOT NULL DEFAULT '0.00000',
`ref_type` int(11) DEFAULT NULL,
`ref_id` varchar(32) DEFAULT NULL,
`time` varchar(19) NOT NULL,
`remarks` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `USER_BILL_INDEX_001` (`billno`),
KEY `USER_BILL_INDEX_002` (`user_id`) USING BTREE,
KEY `USER_BILL_INDEX_003` (`account`) USING BTREE,
KEY `USER_BILL_INDEX_004` (`type`) USING BTREE,
KEY `USER_BILL_INDEX_005` (`time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user_bill
-- ----------------------------
-- ----------------------------
-- Table structure for user_daily_settle_bill
-- ----------------------------
DROP TABLE IF EXISTS `user_daily_settle_bill`;
CREATE TABLE `user_daily_settle_bill` (
`id` int(12) NOT NULL AUTO_INCREMENT COMMENT 'id',
`user_id` int(11) NOT NULL COMMENT '用户ID',
`indicate_date` varchar(10) NOT NULL COMMENT '结算日期',
`settle_time` varchar(19) NOT NULL COMMENT '系统结算时间',
`min_valid_user` int(11) DEFAULT '0' COMMENT '最低有效会员数',
`valid_user` int(11) DEFAULT '0' COMMENT '实际有效会员数',
`scale` decimal(4,3) NOT NULL COMMENT '日结比例',
`billing_order` decimal(16,4) DEFAULT '0.0000' COMMENT '消费',
`user_amount` decimal(16,4) DEFAULT '0.0000' COMMENT '用户日结金额',
`status` int(11) NOT NULL COMMENT '1:已发放。2:已撤销。3:未达标',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_indicate_date` (`user_id`,`indicate_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='契约日结账单';
-- ----------------------------
-- Records of user_daily_settle_bill
-- ----------------------------
-- ----------------------------
-- Table structure for user_dividend_bill
-- ----------------------------
DROP TABLE IF EXISTS `user_dividend_bill`;
CREATE TABLE `user_dividend_bill` (
`id` int(12) NOT NULL AUTO_INCREMENT,
`user_id` int(12) NOT NULL COMMENT '用户ID',
`indicate_start_date` varchar(10) NOT NULL COMMENT '分红开始日期',
`indicate_end_date` varchar(10) NOT NULL COMMENT '分红结束日期',
`min_valid_user` int(11) NOT NULL COMMENT '最低有效会员数',
`valid_user` int(11) NOT NULL COMMENT '实际有效会员数',
`scale` decimal(3,2) NOT NULL COMMENT '分红比例 x.xx,0.3代表30%',
`billing_order` decimal(16,4) NOT NULL COMMENT '消费',
`this_loss` decimal(16,4) NOT NULL COMMENT '本次亏损',
`last_loss` decimal(16,4) NOT NULL COMMENT '上半月亏损',
`total_loss` decimal(16,4) NOT NULL COMMENT '累计亏损',
`available_amount` decimal(16,4) NOT NULL COMMENT '目前可以领取',
`total_received` decimal(16,4) NOT NULL COMMENT '目前总计收到',
`lower_total_amount` decimal(16,4) NOT NULL COMMENT '下级共需发放',
`lower_paid_amount` decimal(16,4) NOT NULL COMMENT '下级累计发放',
`user_amount` decimal(16,4) NOT NULL COMMENT '用户分红金额',
`issue_type` int(1) NOT NULL COMMENT '发放类型。1:平台发放;2:上级发放',
`settle_time` varchar(19) NOT NULL COMMENT '系统结算时间',
`collect_time` varchar(19) DEFAULT NULL COMMENT '用户领取时间',
`status` int(11) NOT NULL COMMENT '1:已发放。2:待审核。3:待领取。4:已拒绝(审核拒绝)。5:未达标',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_indicate_start_date_indicate_end_date` (`user_id`,`indicate_start_date`,`indicate_end_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='契约分红账单';
-- ----------------------------
-- Records of user_dividend_bill
-- ----------------------------
-- ----------------------------
-- Table structure for user_game_dividend_bill
-- ----------------------------
DROP TABLE IF EXISTS `user_game_dividend_bill`;
CREATE TABLE `user_game_dividend_bill` (
`id` int(12) NOT NULL AUTO_INCREMENT,
`user_id` int(12) NOT NULL COMMENT '用户ID',
`indicate_start_date` varchar(10) NOT NULL COMMENT '分红开始日期',
`indicate_end_date` varchar(10) NOT NULL COMMENT '分红结束日期',
`scale` decimal(3,2) NOT NULL COMMENT '分红比例 x.xx,0.3代表30%',
`billing_order` decimal(16,4) NOT NULL COMMENT '消费',
`this_loss` decimal(16,4) NOT NULL COMMENT '本次亏损',
`last_loss` decimal(16,4) NOT NULL COMMENT '上半月亏损',
`total_loss` decimal(16,4) NOT NULL COMMENT '累计亏损',
`user_amount` decimal(16,4) NOT NULL COMMENT '用户分红金额',
`settle_time` varchar(19) NOT NULL COMMENT '系统结算时间',
`collect_time` varchar(19) DEFAULT NULL COMMENT '用户领取时间',
`status` int(11) NOT NULL COMMENT '1:已发放。2:待审核。3:待领取。4:已拒绝(审核拒绝)。5:未达标。',
`remarks` varchar(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_indicate_start_date_indicate_end_date` (`user_id`,`indicate_start_date`,`indicate_end_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='游戏分红账单';
-- ----------------------------
-- Records of user_game_dividend_bill
-- ----------------------------
-- ----------------------------
-- Table structure for user_game_report
-- ----------------------------
DROP TABLE IF EXISTS `user_game_report`;
CREATE TABLE `user_game_report` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` int(10) NOT NULL COMMENT '用户ID',
`platform_id` int(10) NOT NULL COMMENT '平台ID',
`trans_in` decimal(16,5) NOT NULL COMMENT '转入金额',
`trans_out` decimal(16,5) NOT NULL COMMENT '转出金额',
`water_return` decimal(16,5) NOT NULL COMMENT '返水',
`proxy_return` decimal(16,5) NOT NULL COMMENT '代理返水',
`activity` decimal(16,5) NOT NULL COMMENT '活动',
`billing_order` decimal(16,5) NOT NULL COMMENT '消费',
`prize` decimal(16,5) NOT NULL COMMENT '中奖',
`time` varchar(50) NOT NULL COMMENT '时间',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_platform_id_time` (`user_id`,`platform_id`,`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='游戏报表';
-- ----------------------------
-- Records of user_game_report
-- ----------------------------
-- ----------------------------
-- Table structure for user_game_water_bill
-- ----------------------------
DROP TABLE IF EXISTS `user_game_water_bill`;
CREATE TABLE `user_game_water_bill` (
`id` int(16) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` int(11) NOT NULL COMMENT '用户ID',
`indicate_date` varchar(10) NOT NULL COMMENT '返水日期',
`from_user` int(11) NOT NULL COMMENT '来自用户',
`settle_time` varchar(19) NOT NULL COMMENT '系统结算时间',
`scale` decimal(5,4) NOT NULL COMMENT '比例,百分比',
`billing_order` decimal(16,4) NOT NULL COMMENT '消费',
`user_amount` decimal(16,4) NOT NULL COMMENT '返水金额',
`type` int(1) NOT NULL COMMENT '类型,1:消费返水;2:代理返水',
`status` int(1) NOT NULL COMMENT '状态,1:已发放;2:系统拒绝',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_indicate_date_from_user` (`user_id`,`indicate_date`,`from_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='游戏返水账单';
-- ----------------------------
-- Records of user_game_water_bill
-- ----------------------------
-- ----------------------------
-- Table structure for user_login_log
-- ----------------------------
DROP TABLE IF EXISTS `user_login_log`;
CREATE TABLE `user_login_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`ip` varchar(128) NOT NULL,
`address` varchar(255) DEFAULT NULL,
`user_agent` varchar(255) DEFAULT NULL,
`time` varchar(19) NOT NULL,
`login_line` varchar(128) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `ip` (`ip`),
KEY `time` (`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user_login_log
-- ----------------------------
-- ----------------------------
-- Table structure for user_lottery_details_report
-- ----------------------------
DROP TABLE IF EXISTS `user_lottery_details_report`;
CREATE TABLE `user_lottery_details_report` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` int(11) NOT NULL COMMENT '用户ID',
`lottery_id` int(11) NOT NULL COMMENT '彩票ID',
`rule_id` int(11) NOT NULL COMMENT '玩法ID',
`spend` decimal(16,5) NOT NULL DEFAULT '0.00000' COMMENT '消费,投注即增加',
`prize` decimal(16,5) NOT NULL DEFAULT '0.00000' COMMENT '奖金,派奖后增加',
`spend_return` decimal(16,5) NOT NULL DEFAULT '0.00000' COMMENT '投注返点',
`proxy_return` decimal(16,5) NOT NULL DEFAULT '0.00000' COMMENT '代理返点',
`cancel_order` decimal(16,5) NOT NULL DEFAULT '0.00000' COMMENT '撤单',
`billing_order` decimal(16,5) NOT NULL DEFAULT '0.00000' COMMENT '消费,派奖后增加',
`time` varchar(10) NOT NULL COMMENT '日期,yyyy-MM-dd',
PRIMARY KEY (`id`),
UNIQUE KEY `USER_LOTTERY_DETAILS_REPORT_INDEX_001` (`user_id`,`lottery_id`,`time`,`rule_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='彩票玩法投注表';
-- ----------------------------
-- Records of user_lottery_details_report
-- ----------------------------
-- ----------------------------
-- Table structure for user_lottery_report
-- ----------------------------
DROP TABLE IF EXISTS `user_lottery_report`;
CREATE TABLE `user_lottery_report` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`trans_in` decimal(16,5) NOT NULL DEFAULT '0.00000',
`trans_out` decimal(16,5) NOT NULL DEFAULT '0.00000',
`spend` decimal(16,5) NOT NULL DEFAULT '0.00000',
`prize` decimal(16,5) NOT NULL DEFAULT '0.00000',
`spend_return` decimal(16,5) NOT NULL DEFAULT '0.00000',
`proxy_return` decimal(16,5) NOT NULL DEFAULT '0.00000',
`cancel_order` decimal(16,5) NOT NULL DEFAULT '0.00000',
`activity` decimal(16,5) NOT NULL DEFAULT '0.00000',
`dividend` decimal(16,5) NOT NULL DEFAULT '0.00000',
`billing_order` decimal(16,5) NOT NULL DEFAULT '0.00000',
`time` varchar(10) NOT NULL,
`packet` decimal(16,5) NOT NULL DEFAULT '0.00000' COMMENT '红包金额',
`recharge_fee` decimal(16,5) NOT NULL DEFAULT '0.00000' COMMENT '充值手续费,平台这边的,主报表是实际的',
PRIMARY KEY (`id`),
UNIQUE KEY `USER_LOTTERY_REPORT_INDEX_001` (`user_id`,`time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user_lottery_report
-- ----------------------------
-- ----------------------------
-- Table structure for user_main_report
-- ----------------------------
DROP TABLE IF EXISTS `user_main_report`;
CREATE TABLE `user_main_report` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`recharge` decimal(16,5) NOT NULL DEFAULT '0.00000',
`receive_fee_money` decimal(16,5) NOT NULL DEFAULT '0.00000' COMMENT '第三方平台收款手续费',
`withdrawals` decimal(16,5) NOT NULL DEFAULT '0.00000',
`trans_in` decimal(16,5) NOT NULL DEFAULT '0.00000',
`trans_out` decimal(16,5) NOT NULL DEFAULT '0.00000',
`account_in` decimal(16,5) NOT NULL DEFAULT '0.00000',
`account_out` decimal(16,5) NOT NULL DEFAULT '0.00000',
`activity` decimal(16,5) NOT NULL DEFAULT '0.00000',
`time` varchar(10) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `USER_MAIN_REPORT_INDEX_001` (`user_id`,`time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user_main_report
-- ----------------------------
-- ----------------------------
-- Table structure for user_message
-- ----------------------------
DROP TABLE IF EXISTS `user_message`;
CREATE TABLE `user_message` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`to_uid` int(11) NOT NULL,
`from_uid` int(11) NOT NULL,
`type` int(11) NOT NULL DEFAULT '0',
`subject` varchar(255) NOT NULL,
`content` mediumtext NOT NULL,
`time` varchar(19) NOT NULL,
`to_status` int(11) NOT NULL DEFAULT '0',
`from_status` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user_message
-- ----------------------------
-- ----------------------------
-- Table structure for user_recharge
-- ----------------------------
DROP TABLE IF EXISTS `user_recharge`;
CREATE TABLE `user_recharge` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`billno` varchar(64) NOT NULL,
`user_id` int(11) NOT NULL,
`money` decimal(16,5) NOT NULL,
`before_money` decimal(16,5) NOT NULL DEFAULT '0.00000',
`after_money` decimal(16,5) NOT NULL DEFAULT '0.00000',
`rec_money` decimal(16,5) NOT NULL DEFAULT '0.00000',
`fee_money` decimal(16,5) NOT NULL,
`time` varchar(19) NOT NULL,
`status` int(11) NOT NULL,
`type` int(11) NOT NULL,
`subtype` int(11) NOT NULL,
`channel_id` int(11) DEFAULT NULL,
`postscript` varchar(128) DEFAULT NULL,
`infos` varchar(255) DEFAULT NULL,
`pay_billno` varchar(255) DEFAULT NULL,
`pay_time` varchar(19) DEFAULT NULL,
`remarks` varchar(255) DEFAULT NULL,
`card_id` int(11) DEFAULT NULL COMMENT '收款卡ID',
`real_name` varchar(255) DEFAULT NULL COMMENT '转款人',
`receive_fee_money` decimal(16,5) NOT NULL DEFAULT '0.00000' COMMENT '第三方平台收款手续费',
`request_bank_id` int(11) DEFAULT NULL COMMENT '下单银行',
`pay_bank_id` int(11) DEFAULT NULL COMMENT '支付银行',
`applyIp` varchar(64) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `USER_RECHARGE_INDEX_001` (`billno`) USING BTREE,
KEY `time` (`time`),
KEY `user_id` (`user_id`),
KEY `pay_time` (`pay_time`),
KEY `type_subtype` (`type`,`subtype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user_recharge
-- ----------------------------
-- ----------------------------
-- Table structure for user_sys_message
-- ----------------------------
DROP TABLE IF EXISTS `user_sys_message`;
CREATE TABLE `user_sys_message` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`type` int(11) NOT NULL,
`content` text,
`time` varchar(20) NOT NULL,
`status` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `USER_SYS_MESSAGE_INDEX_001` (`userId`),
KEY `USER_SYS_MESSAGE_INDEX_002` (`type`),
KEY `USER_SYS_MESSAGE_INDEX_003` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user_sys_message
-- ----------------------------
-- ----------------------------
-- Table structure for user_transfers
-- ----------------------------
DROP TABLE IF EXISTS `user_transfers`;
CREATE TABLE `user_transfers` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`billno` varchar(32) NOT NULL,
`to_uid` int(11) NOT NULL,
`from_uid` int(11) NOT NULL,
`to_account` int(11) NOT NULL,
`from_account` int(11) NOT NULL,
`money` decimal(16,5) NOT NULL,
`before_money` decimal(16,5) NOT NULL,
`after_money` decimal(16,5) NOT NULL,
`time` varchar(19) NOT NULL,
`status` int(11) NOT NULL,
`type` int(11) NOT NULL,
`infos` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `USER_TRANSFERS_INDEX_001` (`billno`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user_transfers
-- ----------------------------
-- ----------------------------
-- Table structure for user_withdraw
-- ----------------------------
DROP TABLE IF EXISTS `user_withdraw`;
CREATE TABLE `user_withdraw` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`billno` varchar(32) NOT NULL,
`user_id` int(11) NOT NULL,
`money` decimal(16,5) NOT NULL DEFAULT '0.00000',
`before_money` decimal(16,5) NOT NULL DEFAULT '0.00000',
`after_money` decimal(16,5) NOT NULL DEFAULT '0.00000',
`rec_money` decimal(16,5) NOT NULL DEFAULT '0.00000',
`fee_money` decimal(16,5) NOT NULL DEFAULT '0.00000',
`time` varchar(19) NOT NULL,
`status` int(11) NOT NULL,
`infos` varchar(255) DEFAULT NULL,
`bank_name` varchar(64) DEFAULT NULL,
`bank_branch` varchar(128) DEFAULT NULL,
`card_name` varchar(64) DEFAULT NULL,
`card_id` varchar(128) DEFAULT NULL,
`pay_billno` varchar(128) DEFAULT NULL,
`operator_user` varchar(64) DEFAULT NULL,
`operator_time` varchar(19) DEFAULT NULL,
`remarks` varchar(255) DEFAULT NULL,
`lock_status` int(11) NOT NULL DEFAULT '0',
`check_status` int(11) NOT NULL DEFAULT '0',
`remit_status` int(11) NOT NULL DEFAULT '0',
`pay_type` int(11) DEFAULT NULL COMMENT '打款类型:1:手动API代付;2手动;3:自动API代付',
`payment_channel_id` int(11) DEFAULT NULL COMMENT '第三方支付ID',
PRIMARY KEY (`id`),
UNIQUE KEY `USER_WITHDRAW_INDEX_001` (`billno`),
KEY `user_id` (`user_id`),
KEY `time` (`time`),
KEY `status` (`status`),
KEY `pay_billno` (`pay_billno`),
KEY `operator_time` (`operator_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user_withdraw
-- ----------------------------