game2002api/sql/gamedb.sql
2019-07-26 11:51:04 +08:00

267 lines
12 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.

-- MySQL dump 10.14 Distrib 5.5.41-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: accountdb
-- ------------------------------------------------------
-- Server version 5.5.41-MariaDB
/*!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 utf8 */;
/*!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 `version`
--
DROP TABLE IF EXISTS `version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `version` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`version` int(11) NOT NULL DEFAULT '0' COMMENT '版本号',
PRIMARY KEY (`idx`),
UNIQUE KEY `version` (`version`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`user_name` tinyblob COMMENT '用户名字',
`avatar_url` varchar(256) NOT NULL DEFAULT '' COMMENT '用户头像',
`game_times` int(11) NOT NULL DEFAULT '0' COMMENT '游戏场次',
`win_times` int(11) NOT NULL DEFAULT '0' COMMENT '胜场',
`kills` int(11) NOT NULL DEFAULT '0' COMMENT '所有击杀',
`harm` int(11) NOT NULL DEFAULT '0' COMMENT '所有伤害',
`score` bigint NOT NULL DEFAULT '0' COMMENT '积分',
`coin_num` bigint NOT NULL DEFAULT '0' COMMENT '角色金币',
`diamond_num` bigint NOT NULL DEFAULT '0' COMMENT '角色钻石',
`kill_his` int(11) NOT NULL DEFAULT '0' COMMENT '最高击杀',
`harm_his` int(11) NOT NULL DEFAULT '0' COMMENT '最高伤害',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
`first_fight` int(11) NOT NULL DEFAULT '0' COMMENT '是否是第一次战斗',
`collect_status` int(11) NOT NULL DEFAULT '0' COMMENT '收藏状态',
`keys_num` int(11) NOT NULL DEFAULT '0' COMMENT '钥匙数量',
`battle_re_times` int(11) NOT NULL DEFAULT '0' COMMENT '每日战斗奖励次数',
`shop_flush_times` int(11) NOT NULL DEFAULT '0' COMMENT '每日商店刷新次数',
`kefu_status` int(11) NOT NULL DEFAULT '0' COMMENT '客服奖励状态(0:未领取,1:已领取)',
`free_getbox` int(11) NOT NULL DEFAULT '0' COMMENT '每日免费获得宝箱次数',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `commander`
--
DROP TABLE IF EXISTS `commander`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `commander` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`commander_id` int(11) NOT NULL DEFAULT '0' COMMENT '指挥官id',
`commander_status` int(11) NOT NULL DEFAULT '0' COMMENT '指挥官状态0:上阵中,1:已获得,2:未获得)',
`fragment_id` int(11) NOT NULL DEFAULT '0' COMMENT '碎片id',
`fragment_num` int(11) NOT NULL DEFAULT '0' COMMENT '碎片数量',
`commander_type` int(11) NOT NULL DEFAULT '0' COMMENT '指挥官类型',
`commander_level` int(11) NOT NULL DEFAULT '0' COMMENT '指挥官等级',
`experience_level` int(11) NOT NULL DEFAULT '0' COMMENT '指挥官体验等级',
`active_time` varchar(50) NOT NULL DEFAULT '' COMMENT '有效时间',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `commander_uuid` (`accountid`, `commander_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `tank`
--
DROP TABLE IF EXISTS `tank`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tank` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`tank_id` int(11) NOT NULL DEFAULT '0' COMMENT '坦克id',
`tank_status` int(11) NOT NULL DEFAULT '0' COMMENT '坦克状态0:上阵中,1:已获得,2:未获得)',
`tank_level` int(11) NOT NULL DEFAULT '0' COMMENT '坦克等级',
`fragment_id` int(11) NOT NULL DEFAULT '0' COMMENT '碎片id',
`fragment_num` int(11) NOT NULL DEFAULT '0' COMMENT '碎片数量',
`experience_level` int(11) NOT NULL DEFAULT '0' COMMENT '坦克体验等级',
`experience_type` int(11) NOT NULL DEFAULT '0' COMMENT '坦克体验类型',
`active_time` varchar(50) NOT NULL DEFAULT '' COMMENT '有效时间',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `tank_uuid` (`accountid`, `tank_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `skin`
--
DROP TABLE IF EXISTS `skin`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `skin` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤id',
`skin_status` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤状态0:上阵中,1:已获得,2:未获得)',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `skin_uuid` (`accountid`, `skin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `sign`
--
DROP TABLE IF EXISTS `sign`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sign` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`sign_days` int(11) NOT NULL DEFAULT '0' COMMENT '已签天数',
`sign_time` int(50) NOT NULL DEFAULT '0' COMMENT '签到时间',
`item_id` varchar(50) NOT NULL DEFAULT '' COMMENT '奖励物品id',
`item_num` varchar(50) NOT NULL DEFAULT '' COMMENT '奖励物品数量',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `hang`
--
DROP TABLE IF EXISTS `hang`;
/*!40101 SET @saved_cs_client = @@character_set_client*/;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `hang` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`hang_time` varchar(50) NOT NULL DEFAULT '' COMMENT '领取时间',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structrure for table `quest`
--
DROP TABLE IF EXISTS `quest`;
/*!40101 SET @saved_cs_client = @@character_set_client*/;
/*!40101 SET character_set_client = utf8*/;
CREATE TABLE `quest` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`quest_id` int(11) NOT NULL DEFAULT '0' COMMENT '任务id',
`quest_num` int(11) NOT NULL DEFAULT '0' COMMENT '任务进度',
`quest_type` int(11) NOT NULL DEFAULT '0' COMMENT '任务类型',
`quest_state` int(11) NOT NULL DEFAULT '0' COMMENT '任务状态',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `quest_uuid` (`accountid`, `quest_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structrure for table `active`
--
DROP TABLE IF EXISTS `active`;
/*!40101 SET @saved_cs_client = @@character_set_client*/;
/*!40101 SET character_set_client = utf8*/;
CREATE TABLE `active` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`active_num` int(11) NOT NULL DEFAULT '0' COMMENT '日活跃度',
`num_time` varchar(50) NOT NULL DEFAULT '' COMMENT '日活跃度时间',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structrure for table `history_record`
--
DROP TABLE IF EXISTS `history_record`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `history_record`(
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`room_uuid` varchar(60) NOT NULL DEFAULT '' COMMENT '战斗id',
`map_id` int(11) NOT NULL DEFAULT '0' COMMENT '地图id',
`map_tpl_name` varchar(50) NOT NULL DEFAULT '' COMMENT '地图模板名字',
`map_name` varchar(50) NOT NULL DEFAULT '' COMMENT '地图名字',
`game_time` int(11) NOT NULL DEFAULT '0' COMMENT '游戏完成时间',
`rank` int(11) NOT NULL DEFAULT '0' COMMENT '游戏排名',
`kills` int(11) NOT NULL DEFAULT '0' COMMENT '游戏击杀',
`harms` int(11) NOT NULL DEFAULT '0' COMMENT '游戏伤害',
`hurts` int(11) NOT NULL DEFAULT '0' COMMENT '承受伤害',
`coin` bigint NOT NULL DEFAULT '0' COMMENT '战斗结算金币',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '结算金币领取状态',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `history_record_uuid` (`accountid`, `room_uuid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `share_achievement`
--
DROP TABLE IF EXISTS `share_achievement`;
/*!40101 SET @saved_cs_client = @@character_set_client*/;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `share_achievement` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`ach_id` int(11) NOT NULL DEFAULT '0' COMMENT '分享邀请成就id',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '状态(0:未领取,1:已领取)',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid_ach_id` (`accountid`, `ach_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!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 2015-08-19 18:51:22