game2005api/sql/gamedb.sql
aozhiwei cb6b43f294 1
2021-11-25 19:59:15 +08:00

158 lines
7.1 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
--
-- 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;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_user`
--
DROP TABLE IF EXISTS `t_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_user` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`name` tinyblob COMMENT '用户名字',
`sex` int(11) NOT NULL DEFAULT '0' COMMENT '性别',
`head_id` int(11) NOT NULL DEFAULT '0' COMMENT '头像id',
`head_frame` int(11) NOT NULL DEFAULT '0' COMMENT '头像框id',
`level` int(11) NOT NULL DEFAULT '0' COMMENT '等级',
`exp` int(11) NOT NULL DEFAULT '0' COMMENT '经验',
`gold` int(11) NOT NULL DEFAULT '0' COMMENT '金币',
`diamond` int(11) NOT NULL DEFAULT '0' COMMENT '钻石',
`hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '当前上阵英雄id',
`first_fight` 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`),
UNIQUE KEY `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_hero`
--
DROP TABLE IF EXISTS `t_hero`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_hero` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'accountid',
`hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '英雄id',
`skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤id',
`hero_lv` int(11) NOT NULL DEFAULT '0' COMMENT '英雄等级',
`hero_exp` int(11) NOT NULL DEFAULT '0' COMMENT '英雄等级',
`yoke_lv` int(11) NOT NULL DEFAULT '0' COMMENT '羁绊等级',
`yoke_exp` int(11) NOT NULL DEFAULT '0' COMMENT '羁绊经验',
`skill1_lv1` int(11) NOT NULL DEFAULT '1' COMMENT '必杀技等级',
`skill1_lv2` int(11) NOT NULL DEFAULT '1' COMMENT '躲避技能等级',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid_hero_id` (`accountid`, `hero_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_hero_skin`
--
DROP TABLE IF EXISTS `t_hero_skin`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_hero_skin` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'accountid',
`skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '英雄皮肤id',
`skin_state` int(11) NOT NULL DEFAULT '0' COMMENT '英雄皮肤状态 0=已经购1 = 试用状态',
`get_from` int(11) NOT NULL DEFAULT '0' COMMENT '获得方式 0 = 系统赠送 1 = 金币购买',
`consume_num` int(11) NOT NULL DEFAULT '0' COMMENT '消耗货币的具体数量',
`deadline` 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`),
UNIQUE KEY `accountid_skinid` (`accountid`, `skin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_bag`
--
DROP TABLE IF EXISTS `t_bag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_bag` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
`item_num` int(11) NOT NULL DEFAULT '0' COMMENT '数量',
`item_state` int(11) NOT NULL DEFAULT '0' COMMENT '状态0:上阵中,1:已获得,2:未获得)',
`deadline` 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`),
UNIQUE KEY `item_uuid` (`accountid`, `item_id`),
KEY `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_gun_skin`
--
DROP TABLE IF EXISTS `t_gun_skin`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_gun_skin` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'accountid',
`skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤ID',
`deadline` 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`),
UNIQUE KEY `accountid_skin_id` (`accountid`, `skin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_gun_talent`
--
DROP TABLE IF EXISTS `t_gun_talent`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_gun_talent` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'accountid',
`type_id` int(11) NOT NULL DEFAULT '0' COMMENT '枪类型的id',
`talent_id` int(11) NOT NULL DEFAULT '0' COMMENT '技能ID',
`talent_lv` 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`),
UNIQUE KEY `accountid_type_id_skill_id` (`accountid`, `type_id`,`skill_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
-- Dump completed on 2015-08-19 18:51:22