-- MySQL dump 10.14  Distrib 5.5.41-MariaDB, for Linux (x86_64)
--
-- Host: localhost    Database: accountdb
-- ------------------------------------------------------
-- Server version	5.5.41-MariaDB

--
-- 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 '所有伤害',
  `add_HP`     int(11) NOT NULL DEFAULT '0' COMMENT '所有治疗量',
  `alive_time` int(11) NOT NULL DEFAULT '0' COMMENT '所有生存时间',
  `coin_num`   bigint NOT NULL COMMENT '角色金币',
  `integral`   bigint NOT NULL COMMENT '角色积分',
  `kill_his`   int(11) NOT NULL DEFAULT '0' COMMENT '最高击杀',
  `alive_time_his` int(11) NOT NULL DEFAULT '0' COMMENT '最长生存时间',
  `harm_his`   int(11) NOT NULL DEFAULT '0' COMMENT '最高伤害',
  `add_HP_his` int(11) NOT NULL DEFAULT '0' COMMENT '最多治疗量',
  `act_share_status` int(11) NOT NULL DEFAULT '0' COMMENT '分享好礼活动状态',
  `act_share_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 '修改时间',
  `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:已领取)',
  `sign_sum`   int(11)    NOT NULL DEFAULT '0' COMMENT '签到总天数',
  `box_num`  int(11) NOT NULL DEFAULT '0' COMMENT '空投宝箱数量',
  `diamond_num` bigint NOT NULL DEFAULT '0' COMMENT '钻石数量',
  `diamond_shop_flush_times` int(11) NOT NULL DEFAULT '0' COMMENT '每日钻石商店刷新次数',
  `pass_status` int(11) NOT NULL DEFAULT '0' COMMENT '周奖励状态',
  `score`     int(11) NOT NULL DEFAULT '0' COMMENT '通行证积分',
  `season_status` int(11) NOT NULL DEFAULT '0' COMMENT '赛季奖励状态',
  `first_gift` int(11) NOT NULL DEFAULT '0' COMMENT '首充礼包领取状态',
  `season_time` int(11) NOT NULL DEFAULT '0' COMMENT '赛季结束时间',
  `free_coin`    int(11) NOT NULL DEFAULT '0' COMMENT '每日免费金币',
  `free_diamond` int(11) NOT NULL DEFAULT '0' COMMENT '每日免费钻石',
  `season_end_score` int(11) NOT NULL DEFAULT '0' COMMENT '赛季结算积分',
  `kill_modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '击杀更新时间',
  `win_modifytime`  int(11) NOT NULL DEFAULT '0' COMMENT '胜场更新时间',
  `rank_modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '排位积分更新时间',
  `vip_score`  int(11)  NOT NULL DEFAULT '0' COMMENT 'vip积分',
  `first_login` int(11) NOT NULL DEFAULT '0' COMMENT '是否第一次登陆',
  `daily_first_login` int(11) NOT NULL DEFAULT '0' COMMENT '每天是否第一次登陆',
  `daily_time` int(11) NOT NULL DEFAULT '0' COMMENT '每日刷新时间',
  `free_box` int(11) NOT NULL DEFAULT '0' COMMENT '每日免费宝箱',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '刷新活动时间',
  `season_games` int(11) NOT NULL DEFAULT '0' COMMENT '赛季场次总数',
  `season_win`   int(11) NOT NULL DEFAULT '0' COMMENT '赛季胜利场次',
  `sea_max_kill` int(11) NOT NULL DEFAULT '0' COMMENT '赛季最高击杀',
  `sea_max_hart` int(11) NOT NULL DEFAULT '0' COMMENT '赛季最高伤害',
  `sea_avg_kill` int(11) NOT NULL DEFAULT '0' COMMENT '赛季场均淘汰',
  `free_lot_ticket` int(11) NOT NULL DEFAULT '0' COMMENT '免费抽奖券',
  `free_dou_lot_ticket` int(11) NOT NULL DEFAULT '0' COMMENT '免费十倍抽奖券',
  `daily_order1` int(11) NOT NULL DEFAULT '0' COMMENT '每日免费宝箱1',
  `daily_order2` int(11) NOT NULL DEFAULT '0' COMMENT '每日免费宝箱2',
  `daily_order3` int(11) NOT NULL DEFAULT '0' COMMENT '每日免费宝箱3',
  `first_bee`    int(11) NOT NULL DEFAULT '0' COMMENT '首次蜜蜂抽奖',
  `newhand`      int(11) NOT NULL DEFAULT '0' COMMENT '新手奖励状态',
  `coin_times`   int(11) NOT NULL DEFAULT '0' COMMENT '每日兑换金币次数',
  `newInfo`      mediumblob NOT NULL COMMENT '新手引导信息',
  `first_day_ad` int(11) NOT NULL DEFAULT '0' COMMENT '每日看广告次数',
  `share_video_times` int(11) NOT NULL DEFAULT '0' COMMENT '每日分享视频次数',
  `act_video_status` int(11) NOT NULL DEFAULT '0' COMMENT '分享录频奖励领取状态',
  `act_ad_status` int(11) NOT NULL DEFAULT '0' COMMENT '观看广告奖励领取状态',
  `share_video_sums` int(11) NOT NULL DEFAULT '0' COMMENT '分享录频次数',
  `biogame_times` int(11) NOT NULL DEFAULT '0' COMMENT '生化模式场次',
  `shop_view_times` int(11) NOT NULL DEFAULT '0' COMMENT '商店看广告次数',
  `new_first_equip` int(11) NOT NULL DEFAULT '0' COMMENT '新玩家结算武器',
  `newhand2` int(11) NOT NULL DEFAULT '0' COMMENT '精英礼包领取状态',
  `game_times2` int(11) NOT NULL DEFAULT '0' COMMENT '精英礼包战斗场次',
  `view_times2` int(11) NOT NULL DEFAULT '0' COMMENT '精英礼包视频场次',
  `guildcoin_num` int(11) NOT NULL DEFAULT '0' COMMENT '战队货币',
  `new_second_equip` int(11) NOT NULL DEFAULT '2' COMMENT '新玩家隔天结算武器',
  `sum_coin` double NOT NULL DEFAULT '0' COMMENT '累计充值金额',
  `recharge_times_total` int(11) NOT NULL DEFAULT '0' COMMENT '累计充值次数',

  /*
  `rmb_num` int(11) NOT NULL DEFAULT '0' COMMENT '点券数量',
  `max_single_recharge` int(11) NOT NULL DEFAULT '0' COMMENT '最大单次充值数量',
  `passcard` 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 `bag`
--

DROP TABLE IF EXISTS `bag`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bag` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
  `id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
  `color_id` int(11) NOT NULL DEFAULT '0' COMMENT '颜色id',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态（0:上阵中,1:已获得,2:未获得）',
  `active_time` varchar(50) NOT NULL DEFAULT '' COMMENT '有效时间（体验时间）',
  `num` 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 `item_uuid` (`accountid`, `id`),
  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`),
  KEY `accountid` (`accountid`),
  UNIQUE KEY `account_sign_id` (`accountid`, `sign_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_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`),
  KEY `accountid` (`accountid`),
  UNIQUE KEY `quest_uuid` (`accountid`, `quest_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`),
  KEY `accountid` (`accountid`),
  UNIQUE KEY `accountid_ach_id` (`accountid`, `ach_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


DROP TABLE IF EXISTS `activity`;
/*!40101 SET @saved_cs_client     = @@character_set_client*/;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `activity` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
  `free_times` int(11) NOT NULL DEFAULT '0' COMMENT '免费抽奖次数',
  `video_times` int(11) NOT NULL DEFAULT '0' COMMENT '视频抽奖次数',
  `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '物品id',
  `item_num` 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 '修改时间',
  `now_days`  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;


DROP TABLE IF EXISTS `passinfo`;
/*!40101 SET @saved_cs_client     = @@character_set_client*/;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `passinfo` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
  `passid` int(11) NOT NULL DEFAULT '0' COMMENT 'passid',
  `active_status` int(11) NOT NULL DEFAULT '0' COMMENT '普通奖励状态',
  `honor_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`),
  KEY `accountid` (`accountid`),
  UNIQUE KEY `accountid_passid` (`accountid`, `passid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


