964 lines
54 KiB
MySQL
964 lines
54 KiB
MySQL
|
|
-- MySQL dump 10.13 Distrib 5.7.44, for Linux (x86_64)
|
|||
|
|
--
|
|||
|
|
-- Host: localhost Database: sonic-lion
|
|||
|
|
-- ------------------------------------------------------
|
|||
|
|
-- 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 */;
|
|||
|
|
/*!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 `account_buff`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `account_buff`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `account_buff` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`uid` bigint(20) NOT NULL,
|
|||
|
|
`balance` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '可消费buff',
|
|||
|
|
`withdrawable_income` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '可提现收入',
|
|||
|
|
`awaiting_income` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '待入账收入',
|
|||
|
|
`frozen_income` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '冻结收入',
|
|||
|
|
`status` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ENABLE' COMMENT '0:可用 1:禁用',
|
|||
|
|
`recharge_total` bigint(20) NOT NULL DEFAULT '0' COMMENT '充值总金额',
|
|||
|
|
`frozen_balance` bigint(20) DEFAULT '0' COMMENT '冻结余额',
|
|||
|
|
`withdraw_on_going` bigint(20) NOT NULL DEFAULT '0' COMMENT '提现在途资金',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '编辑时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_uid` (`uid`) USING BTREE,
|
|||
|
|
KEY `_idx_acount_buff_recharge_total_status` (`recharge_total`,`status`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `account_buff_awaiting`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `account_buff_awaiting`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `account_buff_awaiting` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`bill_id` bigint(20) DEFAULT NULL COMMENT '流水id account_buff_bill 主键id',
|
|||
|
|
`account_id` bigint(20) NOT NULL COMMENT 'account_buff.id',
|
|||
|
|
`trade_no` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
|
|||
|
|
`buff` bigint(20) NOT NULL,
|
|||
|
|
`to_withdrawable_income_time` timestamp NOT NULL COMMENT '转入可提现收入时间',
|
|||
|
|
`status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '0:待入账 1:已入账 2:已退款',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
`fronzen_status` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT 'UN_FRONZEN',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
KEY `idx_account_id` (`account_id`) USING BTREE,
|
|||
|
|
KEY `idx_trade_no` (`trade_no`) USING BTREE,
|
|||
|
|
KEY `_idx_account_buff_awaiting_fronzen_status_status` (`fronzen_status`,`status`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1530 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='buff待入账记录';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `account_buff_bill`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `account_buff_bill`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `account_buff_bill` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`platform` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
|||
|
|
`bill_no` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|||
|
|
`account_id` bigint(20) NOT NULL COMMENT 'account_buff.id',
|
|||
|
|
`uid` bigint(20) NOT NULL,
|
|||
|
|
`des_uid` bigint(20) DEFAULT NULL,
|
|||
|
|
`target_user_id` bigint(20) DEFAULT NULL COMMENT '游戏订单 担保交易 冗余目标方的用户id',
|
|||
|
|
`buff` bigint(20) unsigned NOT NULL,
|
|||
|
|
`buff_classify` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Buff 归类',
|
|||
|
|
`biz_type` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '100游戏-101打赏-400退款-500提现-充值600-购买VIP700-聊天室礼物打赏800-E-Coin900',
|
|||
|
|
`pay_channel` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
|
|||
|
|
`trade_no` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|||
|
|
`biz_no` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|||
|
|
`biz_no_relation_no` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '外部交易号关联单号(如:打赏单号关联的游戏订单的订单号)',
|
|||
|
|
`balance` bigint(20) unsigned NOT NULL COMMENT '完成当次交易后剩余总buff',
|
|||
|
|
`in_or_out` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '1:收入 2:支出',
|
|||
|
|
`buff_type` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '1:可消费Buff 2:可提现收入 3:待入账收入 4:冻结收入',
|
|||
|
|
`to_withdrawable_income_time` timestamp NULL DEFAULT NULL COMMENT '待入账金额 转入可提现收入时间. 冗余 列表展示用',
|
|||
|
|
`bill_status` int(11) DEFAULT NULL,
|
|||
|
|
`reason` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|||
|
|
`withdraw_status` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '提现状态( IN_REVIEW, REVIEW_FAIL, //提现中 WITHDRAW_ING, //提现失败 WITHDRAW_FAIL)',
|
|||
|
|
`gift_amount` bigint(20) DEFAULT '0' COMMENT '赠送金额',
|
|||
|
|
`extend` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '扩展字段',
|
|||
|
|
`pay_method` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '支付方式',
|
|||
|
|
`is_deleted` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_bill_no` (`bill_no`) USING BTREE,
|
|||
|
|
KEY `idx_account_id` (`account_id`) USING BTREE,
|
|||
|
|
KEY `idx_biz_type` (`biz_type`) USING BTREE,
|
|||
|
|
KEY `idx_uid` (`uid`) USING BTREE,
|
|||
|
|
KEY `_idx_biz_no_relation_no` (`biz_no_relation_no`) USING BTREE,
|
|||
|
|
KEY `_idx_bill_create_time` (`create_time`) USING BTREE,
|
|||
|
|
KEY `_idx_account_buff_bill_uid_delete_create_time` (`uid`,`is_deleted`,`create_time`) USING BTREE,
|
|||
|
|
KEY `_idx_account_buff_bill_pay_channel_biz_type_crete_time` (`pay_channel`,`biz_type`,`create_time`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=8284 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `apple_refund_record`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `apple_refund_record`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `apple_refund_record` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`product_id` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '内购商品项id',
|
|||
|
|
`transaction_id` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '交易ID',
|
|||
|
|
`purchase_date` timestamp NULL DEFAULT NULL COMMENT '购买时间',
|
|||
|
|
`cancellation_date` timestamp NULL DEFAULT NULL COMMENT '退款时间',
|
|||
|
|
`trade_no` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '订单号',
|
|||
|
|
`user_id` bigint(20) NOT NULL COMMENT '用户Id',
|
|||
|
|
`amount` bigint(20) NOT NULL COMMENT '支付金额',
|
|||
|
|
`buff` bigint(20) NOT NULL COMMENT 'buff数',
|
|||
|
|
`biz_type` int(20) DEFAULT NULL COMMENT '业务类型',
|
|||
|
|
`dispute_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'paypal争议ID',
|
|||
|
|
`platform` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'PAYPAL, IOS, GOOGLE',
|
|||
|
|
`content` longtext COLLATE utf8mb4_unicode_ci COMMENT '第三方接口返回的内容',
|
|||
|
|
`after_fronzen_buff` bigint(20) DEFAULT NULL COMMENT '冻结之后的金额',
|
|||
|
|
`fronzen_status` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '冻结状态',
|
|||
|
|
`create_time` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'create_time',
|
|||
|
|
`insert_time` datetime DEFAULT NULL COMMENT '数据插入时间',
|
|||
|
|
`transaction_time` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'transaction_time',
|
|||
|
|
`transaction_status` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'transaction_status',
|
|||
|
|
`buyer_name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'buyerName',
|
|||
|
|
`reason` varchar(600) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'reason',
|
|||
|
|
`status` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'status',
|
|||
|
|
`ip` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'ip',
|
|||
|
|
`email` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'email',
|
|||
|
|
`id_card` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'id_card',
|
|||
|
|
`register_time` timestamp NULL DEFAULT NULL COMMENT 'register_time',
|
|||
|
|
`pst_pay_time` timestamp NULL DEFAULT NULL COMMENT 'pst_pay_time',
|
|||
|
|
`nickname` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'nickname',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_trade_no_refund` (`trade_no`) USING BTREE,
|
|||
|
|
KEY `_idx_apple_refund_record_cancellation_date` (`cancellation_date`) USING BTREE,
|
|||
|
|
KEY `_idx_apple_refund_record_transaction_id` (`transaction_id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='苹果退款记录';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `buff_reward_record`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `buff_reward_record`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `buff_reward_record` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|||
|
|
`uid` bigint(20) DEFAULT NULL COMMENT '用户Id',
|
|||
|
|
`amount` bigint(20) DEFAULT NULL COMMENT '充值金额',
|
|||
|
|
`product_id` varchar(60) DEFAULT NULL COMMENT '充值产品Id',
|
|||
|
|
`reward_id` varchar(60) DEFAULT NULL COMMENT '月累计档位Id',
|
|||
|
|
`year_month_int` int(10) DEFAULT NULL COMMENT '数字年月(yyyyMM)',
|
|||
|
|
`reward_type` varchar(20) DEFAULT NULL COMMENT '奖励原因',
|
|||
|
|
`reward_date` date DEFAULT NULL COMMENT '领取奖励日期',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
KEY `idx_uid` (`reward_type`,`uid`) USING BTREE,
|
|||
|
|
KEY `idx_date` (`reward_date`) USING BTREE,
|
|||
|
|
KEY `_idx_buff_reward_record_uid` (`uid`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='充值奖励领取记录表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `channel_blacklist`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `channel_blacklist`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `channel_blacklist` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|||
|
|
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
|
|||
|
|
`channel_type` varchar(100) DEFAULT NULL COMMENT '渠道类型',
|
|||
|
|
`block_count` int(10) DEFAULT NULL COMMENT '拉黑次数',
|
|||
|
|
`is_delete` tinyint(4) DEFAULT NULL COMMENT '是否删除(0 否、1是)',
|
|||
|
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
|||
|
|
`edit_time` datetime DEFAULT NULL COMMENT '编辑时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `_uqe_channel_blacklist_user_id_channel_type_is_delete` (`user_id`,`channel_type`) USING BTREE,
|
|||
|
|
KEY `_idx_channel_blacklist_user_id_channel_type_is_delete` (`user_id`,`channel_type`,`is_delete`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='渠道用户黑名单列表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `channel_whitelist`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `channel_whitelist`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `channel_whitelist` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|||
|
|
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
|
|||
|
|
`channel_type` varchar(100) DEFAULT NULL COMMENT '渠道类型',
|
|||
|
|
`amount` bigint(20) DEFAULT NULL COMMENT '金额阈值',
|
|||
|
|
`exp_time` datetime DEFAULT NULL COMMENT '过期时间',
|
|||
|
|
`is_delete` tinyint(4) DEFAULT NULL COMMENT '是否删除(0 否、1是)',
|
|||
|
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
|||
|
|
`edit_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '编辑时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `_uqe_channel_whitelist_user_id_channel_type_is_delete` (`user_id`,`channel_type`) USING BTREE,
|
|||
|
|
KEY `_idx_channel_whitelist_user_id_channel_type_is_delete` (`user_id`,`channel_type`,`is_delete`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='渠道用户白名单列表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `google_upload_receipt`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `google_upload_receipt`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `google_upload_receipt` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|||
|
|
`transactions_json_str` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '本单收据所包含苹果交易号所对应的系统内部交易号,格式:{transactionId:tradeNo}',
|
|||
|
|
`receipt` varchar(10240) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '加密的收据',
|
|||
|
|
`is_processed` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已处理 0:否 1:是',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_transactions_json_str` (`transactions_json_str`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='Google上传的票据';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `iap_upload_receipt`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `iap_upload_receipt`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `iap_upload_receipt` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`trade_no` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '交易号',
|
|||
|
|
`transactions_json_str` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '本单收据所包含苹果交易号所对应的系统内部交易号,格式:{transactionId:tradeNo}',
|
|||
|
|
`receipt` longtext COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '加密的收据',
|
|||
|
|
`is_processed` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已处理 0:否 1:是',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_transactions_json_str` (`transactions_json_str`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='iOS上传的票据';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `member_priv_dict`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `member_priv_dict`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `member_priv_dict` (
|
|||
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '会员特权枚举',
|
|||
|
|
`title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '会员特权标题',
|
|||
|
|
`desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '会员特权描述',
|
|||
|
|
`img` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '图片',
|
|||
|
|
`sort` int(10) DEFAULT '0' COMMENT '排序',
|
|||
|
|
`is_delete` tinyint(255) DEFAULT '0' COMMENT '是否删除 0:未删除 1:删除',
|
|||
|
|
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='会员特权字典表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_app_product`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_app_product`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_app_product` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`platform` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'PAYPAL, IOS, GOOGLE',
|
|||
|
|
`product_type` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'APP , SUBSCRIPTION',
|
|||
|
|
`member_type` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'VIP , SVIP',
|
|||
|
|
`period` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '周期 DAY,MONTH,QUARTER,YEAR',
|
|||
|
|
`bundle_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用id',
|
|||
|
|
`product_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '内购商品项id',
|
|||
|
|
`charge_amount` bigint(20) NOT NULL COMMENT '充值金额',
|
|||
|
|
`discount` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '优惠(百分比)',
|
|||
|
|
`pay_amount` bigint(20) NOT NULL COMMENT '支付金额',
|
|||
|
|
`free_days` int(10) DEFAULT '0' COMMENT '免费天数',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
|
|||
|
|
`version` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT '1',
|
|||
|
|
PRIMARY KEY (`id`),
|
|||
|
|
UNIQUE KEY `pd_uk_bi_pi` (`bundle_id`,`product_id`,`platform`,`version`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='APP 内购商品项';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_free_withdraw_bill`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_free_withdraw_bill`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_free_withdraw_bill` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`uid` bigint(20) NOT NULL COMMENT '用户id',
|
|||
|
|
`trade_no` varchar(50) NOT NULL COMMENT '交易号',
|
|||
|
|
`free_config_id` bigint(20) NOT NULL COMMENT '配置Id',
|
|||
|
|
`reason` varchar(40) NOT NULL COMMENT '原因',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
KEY `idx_uid` (`uid`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='免手续费记录表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_free_withdraw_config`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_free_withdraw_config`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_free_withdraw_config` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`uid` bigint(20) NOT NULL COMMENT '用户id',
|
|||
|
|
`reason` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '原因',
|
|||
|
|
`start_time` timestamp NOT NULL COMMENT '开始时间',
|
|||
|
|
`end_time` timestamp NULL DEFAULT NULL COMMENT '结束时间',
|
|||
|
|
`rate` decimal(10,2) DEFAULT '0.00' COMMENT '提现手续费减免比例',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
`is_delete` int(20) NOT NULL DEFAULT '0' COMMENT '是否删除',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
KEY `idx_uid` (`uid`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='免手续费表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_account_bill`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_account_bill`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_account_bill` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|||
|
|
`platform` varchar(20) DEFAULT NULL COMMENT '平台代码',
|
|||
|
|
`account_bill_id` varchar(50) NOT NULL COMMENT '用户流水ID',
|
|||
|
|
`account_id` bigint(20) NOT NULL COMMENT '流水所属平台账号id',
|
|||
|
|
`account_name` varchar(255) NOT NULL COMMENT '账号名称',
|
|||
|
|
`des_account_no` varchar(255) NOT NULL COMMENT '通道账号 (如:银行卡号,支付宝账号;根据des_account_type确定)',
|
|||
|
|
`des_account_name` varchar(255) NOT NULL COMMENT '通道账号姓名',
|
|||
|
|
`des_account_type` tinyint(4) DEFAULT NULL COMMENT '通道账号类型:0平台账号,1非平台账号',
|
|||
|
|
`channel_id` varchar(30) NOT NULL COMMENT '渠道ID',
|
|||
|
|
`channel_name` varchar(255) NOT NULL COMMENT '渠道名称',
|
|||
|
|
`biz_type` varchar(30) NOT NULL COMMENT '业务类型(参看枚举TradeBizType)',
|
|||
|
|
`trade_no` varchar(50) DEFAULT NULL COMMENT '交易号',
|
|||
|
|
`biz_num` varchar(50) DEFAULT '' COMMENT '业务订单号',
|
|||
|
|
`payment_type_id` bigint(20) DEFAULT NULL COMMENT '支付方式ID',
|
|||
|
|
`in_or_out` tinyint(4) NOT NULL COMMENT '流水类型:1收入,2支出',
|
|||
|
|
`name` varchar(50) DEFAULT NULL COMMENT '流水标题或名称',
|
|||
|
|
`amount` bigint(20) NOT NULL DEFAULT '0' COMMENT '发生金额(分)',
|
|||
|
|
`balance` bigint(20) NOT NULL DEFAULT '0' COMMENT '账户当前余额(分),status=2成功时更新',
|
|||
|
|
`remark` varchar(100) DEFAULT NULL COMMENT '备注',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
|
|||
|
|
`is_delete` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
KEY `idx_create_time` (`create_time`) USING BTREE,
|
|||
|
|
KEY `idx_trade_no` (`trade_no`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='账号收支记录(流水)表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_account_fund`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_account_fund`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_account_fund` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|||
|
|
`account_id` bigint(20) NOT NULL COMMENT '账号id',
|
|||
|
|
`channel_id` bigint(20) NOT NULL DEFAULT '2' COMMENT '支付渠道 Id(2:PayPal, 3:stripe, 默认为 2)',
|
|||
|
|
`status` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '帐户状态 1正常 2冻结',
|
|||
|
|
`balance` bigint(20) NOT NULL DEFAULT '0' COMMENT '可用余额',
|
|||
|
|
`charge` bigint(20) DEFAULT '0' COMMENT '充值金额',
|
|||
|
|
`frozen_amount` bigint(20) NOT NULL DEFAULT '0' COMMENT '已冻结的额度',
|
|||
|
|
`awaiting_amount` bigint(20) NOT NULL DEFAULT '0' COMMENT '待入账金额',
|
|||
|
|
`daily_balance` bigint(20) NOT NULL DEFAULT '0' COMMENT '日切可交易额度',
|
|||
|
|
`daily_frozen_amount` bigint(20) NOT NULL DEFAULT '0' COMMENT '日切已冻结额度',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
|
|||
|
|
`is_delete` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_aid_cid` (`account_id`,`channel_id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='账号-资金账户表,记录账户的资金信息';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_account_fund_awaiting`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_account_fund_awaiting`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_account_fund_awaiting` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|||
|
|
`account_id` bigint(20) NOT NULL COMMENT '账号id',
|
|||
|
|
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '帐户状态 0未入账 1已入账',
|
|||
|
|
`awaiting_amount` bigint(20) NOT NULL DEFAULT '0' COMMENT '待入账金额',
|
|||
|
|
`trade_no` varchar(50) NOT NULL,
|
|||
|
|
`channel_id` bigint(20) NOT NULL DEFAULT '2' COMMENT '支付渠道 Id(2:PayPal, 3:stripe, 默认为 2)',
|
|||
|
|
`to_balance_time` timestamp NULL DEFAULT NULL COMMENT '入账时间',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
|
|||
|
|
`is_delete` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='账号-资金账户表,记录账户的资金信息';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_account_fund_frozen`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_account_fund_frozen`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_account_fund_frozen` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '资金冻结记录id',
|
|||
|
|
`platform` varchar(20) DEFAULT NULL COMMENT '平台代码',
|
|||
|
|
`account_id` bigint(20) NOT NULL COMMENT '帐户的id',
|
|||
|
|
`account_name` varchar(255) NOT NULL COMMENT '账号名称(冗余)',
|
|||
|
|
`channel_bill_id` varchar(50) DEFAULT NULL COMMENT '关联渠道表流水ID',
|
|||
|
|
`trade_no` varchar(32) DEFAULT '' COMMENT '交易号',
|
|||
|
|
`amount` bigint(20) NOT NULL DEFAULT '0' COMMENT '冻结解冻的金额',
|
|||
|
|
`freeze_status` tinyint(4) DEFAULT '1' COMMENT '冻结状态:1冻结 2解冻',
|
|||
|
|
`freeze_date` timestamp NULL DEFAULT NULL COMMENT '冻结时间',
|
|||
|
|
`unfreeze_date` timestamp NULL DEFAULT NULL COMMENT '解冻时间',
|
|||
|
|
`freeze_type` int(10) DEFAULT NULL COMMENT '冻结类型',
|
|||
|
|
`account_fund_id` bigint(20) DEFAULT NULL COMMENT '资金账户id',
|
|||
|
|
`freeze_user_id` bigint(20) DEFAULT NULL COMMENT '冻结人id',
|
|||
|
|
`freeze_user_name` varchar(255) DEFAULT NULL COMMENT '冻结人名字',
|
|||
|
|
`unfreeze_user_id` bigint(20) DEFAULT NULL COMMENT '解冻人ID',
|
|||
|
|
`unfreeze_user_name` varchar(255) DEFAULT NULL COMMENT '解冻人名字',
|
|||
|
|
`remark` varchar(250) DEFAULT NULL COMMENT '备注',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
|
|||
|
|
`is_delete` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
KEY `idx_trade_no` (`trade_no`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='账户资金冻结解冻表(有状态)';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_account_fund_third`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_account_fund_third`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_account_fund_third` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|||
|
|
`account_id` bigint(20) NOT NULL COMMENT '账号id',
|
|||
|
|
`account_fund_id` bigint(20) unsigned DEFAULT '1' COMMENT '资金帐号ID',
|
|||
|
|
`app_type` varchar(30) NOT NULL DEFAULT '0' COMMENT '第三方类型 (1:google ,2:apple,3:stripe)',
|
|||
|
|
`open_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '第三方关联ID',
|
|||
|
|
`extend` varchar(2048) DEFAULT NULL COMMENT '扩展信息',
|
|||
|
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
|
|||
|
|
`is_delete` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
|
|||
|
|
`email` varchar(50) DEFAULT '' COMMENT '邮箱',
|
|||
|
|
`name` varchar(32) DEFAULT '' COMMENT '名称',
|
|||
|
|
`channel_id` varchar(30) DEFAULT NULL COMMENT '渠道 Id',
|
|||
|
|
`status` varchar(16) DEFAULT 'DISABLED' COMMENT '状态,DISABLED 未启用,ENABLED 启用',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_accountId_type` (`account_id`,`app_type`,`is_delete`,`channel_id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='账号-资金账户表,记录账户的资金信息';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_account_third_bind`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_account_third_bind`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_account_third_bind` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`account_third_id` bigint(20) NOT NULL,
|
|||
|
|
`bind_data_type` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '绑定资料类型',
|
|||
|
|
`bind_data_id` bigint(20) NOT NULL COMMENT '绑定资料id(对应各资料表id)',
|
|||
|
|
`third_open_id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '资料在三方的openId',
|
|||
|
|
`result` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT '',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
`is_delete` tinyint(4) NOT NULL DEFAULT '0',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_ati_bdt_bdi` (`account_third_id`,`bind_data_type`,`bind_data_id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_ati_toi` (`account_third_id`,`third_open_id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='三方绑定用户信息';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_call_channel_record`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_call_channel_record`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_call_channel_record` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`trade_no` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|||
|
|
`biz_type` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '业务类型',
|
|||
|
|
`channel` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支付渠道',
|
|||
|
|
`status` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '调用渠道状态( 0:初始化 ,1:处理中,2:成功 ,3:失败 4:取消 5未知 6已过期)',
|
|||
|
|
`amount` bigint(20) NOT NULL COMMENT '金额(单位:分)',
|
|||
|
|
`batch_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|||
|
|
`transaction_id` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '渠道交易号',
|
|||
|
|
`payment_url` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'web支付付款url',
|
|||
|
|
`result` varchar(4096) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|||
|
|
`last_check_time` timestamp NULL DEFAULT NULL COMMENT '最后一次查询时间',
|
|||
|
|
`next_check_time` timestamp NOT NULL COMMENT '下一次查询时间',
|
|||
|
|
`check_num` int(4) NOT NULL DEFAULT '0' COMMENT '已查询次数',
|
|||
|
|
`payer_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|||
|
|
`payer_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|||
|
|
`payer_email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|||
|
|
`disputed` tinyint(4) DEFAULT '0' COMMENT '是否发生了争议',
|
|||
|
|
`disputed_time` timestamp NULL DEFAULT NULL COMMENT '争议发生时间',
|
|||
|
|
`exp_time` timestamp NULL DEFAULT NULL COMMENT '渠道过期时间',
|
|||
|
|
`exchange_currency` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '换汇货币',
|
|||
|
|
`exchange_rate` decimal(12,6) DEFAULT NULL COMMENT '汇率美元兌其他',
|
|||
|
|
`exchange_amount` bigint(20) DEFAULT NULL COMMENT '换汇金额',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
KEY `idx_trade_no` (`trade_no`) USING BTREE,
|
|||
|
|
KEY `idx_transaction` (`transaction_id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=190 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='调用支付渠道记录';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_channel_bill`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_channel_bill`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_channel_bill` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|||
|
|
`platform` varchar(20) DEFAULT NULL COMMENT '平台代码',
|
|||
|
|
`channel_bill_id` varchar(50) NOT NULL COMMENT '渠道流水ID',
|
|||
|
|
`account_id` bigint(20) NOT NULL COMMENT '流水所属平台账号id',
|
|||
|
|
`account_name` varchar(255) NOT NULL COMMENT '账号名称(冗余)',
|
|||
|
|
`status` varchar(30) NOT NULL DEFAULT '1' COMMENT '渠道流水状态:参看BillStatus',
|
|||
|
|
`status_msg` varchar(1000) DEFAULT NULL COMMENT '状态说明;如失败和未知原因',
|
|||
|
|
`channel_id` varchar(50) NOT NULL COMMENT '渠道ID',
|
|||
|
|
`channel_name` varchar(255) NOT NULL COMMENT '渠道名称(冗余)',
|
|||
|
|
`submit_id` varchar(50) NOT NULL COMMENT '渠道提交编号(通道内唯一;如通道没有特别要求默认与主键相同)',
|
|||
|
|
`channel_sn` varchar(50) DEFAULT NULL COMMENT '渠道流水号(通道返回)',
|
|||
|
|
`capture_channel_sn` varchar(50) DEFAULT NULL COMMENT '交易确认流水号(通道返回,退款需要使用)',
|
|||
|
|
`channel_settle_date` timestamp NULL DEFAULT NULL COMMENT '渠道返回的对账日期',
|
|||
|
|
`des_account_no` varchar(255) NOT NULL COMMENT '通道账号 (如:银行卡号,支付宝账号,资金账号;根据des_account_type确定)',
|
|||
|
|
`des_account_name` varchar(255) NOT NULL COMMENT '通道账号姓名',
|
|||
|
|
`des_account_type` tinyint(4) DEFAULT NULL COMMENT '通道账号类型:0平台账号,1非平台账号',
|
|||
|
|
`payment_type_id` bigint(20) DEFAULT NULL COMMENT '支付方式ID',
|
|||
|
|
`biz_type` varchar(50) NOT NULL COMMENT '业务类型(参看枚举TradeBizType)',
|
|||
|
|
`biz_num` varchar(1000) NOT NULL COMMENT '业务编号(参看枚举TradeBizType)',
|
|||
|
|
`in_or_out` varchar(30) NOT NULL COMMENT '流水类型:1收入,2支出',
|
|||
|
|
`name` varchar(50) DEFAULT NULL COMMENT '流水标题或名称',
|
|||
|
|
`amount` bigint(20) NOT NULL DEFAULT '0' COMMENT '发生金额(分)',
|
|||
|
|
`occur_amount` bigint(20) DEFAULT NULL COMMENT '实际交易金额(分)',
|
|||
|
|
`fee` bigint(20) DEFAULT NULL COMMENT '手续费',
|
|||
|
|
`trade_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记账日(日切相关,对账时使用)',
|
|||
|
|
`remark` varchar(100) DEFAULT NULL COMMENT '备注',
|
|||
|
|
`is_delete` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_submit_id` (`submit_id`) USING BTREE,
|
|||
|
|
KEY `unique_biz_type_biz_num` (`biz_type`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='账号收支记录(流水)表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_charge`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_charge`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_charge` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`platform` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'iOS',
|
|||
|
|
`bundle_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用id',
|
|||
|
|
`product_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '内购商品项id',
|
|||
|
|
`charge_amount` bigint(20) NOT NULL COMMENT '充值金额',
|
|||
|
|
`pay_amount` bigint(20) NOT NULL COMMENT '支付金额',
|
|||
|
|
`gift_amount` bigint(20) DEFAULT NULL COMMENT '赠送金额',
|
|||
|
|
`biz_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '业务类型(HOT 热门标记、LARGE_PRODUCT 大额充送档位)',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
`is_delete` tinyint(1) NOT NULL DEFAULT '0',
|
|||
|
|
`version` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT '1',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_bi_pi` (`bundle_id`,`product_id`,`platform`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='苹果内购商品项';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_config`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_config`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_config` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|||
|
|
`value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|||
|
|
`desc` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '说明',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_key` (`key`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_google_record`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_google_record`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_google_record` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|||
|
|
`trade_no` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '交易号',
|
|||
|
|
`transaction_id` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Google内购系统交易id',
|
|||
|
|
`receipt_id` bigint(20) DEFAULT '0' COMMENT 'google_upload_receipt id',
|
|||
|
|
`bundle_id` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用名',
|
|||
|
|
`product_id` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '内购项',
|
|||
|
|
`result` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '返回结果',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_trade_no` (`trade_no`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_transaction_id` (`transaction_id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='Google内购交易处理记录';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_iap_record`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_iap_record`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_iap_record` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`trade_no` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
|||
|
|
`transaction_id` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '苹果内购系统交易id',
|
|||
|
|
`receipt_id` bigint(20) DEFAULT '0' COMMENT 'iap_upload_receipt id',
|
|||
|
|
`bundle_id` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用名',
|
|||
|
|
`product_id` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '内购项',
|
|||
|
|
`result` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_trade_no` (`trade_no`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_transaction_id` (`transaction_id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='苹果内购交易处理记录';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_pay_trade`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_pay_trade`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_pay_trade` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|||
|
|
`platform` varchar(20) DEFAULT NULL COMMENT '平台代码',
|
|||
|
|
`trade_no` varchar(50) NOT NULL COMMENT '交易号',
|
|||
|
|
`out_trade_no` varchar(50) NOT NULL COMMENT '外部交易号(如订单号)',
|
|||
|
|
`out_trade_no_relation_no` varchar(50) DEFAULT NULL COMMENT '外部交易号关联单号(如:打赏单号关联的游戏订单的订单号)',
|
|||
|
|
`name` varchar(200) NOT NULL COMMENT '交易标题或名称',
|
|||
|
|
`src_account_id` bigint(20) NOT NULL COMMENT '本方(发起方)账户(account .id)',
|
|||
|
|
`src_account_name` varchar(255) NOT NULL COMMENT '本方(发起方)账户名称',
|
|||
|
|
`des_account_no` varchar(255) NOT NULL COMMENT '收款方账号编号',
|
|||
|
|
`des_account_name` varchar(255) DEFAULT NULL COMMENT '对方(目标)账号-名称或姓名',
|
|||
|
|
`des_account_type` tinyint(4) DEFAULT '1' COMMENT '收款方账号类型:参看DesAccountType',
|
|||
|
|
`channel_id` varchar(50) DEFAULT NULL COMMENT '渠道ID',
|
|||
|
|
`channel_name` varchar(255) DEFAULT NULL COMMENT '渠道名称(冗余)',
|
|||
|
|
`channel_bill_id` varchar(50) DEFAULT NULL COMMENT '渠道流水id',
|
|||
|
|
`payment_type_id` varchar(50) DEFAULT NULL COMMENT '支付方式ID',
|
|||
|
|
`biz_type` varchar(50) NOT NULL COMMENT '交易业务分类(参看枚举TradeBizType)',
|
|||
|
|
`amount` bigint(20) unsigned NOT NULL COMMENT '交易金额,单位:分',
|
|||
|
|
`actual_amount` bigint(20) DEFAULT NULL COMMENT '用户实得金额,单位:分',
|
|||
|
|
`fee` bigint(20) DEFAULT '0' COMMENT '手续费',
|
|||
|
|
`gift_amount` bigint(20) DEFAULT '0' COMMENT '赠送金额',
|
|||
|
|
`promo_amount` bigint(20) DEFAULT '0' COMMENT '优惠金额',
|
|||
|
|
`occur_amount` bigint(20) unsigned DEFAULT NULL COMMENT '交易实际成交金额,单位:分',
|
|||
|
|
`status` varchar(30) NOT NULL COMMENT '交易状态 1待付款 2已付款 3处理中 4交易成功 5交易关闭 6退款中 7已退款',
|
|||
|
|
`pay_time` timestamp NULL DEFAULT NULL COMMENT '付款时间',
|
|||
|
|
`finish_time` timestamp NULL DEFAULT NULL COMMENT '交易结束时间',
|
|||
|
|
`close_time` timestamp NULL DEFAULT NULL COMMENT '交易关闭时间',
|
|||
|
|
`status_in_time` timestamp NULL DEFAULT NULL COMMENT '当前状态流入时间',
|
|||
|
|
`is_complete` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否完成交易',
|
|||
|
|
`remark` varchar(100) DEFAULT NULL COMMENT '备注',
|
|||
|
|
`payment_trade_no` varchar(50) DEFAULT NULL COMMENT '充值后支付交易号',
|
|||
|
|
`resource_key` varchar(50) NOT NULL DEFAULT '' COMMENT '资源key',
|
|||
|
|
`resource_num` int(11) NOT NULL DEFAULT '0' COMMENT '资源数量, 0表示无限制',
|
|||
|
|
`notify_url` varchar(256) DEFAULT NULL COMMENT '交易异步通知url',
|
|||
|
|
`version` bigint(20) NOT NULL DEFAULT '1' COMMENT '乐观锁',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
`is_delete` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
|
|||
|
|
`extend` longtext COMMENT '订单扩展信息(json 扩展字段)',
|
|||
|
|
`coin_type` varchar(20) DEFAULT NULL COMMENT '提现币类型 BUFF E-COIN',
|
|||
|
|
`error_message` varchar(2000) DEFAULT NULL,
|
|||
|
|
`ip` varchar(255) DEFAULT NULL,
|
|||
|
|
`standbox` int(11) DEFAULT NULL,
|
|||
|
|
`product_id` varchar(60) DEFAULT NULL COMMENT '产品Id',
|
|||
|
|
`client_version` varchar(255) DEFAULT NULL COMMENT '客户端版本号',
|
|||
|
|
`third_fee` bigint(11) DEFAULT NULL COMMENT '三方费用',
|
|||
|
|
`platform_fee` bigint(11) DEFAULT NULL COMMENT '平台费用',
|
|||
|
|
`pay_method` varchar(80) DEFAULT NULL COMMENT '支付方式',
|
|||
|
|
`evidence` text COMMENT '购买证据',
|
|||
|
|
`exchange_occur_amount` bigint(11) DEFAULT NULL COMMENT '换汇发生金额',
|
|||
|
|
`exchange_occur_currency` varchar(255) DEFAULT NULL COMMENT '换汇货币',
|
|||
|
|
`exchange_product_amount` bigint(11) DEFAULT NULL COMMENT '换汇原始BUFF金额',
|
|||
|
|
`exchange_fee` bigint(11) DEFAULT NULL COMMENT '换汇手续费',
|
|||
|
|
`exchange_rate` decimal(12,6) DEFAULT NULL COMMENT '汇率美元兌其他',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_trade_no` (`trade_no`) USING BTREE,
|
|||
|
|
UNIQUE KEY `uk_trade_platform_outTradeNo` (`platform`,`out_trade_no`) USING BTREE,
|
|||
|
|
KEY `idx_resource_key` (`resource_key`) USING BTREE,
|
|||
|
|
KEY `idx_status` (`status`) USING BTREE,
|
|||
|
|
KEY `idx_src_uid` (`src_account_id`) USING BTREE,
|
|||
|
|
KEY `idx_des_account` (`des_account_no`) USING BTREE,
|
|||
|
|
KEY `idx_biz_type` (`biz_type`) USING BTREE,
|
|||
|
|
KEY `idx_out_tn` (`out_trade_no`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3970 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='交易业务主表(有状态)';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_processing_charge`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_processing_charge`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_processing_charge` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|||
|
|
`call_channel_record_id` bigint(20) DEFAULT NULL COMMENT '渠道调用ID',
|
|||
|
|
`trade_no` varchar(60) DEFAULT NULL COMMENT 'trade_no',
|
|||
|
|
`pay_channel` varchar(30) DEFAULT NULL COMMENT '渠道Id',
|
|||
|
|
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`next_hand_time` timestamp NULL DEFAULT NULL COMMENT '下次处理时间',
|
|||
|
|
`hand_count` int(11) DEFAULT '0' COMMENT '处理次数',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
KEY `_idx_t_processing_charge_pay_channel` (`pay_channel`) USING BTREE,
|
|||
|
|
KEY `_idx_t_processing_charge_pay_channel_create_time` (`pay_channel`,`create_time`) USING BTREE,
|
|||
|
|
KEY `_idx_t_processing_charge_trade_no_pay_channel` (`trade_no`,`pay_channel`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=94 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='充值待处理表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_processing_dispute`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_processing_dispute`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_processing_dispute` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|||
|
|
`dispute_id` varchar(60) DEFAULT NULL COMMENT '争议Id',
|
|||
|
|
`buyer_transaction_id` varchar(60) DEFAULT NULL COMMENT '买家交易ID',
|
|||
|
|
`seller_transaction_id` varchar(60) DEFAULT NULL COMMENT '卖家交易ID',
|
|||
|
|
`status` tinyint(4) DEFAULT '0' COMMENT '处理状态(0 待处理,2 失败)',
|
|||
|
|
`error` longtext COMMENT '异常内容',
|
|||
|
|
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`edit_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '编辑时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='争议待处理表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_processing_withdraw`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_processing_withdraw`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_processing_withdraw` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|||
|
|
`call_channel_record_id` bigint(20) DEFAULT NULL COMMENT '渠道调用ID',
|
|||
|
|
`trade_no` varchar(60) DEFAULT NULL COMMENT 'trade_no',
|
|||
|
|
`pay_channel` bigint(20) DEFAULT NULL COMMENT '渠道Id',
|
|||
|
|
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
`next_hand_time` timestamp NULL DEFAULT NULL COMMENT '下次处理时间',
|
|||
|
|
`hand_count` int(11) DEFAULT '0' COMMENT '处理次数',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='充值待处理表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_processing_withdraw_review`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_processing_withdraw_review`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_processing_withdraw_review` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|||
|
|
`trade_id` bigint(20) DEFAULT NULL COMMENT 'trade_id',
|
|||
|
|
`trade_no` varchar(60) DEFAULT NULL COMMENT 'trade_no',
|
|||
|
|
`pay_channel` bigint(20) DEFAULT NULL COMMENT '渠道Id',
|
|||
|
|
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='提现审核待处理表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `t_withdraw_request`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `t_withdraw_request`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `t_withdraw_request` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`platform` varchar(255) DEFAULT NULL,
|
|||
|
|
`status` int(20) NOT NULL,
|
|||
|
|
`out_trade_no` varchar(255) DEFAULT NULL,
|
|||
|
|
`name` varchar(255) DEFAULT NULL,
|
|||
|
|
`src_account_id` bigint(20) DEFAULT NULL,
|
|||
|
|
`src_account_name` varchar(255) DEFAULT NULL,
|
|||
|
|
`des_account_no` varchar(255) DEFAULT NULL,
|
|||
|
|
`des_account_name` varchar(255) DEFAULT NULL,
|
|||
|
|
`des_account_type` bigint(20) DEFAULT NULL,
|
|||
|
|
`pay_channel` varchar(255) DEFAULT NULL,
|
|||
|
|
`amount` bigint(20) NOT NULL,
|
|||
|
|
`remark` varchar(255) DEFAULT NULL,
|
|||
|
|
`coin_type` varchar(255) NOT NULL,
|
|||
|
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|||
|
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `user_subscribe_log`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `user_subscribe_log`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `user_subscribe_log` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`platform` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'PAYPAL, IOS, GOOGLE',
|
|||
|
|
`user_id` bigint(20) NOT NULL COMMENT '用户Id',
|
|||
|
|
`org_user_id` bigint(20) DEFAULT NULL COMMENT '原来的用户ID(存储本次切换绑定时的上一个订阅绑定用户是谁)',
|
|||
|
|
`member_type` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'VIP , SVIP',
|
|||
|
|
`period` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '周期 DAY,MONTH,QUARTER,YEAR',
|
|||
|
|
`product_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '内购商品项id',
|
|||
|
|
`subscription_id` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '订阅ID号',
|
|||
|
|
`buff` bigint(20) NOT NULL COMMENT '充值金额',
|
|||
|
|
`pay_amount` bigint(20) NOT NULL COMMENT '支付金额',
|
|||
|
|
`app_store_amount` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商店抽成',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=172 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='用户订阅日志';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `user_subscription`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `user_subscription`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `user_subscription` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`platform` varchar(20) NOT NULL COMMENT 'PAYPAL , IOS , GOOGLE ',
|
|||
|
|
`user_id` bigint(20) NOT NULL COMMENT 'user_id',
|
|||
|
|
`subscription_id` varchar(64) NOT NULL COMMENT 'subscription_id',
|
|||
|
|
`product_id` varchar(100) NOT NULL COMMENT '产品Id',
|
|||
|
|
`price_type` varchar(100) DEFAULT NULL,
|
|||
|
|
`status` varchar(32) DEFAULT NULL COMMENT '三方状态',
|
|||
|
|
`auto_renew_status` tinyint(4) DEFAULT '1' COMMENT '三方自动续期状态',
|
|||
|
|
`member_type` varchar(16) NOT NULL DEFAULT 'VIP',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`refund_time_ms` bigint(20) DEFAULT NULL,
|
|||
|
|
`purchase_time` timestamp NULL DEFAULT NULL COMMENT '购买时间',
|
|||
|
|
`exp_time` timestamp NULL DEFAULT NULL COMMENT '到期时间',
|
|||
|
|
`purchase_token` varchar(200) DEFAULT NULL COMMENT 'GOOGLE TOKEN',
|
|||
|
|
`ip` varchar(200) DEFAULT NULL COMMENT 'IP地址',
|
|||
|
|
`remind` tinyint(10) DEFAULT NULL COMMENT '是否已经提醒',
|
|||
|
|
`exp_notify` tinyint(10) DEFAULT '0' COMMENT '是否已发送到期提醒通知',
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '编辑时间',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
UNIQUE KEY `_uqe_user_subscription_user_id` (`user_id`),
|
|||
|
|
KEY `_idx_user_subscription_sub_id` (`subscription_id`)
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
|
|||
|
|
--
|
|||
|
|
-- Table structure for table `user_subscription_notify`
|
|||
|
|
--
|
|||
|
|
|
|||
|
|
DROP TABLE IF EXISTS `user_subscription_notify`;
|
|||
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|||
|
|
/*!40101 SET character_set_client = utf8 */;
|
|||
|
|
CREATE TABLE `user_subscription_notify` (
|
|||
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|||
|
|
`platform` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'PAYPAL , IOS , GOOGLE ',
|
|||
|
|
`content` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '通知内容',
|
|||
|
|
`type` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '通知类型',
|
|||
|
|
`message_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|||
|
|
`subscription_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '通知Id',
|
|||
|
|
`apple_refund_record_id` bigint(20) DEFAULT NULL,
|
|||
|
|
`status` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '处理状态(未处理 默认, 已经处理)',
|
|||
|
|
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|||
|
|
`edit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|||
|
|
`extend` longtext COLLATE utf8mb4_unicode_ci COMMENT '扩展字段',
|
|||
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|||
|
|
KEY `idx_ptf_status_time` (`platform`,`status`,`create_time`) USING BTREE,
|
|||
|
|
KEY `idx_sn_msg_id` (`message_id`) USING BTREE
|
|||
|
|
) ENGINE=InnoDB AUTO_INCREMENT=341 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='订阅回调记录表';
|
|||
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|||
|
|
/*!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 2025-11-13 2:22:18
|