
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for recharge_all
-- ----------------------------
DROP TABLE IF EXISTS `recharge_all`;
CREATE TABLE `recharge_all`  (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `order_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '订单号',
  `role_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '角色id',
  `rolename` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '角色名',
  `uid` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '玩家游戏账号',
  `charge_time` int(11) NULL DEFAULT 0 COMMENT '时间戳(充值时间)',
  `charge_currency` int(11) NULL DEFAULT 0 COMMENT '游戏币总数(物品总数)',
  `money` int(11) NULL DEFAULT 0 COMMENT '充值的人民币(分)',
  `currency_type` tinyint(4) NULL DEFAULT 1 COMMENT '币种类型',
  `level` int(11) NULL DEFAULT 0 COMMENT '充值等级',
  `channel` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '充值渠道名称',
  `type` int(11) NULL DEFAULT 1 COMMENT '充值类型(1:正常充值,2:充值测试,3:发放福利)',
  `status` tinyint(4) NULL DEFAULT 1 COMMENT '1:成功,2:角色不存在,3:失败',
  `last_update_time` int(11) NULL DEFAULT 0 COMMENT '默认值等于charge_time',
  `oldsrvid` int(10) UNSIGNED NULL DEFAULT 0,
  `arg1` int(10) UNSIGNED NULL DEFAULT 0,
  `arg2` int(10) UNSIGNED NULL DEFAULT 0,
  `arg3` int(10) UNSIGNED NULL DEFAULT 0,
  `arg4` int(10) UNSIGNED NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `last_update_time`(`last_update_time`) USING BTREE,
  INDEX `order_id`(`order_id`) USING BTREE,
  INDEX `role_id`(`role_id`, `rolename`, `uid`) USING BTREE,
  INDEX `channel`(`channel`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for role_all
-- ----------------------------
DROP TABLE IF EXISTS `role_all`;
CREATE TABLE `role_all`  (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `type` int(11) NULL DEFAULT 0 COMMENT '上报类型',
  `uid` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '用户帐号ID',
  `role_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '角色ID',
  `log_time` int(11) NULL DEFAULT 0 COMMENT '上报时间戳',
  `ip` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '请求ip地址',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `log_time`(`log_time`) USING BTREE,
  INDEX `uid`(`uid`, `role_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