DROP TABLE IF EXISTS `shop`;
/*!40101 SET @saved_cs_client     = @@character_set_client*/;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
  `coin_id` int(11) NOT NULL DEFAULT '0' COMMENT '金币商店物品id',
  `coin_discount` int(11) NOT NULL DEFAULT '0' COMMENT '金币商店折扣',
  `diamond_id` int(11) NOT NULL DEFAULT '0' COMMENT '钻石商店物品id',
  `diamond_discount` 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 `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


DROP TABLE IF EXISTS `additem_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `additem_log` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
  `add_id` varchar(60) DEFAULT '' COMMENT '道具id',
  `add_time` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
  `add_num` int(11) NOT NULL DEFAULT '0' COMMENT '道具数量',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  KEY `accountid` (`accountid`),
  UNIQUE KEY `account_add_id_add_time` (`accountid`, `add_id` , `add_time`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


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',
  `id` int(11) NOT NULL DEFAULT '0' COMMENT '装备id',
  `lv` int(11) NOT NULL DEFAULT '0' COMMENT '装备等级',
  `active_time` int(11) NOT NULL DEFAULT '0' COMMENT '进阶时间',
  `sub_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 '修改时间',

  `using_id`  int(11) NOT NULL DEFAULT '0' COMMENT '上阵id',
  `exp` int(11)  NOT NULL DEFAULT '0' COMMENT '当前经验',
  PRIMARY KEY (`idx`),
  KEY `accountid` (`accountid`),
  UNIQUE KEY `accountid_id` (`accountid`, id)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

DROP TABLE IF EXISTS `shop_data`;
/*!40101 SET @saved_cs_client      = @@character_set_client */;
/*!40101 SET character_set_client  = utf8 */;
CREATE TABLE `shop_data` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
  `blobdata` mediumblob COMMENT '商店数据json',
  `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;

DROP TABLE IF EXISTS `festival_activity`;
/*!40101 SET @saved_cs_client      = @@character_set_client */;
/*!40101 SET character_set_client  = utf8 */;
CREATE TABLE `festival_activity` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
  `blobdata` mediumblob COMMENT '节日活动数据json',
  `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;

/*DROP TABLE IF EXISTS `orderinfo`;*/
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*
CREATE TABLE `orderinfo` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
  `orderid` varchar(60) DEFAULT '' COMMENT '订单id',
  `rmb_num` int(11) NOT NULL DEFAULT '0' COMMENT '点券数量',
  `money` int(11) NOT NULL DEFAULT '0' COMMENT '金钱数量',
  `custom_data` mediumblob  COMMENT '其他字段',
  `itemid` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `account_orderid` (`accountid`, `orderid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
*/
-- Dump completed on 2015-08-19 18:51:22
