-- 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 '用户头像',
  `coin_num`   varchar(256) NOT NULL DEFAULT '' COMMENT '角色金币',
  `diamond_num`   bigint NOT NULL DEFAULT '0' COMMENT '角色钻石',
  `energy` 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 '修改时间',
  `collect_status` int(11) NOT NULL DEFAULT '0'COMMENT '收藏状态(0:未领取,1:已领取)',
  `kefu_status`  int(11)  NOT NULL DEFAULT '0' COMMENT '客服奖励状态(0:未领取,1:已领取)',
  `pass_status` int(11) NOT NULL DEFAULT '0'COMMENT '浮窗状态(0:未领取,1:已领取)',
  `sign_sum`   int(11)    NOT NULL DEFAULT '0' COMMENT '签到总天数',
  `pass`  int(11) NOT NULL DEFAULT '0' COMMENT '当前关卡',
  `buy_data` mediumblob NOT NULL COMMENT '购买次数信息',
  `tank_data` mediumblob NOT NULL COMMENT '坦克信息',
  `daily_reward` int(11) NOT NULL DEFAULT '0' COMMENT '每日奖励次数',
  `cumul_coin`  varchar(256) NOT NULL DEFAULT '' COMMENT '累计金币',
  `off_time`   int(11) NOT NULL DEFAULT '0' COMMENT '离线时间',
  `battlecount` int(11) NOT NULL DEFAULT '0' COMMENT '战斗次数',
  `invite_status` int(11) NOT NULL DEFAULT '0' COMMENT '邀请奖励状态',
  `life_times` 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 `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_id` int(11) NOT NULL DEFAULT '0' COMMENT '补签id',
  `signable` 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 '修改时间',
  `sign_time` int(11) NOT NULL DEFAULT '0' COMMENT '签到时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `account_sign_id` (`accountid`, `sign_id`)
) 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;


--
-- 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_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 `quest_uuid` (`accountid`, `quest_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Table structrure for table `try_play`
--

DROP TABLE IF EXISTS `try_play`;
/*!40101 SET @saved_cs_client     = @@character_set_client*/;
/*!40101 SET character_set_client = utf8*/;
CREATE TABLE `try_play` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
  `appid` varchar(60) NOT NULL DEFAULT '0' COMMENT 'appid',
  `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 `try_uuid` (`accountid`, `appid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


--
-- Table structrure for table `daily_reward`
--

DROP TABLE IF EXISTS `daily_reward`;
/*!40101 SET @saved_cs_client     = @@character_set_client*/;
/*!40101 SET character_set_client = utf8*/;
CREATE TABLE `daily_reward` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
  `free_coin_time`  int(11) NOT NULL DEFAULT '0' COMMENT '免费金币次数',
  `free_jewel_time` int(11) NOT NULL DEFAULT '0' COMMENT '免费钻石次数',
  `free_power_time` 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`)
) 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 2019-09-23 11:45:22
