game2002api/sql/gamedb.sql
wangwei01 0bd95356b7 1
2019-07-08 15:01:32 +08:00

273 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 COMMENT '游戏场次',
`win_times` int(11) NOT NULL COMMENT '胜场',
`kills` int(11) NOT NULL COMMENT '所有击杀',
`harm` int(11) NOT NULL COMMENT '所有伤害',
`add_HP` int(11) NOT NULL COMMENT '所有治疗量',
`alive_time` int(11) NOT NULL COMMENT '所有生存时间',
`coin_num` bigint NOT NULL COMMENT '角色金币',
`integral` bigint NOT NULL COMMENT '角色积分',
`kill_his` int(11) NOT NULL COMMENT '最高击杀',
`alive_time_his` int(11) NOT NULL COMMENT '最长生存时间',
`harm_his` int(11) NOT NULL COMMENT '最高伤害',
`add_HP_his` int(11) NOT NULL COMMENT '最多治疗量',
`act_share_status` int(11) NOT NULL COMMENT '分享好礼活动状态',
`act_share_time` int(11) NOT NULL COMMENT '分享好礼活动时间',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
`first_fight` int(11) NOT NULL COMMENT '是否是第一次战斗',
`collect_status` int(11) NOT NULL COMMENT '收藏状态',
`keys_num` int(11) NOT NULL COMMENT '钥匙数量',
`battle_re_times` int(11) NOT NULL COMMENT '每日战斗奖励次数',
`shop_flush_times` int(11) NOT NULL COMMENT '每日商店刷新次数',
`kefu_status` int(11) NOT NULL COMMENT '客服奖励状态(0:未领取,1:已领取)',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid` (`accountid`)
) 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 COMMENT '皮肤id',
`skin_status` int(11) NOT NULL COMMENT '皮肤状态0:上阵中,1:已获得)',
`fragment_id` int(11) NOT NULL COMMENT '碎片id',
`fragment_num` int(11) NOT NULL COMMENT '碎片数量',
`active_time` varchar(50) NOT NULL DEFAULT '有效时间(体验时间)',
`fragment_status` int(11) NOT NULL COMMENT '碎片收集状态(活动相关)',
`skin_type` int(11) NOT NULL COMMENT '皮肤类型',
`skin_level` int(11) NOT NULL COMMENT '皮肤等级',
`skin_experience_level` int(11) NOT NULL COMMENT '皮肤体验等级',
`skin_experience_type` int(11) NOT NULL COMMENT '皮肤试用类型(0:没试用,1:皮肤体验,2:满级体验)',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL 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 `equip`
--
DROP TABLE IF EXISTS `equip`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `equip` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`equip_id` int(11) NOT NULL COMMENT '装备id',
`equip_level` int(11) NOT NULL COMMENT '装备等级',
`equip_experience_level` int(11) NOT NULL COMMENT '装备体验等级',
`active_time` varchar(50) NOT NULL DEFAULT '有效时间',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `equip_uuid` (`accountid`, `equip_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
--
-- Table structure for table `supplybox`
--
DROP TABLE IF EXISTS `supplybox`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `supplybox` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`box_id` int(11) NOT NULL COMMENT '补给箱id',
`buy_times` int(11) NOT NULL COMMENT '购买次数',
`free_times` int(11) NOT NULL COMMENT '免费获得次数',
`last_buy_time` varchar(50) NOT NULL DEFAULT '最后一次购买',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `box_uuid` (`accountid`, `box_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 COMMENT '已签天数',
`sign_time` varchar(50) NOT NULL DEFAULT '签到时间',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL 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 '领取时间',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL 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 COMMENT '任务id',
`quest_num` int(11) NOT NULL COMMENT '任务进度',
`quest_type` int(11) NOT NULL COMMENT '任务类型',
`quest_state` int(11) NOT NULL COMMENT '任务状态',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL 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 COMMENT '日活跃度',
`num_time` varchar(50) NOT NULL DEFAULT '日活跃度时间',
`active_sum` int(11) NOT NULL COMMENT '周活跃度',
`sum_time` varchar(50) NOT NULL DEFAULT '周活跃度时间',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL 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 COMMENT '地图id',
`map_tpl_name` varchar(50) NOT NULL DEFAULT '' COMMENT '地图模板名字',
`map_name` varchar(50) DEFAULT '' COMMENT '地图名字',
`game_time` int(11) NOT NULL COMMENT '游戏完成时间',
`rank` int(11) NOT NULL COMMENT '游戏排名',
`kills` int(11) NOT NULL COMMENT '游戏击杀',
`harms` int(11) NOT NULL COMMENT '游戏伤害',
`hurts` int(11) NOT NULL COMMENT '承受伤害',
`alive_time` int(11) NOT NULL COMMENT '游戏生存时间',
`coin` bigint NOT NULL COMMENT '战斗结算金币',
`status` int(11) NOT NULL COMMENT '结算金币领取状态',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL 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 COMMENT '分享邀请成就id',
`status` int(11) NOT NULL COMMENT '状态(0:未领取,1:已领取)',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL 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