/*
 Navicat Premium Data Transfer

 Source Server         : local
 Source Server Type    : MySQL
 Source Server Version : 80034
 Source Host           : localhost:3306
 Source Schema         : eonline2

 Target Server Type    : MySQL
 Target Server Version : 80034
 File Encoding         : 65001

 Date: 13/09/2023 14:46:45
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for bonus_record
-- ----------------------------
DROP TABLE IF EXISTS `bonus_record`;
CREATE TABLE `bonus_record`  (
  `id` int UNSIGNED NOT NULL COMMENT '年月日时间ID',
  `dau` int UNSIGNED NOT NULL COMMENT '原始dau',
  `pass` int UNSIGNED NOT NULL COMMENT '通关总份额',
  `coin` int UNSIGNED NOT NULL COMMENT '分红每一份额美分数',
  `bonus` int UNSIGNED NOT NULL COMMENT '服务器分红总额美分',
  `bonus_cur` int UNSIGNED NOT NULL COMMENT '服务器实际分红总额美分',
  `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for payout_record
-- ----------------------------
DROP TABLE IF EXISTS `payout_record`;
CREATE TABLE `payout_record`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '提现记录ID',
  `payout_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '支付第三方id',
  `record_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '提现唯一编码',
  `channel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '支付渠道',
  `uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '提现用户唯一编码',
  `account` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '提现账号',
  `item_id` int UNSIGNED NULL DEFAULT NULL COMMENT '提现的item对应id',
  `amount` decimal(8, 2) NULL DEFAULT NULL COMMENT '提现金额',
  `currency` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '货币单位',
  `status` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '提现状态 1:提现中,2:提现成功,3:提现失败',
  `ecpm` tinyint UNSIGNED NOT NULL COMMENT 'ecpm等级',
  `version` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '版本号',
  `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `fail` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '提现失败错误',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `payout_record_uuid_IDX`(`uuid` ASC) USING BTREE,
  INDEX `payout_record_status_IDX`(`status` ASC) USING BTREE,
  INDEX `payout_record_account_IDX`(`account` ASC) USING BTREE,
  INDEX `payout_record_record_no_IDX`(`record_no` ASC) USING BTREE,
  INDEX `payout_record_item_id_IDX`(`item_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '提现记录' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for payout_user
-- ----------------------------
DROP TABLE IF EXISTS `payout_user`;
CREATE TABLE `payout_user`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `platform` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '平台',
  `ip` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'ip地址',
  `country` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '国家',
  `device_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '设备ID',
  `version` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '版本号',
  `uuid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户唯一ID，根据ip, country,device_id生成',
  `login_days` smallint UNSIGNED NOT NULL COMMENT '登录天数',
  `created_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `clientData` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户端数据',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `payout_user_UN`(`uuid` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '提现用户信息' ROW_FORMAT = DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;
