-- MySQL dump 10.13  Distrib 5.5.62, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: gems_island_od
-- ------------------------------------------------------
-- Server version	5.5.62-0+deb8u1-log

/*!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 `admin`
--

DROP TABLE IF EXISTS `admin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL DEFAULT '-1',
  `user_login` varchar(30) NOT NULL DEFAULT '0',
  `user_password` varchar(32) NOT NULL DEFAULT '0',
  `user_hash` varchar(32) NOT NULL DEFAULT '0',
  `user_ip` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `booster_stat`
--

DROP TABLE IF EXISTS `booster_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `booster_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'type',
  `name` varchar(100) NOT NULL,
  `description` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `company`
--

DROP TABLE IF EXISTS `company`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `company` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL COMMENT 'id игрока',
  `company_stat_id` varchar(45) NOT NULL DEFAULT '0' COMMENT 'id в company_stat',
  PRIMARY KEY (`id`),
  KEY `index_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1688926 DEFAULT CHARSET=utf8 COMMENT='компании игрока';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `company_stat`
--

DROP TABLE IF EXISTS `company_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `company_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL COMMENT 'название',
  `description` varchar(500) NOT NULL COMMENT 'описание',
  `flag_enabled` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'флаг включена ли компания',
  `config` varchar(500) NOT NULL COMMENT 'поле для клиента (конфиг)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='статические данные о компаниях';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `daily_bonus_stat`
--

DROP TABLE IF EXISTS `daily_bonus_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `daily_bonus_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'day',
  `money1` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Валюта 1',
  `money2` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Валюта 2',
  `energy` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Енергия',
  `booster_list` varchar(100) NOT NULL COMMENT 'список бустеров, через запятую. Например: "1,2,2,4"',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `energy_max_price_stat`
--

DROP TABLE IF EXISTS `energy_max_price_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `energy_max_price_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `energy_max_count` int(10) unsigned NOT NULL,
  `cost_money1` int(10) unsigned NOT NULL,
  `cost_money2` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `energy_price_stat`
--

DROP TABLE IF EXISTS `energy_price_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `energy_price_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `energy_count` int(11) NOT NULL DEFAULT '1',
  `cost_money1` int(11) NOT NULL DEFAULT '0',
  `cost_money2` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `event`
--

DROP TABLE IF EXISTS `event`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `event` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL,
  `event_stat_id` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=25189 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `event_stat`
--

DROP TABLE IF EXISTS `event_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `event_stat` (
  `id` int(11) NOT NULL,
  `description` varchar(500) CHARACTER SET utf8 DEFAULT NULL,
  `type_id` int(11) NOT NULL DEFAULT '0',
  `time_start` int(10) unsigned NOT NULL DEFAULT '430438400',
  `time_live` int(10) unsigned NOT NULL DEFAULT '86400',
  `time_shift` int(10) unsigned NOT NULL DEFAULT '0',
  `prize_money1` int(10) unsigned NOT NULL DEFAULT '0',
  `prize_money2` int(11) NOT NULL DEFAULT '0',
  `prize_energy` int(10) unsigned NOT NULL DEFAULT '0',
  `prize_booster_type` int(10) unsigned NOT NULL DEFAULT '0',
  `prize_booster_count` int(10) unsigned NOT NULL DEFAULT '0',
  `prize_action` int(11) NOT NULL DEFAULT '0',
  `config` varchar(500) CHARACTER SET utf8 NOT NULL,
  `replay_flag` int(11) NOT NULL DEFAULT '1',
  `enable_flag` int(11) NOT NULL DEFAULT '0',
  `image_path` varchar(500) CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `friend`
--

DROP TABLE IF EXISTS `friend`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `friend` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'тот, кто послал приглашение = user_inviter_id',
  `friend_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'тот, кто принимает приглашение',
  `invite_status` int(11) NOT NULL DEFAULT '-1' COMMENT '-1 - приглашение не посылалось, 0 - приглашение отправлено, 1 - приглашение принято, 2 - игрок получил бонус за друга',
  PRIMARY KEY (`id`),
  KEY `in_user_id` (`user_id`),
  KEY `in_friend_id` (`friend_id`)
) ENGINE=InnoDB AUTO_INCREMENT=368326 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `friend_used`
--

DROP TABLE IF EXISTS `friend_used`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `friend_used` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `friend_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_user_id` (`user_id`),
  KEY `index_friend_id` (`friend_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gift`
--

DROP TABLE IF EXISTS `gift`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `gift` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id_out` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'id пользователя который посылает подарок',
  `user_id_in` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'id пользователя которому предназначается подарок',
  `type` int(11) NOT NULL DEFAULT '-1' COMMENT 'тип подарка (0 - энергия)',
  `count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'кол-во передаваемых объектов',
  `status` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'статус (0 - подарок не принят, 1 - подарок принят)',
  `time` int(11) NOT NULL DEFAULT '-1' COMMENT 'время последнего действия',
  PRIMARY KEY (`id`),
  KEY `index_user_id_out` (`user_id_out`),
  KEY `index_user_id_in` (`user_id_in`)
) ENGINE=InnoDB AUTO_INCREMENT=1721862 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gold_to_money`
--

DROP TABLE IF EXISTS `gold_to_money`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `gold_to_money` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `gold` int(10) unsigned NOT NULL,
  `money` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `gold_to_money_tn`
--

DROP TABLE IF EXISTS `gold_to_money_tn`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `gold_to_money_tn` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `gold` int(10) unsigned NOT NULL,
  `money_tn` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `level_stat`
--

DROP TABLE IF EXISTS `level_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `exp` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='stat';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `library_stat`
--

DROP TABLE IF EXISTS `library_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `library_stat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `path` varchar(500) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `log_crash`
--

DROP TABLE IF EXISTS `log_crash`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `log_crash` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL DEFAULT '0',
  `place` varchar(100) NOT NULL,
  `function` varchar(100) NOT NULL,
  `date` varchar(50) NOT NULL,
  `code` int(11) NOT NULL DEFAULT '-1',
  `massage` varchar(250) NOT NULL,
  PRIMARY KEY (`id`,`code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=559464 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `log_money`
--

DROP TABLE IF EXISTS `log_money`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `log_money` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL DEFAULT '0',
  `date` int(11) NOT NULL DEFAULT '0',
  `money1` int(11) NOT NULL DEFAULT '0',
  `money2` int(11) NOT NULL DEFAULT '0',
  `reason_id` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17362459 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `lottery_stat`
--

DROP TABLE IF EXISTS `lottery_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lottery_stat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cost_money1` int(11) NOT NULL DEFAULT '0',
  `cost_money2` int(11) NOT NULL DEFAULT '0',
  `sector_0_type` int(11) NOT NULL DEFAULT '0',
  `sector_0_count` int(11) NOT NULL DEFAULT '0',
  `sector_0_extra` int(11) NOT NULL DEFAULT '0',
  `sector_1_type` int(11) NOT NULL DEFAULT '0',
  `sector_1_count` int(11) NOT NULL DEFAULT '0',
  `sector_1_extra` int(11) NOT NULL DEFAULT '0',
  `sector_2_type` int(11) NOT NULL DEFAULT '0',
  `sector_2_count` int(11) NOT NULL DEFAULT '0',
  `sector_2_extra` int(11) NOT NULL DEFAULT '0',
  `sector_3_type` int(11) NOT NULL DEFAULT '0',
  `sector_3_count` int(11) NOT NULL DEFAULT '0',
  `sector_3_extra` int(11) NOT NULL DEFAULT '0',
  `sector_4_type` int(11) NOT NULL DEFAULT '0',
  `sector_4_count` int(11) NOT NULL DEFAULT '0',
  `sector_4_extra` int(11) NOT NULL DEFAULT '0',
  `sector_5_type` int(11) NOT NULL DEFAULT '0',
  `sector_5_count` int(11) NOT NULL DEFAULT '0',
  `sector_5_extra` int(11) NOT NULL DEFAULT '0',
  `sector_6_type` int(11) NOT NULL DEFAULT '0',
  `sector_6_count` int(11) NOT NULL DEFAULT '0',
  `sector_6_extra` int(11) NOT NULL DEFAULT '0',
  `sector_7_type` int(11) NOT NULL DEFAULT '0',
  `sector_7_count` int(11) NOT NULL DEFAULT '0',
  `sector_7_extra` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mail`
--

DROP TABLE IF EXISTS `mail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mail` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date` varchar(50) NOT NULL DEFAULT '0',
  `user_id_out` bigint(20) NOT NULL DEFAULT '0',
  `user_id_in` bigint(20) unsigned NOT NULL DEFAULT '0',
  `title` varchar(100) NOT NULL DEFAULT '',
  `text` varchar(500) NOT NULL DEFAULT '',
  `read_status` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_user_id_in` (`user_id_in`),
  KEY `index_user_id_out` (`user_id_out`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mission`
--

DROP TABLE IF EXISTS `mission`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mission` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'id пользователя',
  `mission_stat_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'id из табл.  mission_stat',
  `point` int(11) NOT NULL DEFAULT '-1' COMMENT 'число очков набранное игроком',
  `star` int(11) NOT NULL DEFAULT '-1' COMMENT 'число звезд набранное игроком',
  PRIMARY KEY (`id`),
  KEY `index_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=139534470 DEFAULT CHARSET=utf8 COMMENT='миссии которые запускал игрок';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mission_key`
--

DROP TABLE IF EXISTS `mission_key`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mission_key` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'user_id',
  `key` int(11) NOT NULL DEFAULT '-1',
  `mission_stat_id` varchar(45) NOT NULL COMMENT 'id в табл.mission_stat',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=910637600845 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mission_stat`
--

DROP TABLE IF EXISTS `mission_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mission_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL COMMENT 'название',
  `description` varchar(500) NOT NULL COMMENT 'описание',
  `stage_stat_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'входит в этап id в табл. stage_stat',
  `position` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'порядковый номер в этапе',
  `path` varchar(500) NOT NULL COMMENT 'путь к шаблону: ../mission/1.xml',
  `point_in_star1` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'очков до звезды (или подобного условия выполнения миссии)',
  `point_in_star2` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'очков до звезды (или подобного условия выполнения миссии)',
  `point_in_star3` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'очков до звезды (или подобного условия выполнения миссии)',
  `prize_booster_type` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'награда за миссию - тип бустера (колличество указано полем ниже)',
  `prize_booster_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'награда за миссию - количество бустеров указаного выше типа',
  `prize_money1` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'награда за миссию - money1',
  `prize_money2` int(11) NOT NULL DEFAULT '0',
  `prize_energy` int(11) NOT NULL DEFAULT '0',
  `prize_exp` int(11) NOT NULL DEFAULT '0' COMMENT 'награда за миссию - exp',
  `prize2_booster_type` int(11) NOT NULL DEFAULT '0',
  `prize2_booster_count` int(11) NOT NULL DEFAULT '0',
  `prize2_money1` int(11) NOT NULL DEFAULT '0',
  `prize2_money2` int(11) NOT NULL DEFAULT '0',
  `prize2_energy` int(11) NOT NULL DEFAULT '0',
  `prize2_exp` int(11) NOT NULL DEFAULT '0',
  `prize3_booster_type` int(11) NOT NULL DEFAULT '0',
  `prize3_booster_count` int(11) NOT NULL DEFAULT '0',
  `prize3_money1` int(11) NOT NULL DEFAULT '0',
  `prize3_money2` int(11) NOT NULL DEFAULT '0',
  `prize3_energy` int(11) NOT NULL DEFAULT '0',
  `prize3_exp` int(11) NOT NULL DEFAULT '0',
  `config` varchar(500) NOT NULL COMMENT 'поле для клиента (конфиг)',
  `replay_flag` int(1) NOT NULL DEFAULT '1',
  `image_path` varchar(300) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4481 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `notification`
--

DROP TABLE IF EXISTS `notification`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `notification` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `text` varchar(1000) NOT NULL,
  `flag_send` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `session_key`
--

DROP TABLE IF EXISTS `session_key`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `session_key` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `s_key` varchar(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=597657818399 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shop_booster_set_stat`
--

DROP TABLE IF EXISTS `shop_booster_set_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_booster_set_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `type` int(10) unsigned NOT NULL,
  `count` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shop_booster_stat`
--

DROP TABLE IF EXISTS `shop_booster_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_booster_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `buy_booster_set` varchar(100) NOT NULL DEFAULT '0',
  `buy_way` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money1` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money2` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_item` int(10) unsigned NOT NULL DEFAULT '0',
  `visible_flag` int(10) unsigned NOT NULL DEFAULT '0',
  `social_shop_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shop_energy_max_stat`
--

DROP TABLE IF EXISTS `shop_energy_max_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_energy_max_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `count` int(10) unsigned NOT NULL DEFAULT '0',
  `bonus_percent` int(10) unsigned NOT NULL DEFAULT '0',
  `buy_way` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money1` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money2` int(10) unsigned NOT NULL DEFAULT '0',
  `visible_flag` int(10) unsigned NOT NULL DEFAULT '0',
  `social_shop_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shop_energy_stat`
--

DROP TABLE IF EXISTS `shop_energy_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_energy_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `type_using` int(10) unsigned NOT NULL DEFAULT '0',
  `count` int(10) unsigned NOT NULL DEFAULT '1',
  `bonus_percent` int(10) unsigned NOT NULL DEFAULT '0',
  `buy_way` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money1` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money2` int(10) unsigned NOT NULL DEFAULT '0',
  `visible_flag` int(10) unsigned NOT NULL DEFAULT '1',
  `social_shop_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shop_money1_stat`
--

DROP TABLE IF EXISTS `shop_money1_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_money1_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `count` int(10) unsigned NOT NULL DEFAULT '0',
  `bonus_percent` int(10) unsigned NOT NULL DEFAULT '0',
  `buy_way` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money2` int(10) unsigned NOT NULL DEFAULT '0',
  `visible_flag` int(10) unsigned NOT NULL DEFAULT '0',
  `social_shop_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shop_money2_stat`
--

DROP TABLE IF EXISTS `shop_money2_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_money2_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `count` int(10) unsigned NOT NULL DEFAULT '0',
  `bonus_percent` int(10) unsigned NOT NULL DEFAULT '0',
  `buy_way` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money1` int(10) unsigned NOT NULL DEFAULT '0',
  `visible_flag` int(10) unsigned NOT NULL DEFAULT '0',
  `social_shop_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shop_promotion_stat`
--

DROP TABLE IF EXISTS `shop_promotion_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_promotion_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `buy_promotion` int(10) unsigned NOT NULL DEFAULT '0',
  `buy_way` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money1` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money2` int(10) unsigned NOT NULL DEFAULT '0',
  `visible_flag` int(10) unsigned NOT NULL DEFAULT '0',
  `social_shop_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shop_social_stat`
--

DROP TABLE IF EXISTS `shop_social_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_social_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `buy_money1` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'кол-во покупаемой валюты1',
  `buy_money2` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'кол-во покупаемой валюты2',
  `buy_energy` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'кол-во покупаемой энергии',
  `buy_energy_max` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'кол-во очков на которых увеличится верхняя граница значения восполняемой энергии',
  `buy_energy_type_using` int(10) unsigned NOT NULL DEFAULT '0',
  `buy_stage` int(11) NOT NULL DEFAULT '-1',
  `buy_booster_set` varchar(100) NOT NULL COMMENT 'через запятую, указывает на shop_booster_stat',
  `buy_playlist` int(11) NOT NULL DEFAULT '0',
  `buy_promotion` int(11) NOT NULL DEFAULT '-1',
  `cost_social_money` int(10) unsigned NOT NULL DEFAULT '0',
  `description` varchar(200) NOT NULL,
  `image_path` varchar(200) NOT NULL,
  `config` varchar(500) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=602 DEFAULT CHARSET=utf8 COMMENT='Таблица с прайсом товаров продаваемых в игре за валюту соц сети';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `shop_stage_stat`
--

DROP TABLE IF EXISTS `shop_stage_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_stage_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `buy_stage_stat_id` int(10) unsigned NOT NULL DEFAULT '0',
  `buy_way` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money1` int(10) unsigned NOT NULL DEFAULT '0',
  `cost_money2` int(10) unsigned NOT NULL DEFAULT '0',
  `visible_flag` int(10) unsigned NOT NULL DEFAULT '0',
  `social_shop_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=224 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `stage`
--

DROP TABLE IF EXISTS `stage`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stage` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` varchar(45) NOT NULL,
  `stage_stat_id` varchar(45) NOT NULL DEFAULT '0' COMMENT 'id в табл. stage_stat',
  `star` int(10) unsigned NOT NULL DEFAULT '0',
  `flag_complete` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'завершен ли этап',
  PRIMARY KEY (`id`),
  KEY `index_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8054133 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `stage_key`
--

DROP TABLE IF EXISTS `stage_key`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stage_key` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL COMMENT 'id игрока',
  `user_donator_id` bigint(20) unsigned NOT NULL COMMENT 'id игрока который прислал ключ',
  `stage_stat_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'id в таблице stage_stat',
  `status` int(11) NOT NULL DEFAULT '0',
  `time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_user_id` (`user_id`),
  KEY `index_user_donator_id` (`user_donator_id`)
) ENGINE=InnoDB AUTO_INCREMENT=27990495 DEFAULT CHARSET=utf8 COMMENT='ключи которые прислали другие игроки в ответ на запрос';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `stage_stat`
--

DROP TABLE IF EXISTS `stage_stat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stage_stat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL COMMENT 'название',
  `description` varchar(500) NOT NULL COMMENT 'описание',
  `company_stat_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'входит в компанию id в табл. company.stat',
  `position` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'порядковый номер в компании',
  `prize_booster_type` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'награда за миссию - тип бустера (количество указано полем ниже)',
  `prize_booster_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'награда за миссию - количество бустеров указаного выше типа',
  `prize_money1` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'награда за миссию - money1',
  `prize_money2` int(11) NOT NULL DEFAULT '0',
  `prize_exp` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'награда за миссию - exp',
  `config` varchar(500) NOT NULL COMMENT 'поле для клиента (конфиг)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=224 DEFAULT CHARSET=utf8 COMMENT='статические данные о этапах';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `stage_time`
--

DROP TABLE IF EXISTS `stage_time`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stage_time` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL,
  `company_stat_id` int(11) NOT NULL,
  `stage_position` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6615589 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `statistics_mission`
--

DROP TABLE IF EXISTS `statistics_mission`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `statistics_mission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'id пользователя в соц сети',
  `mission_stat_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'тип миссии (id в табл.mission_stat)',
  `date_activity` int(11) NOT NULL DEFAULT '-1' COMMENT 'время последней активности игрока по текущей миссии (начало или завершения)',
  `start_count` int(11) NOT NULL DEFAULT '0' COMMENT 'количество запусков',
  `end_count` int(11) NOT NULL DEFAULT '0' COMMENT 'количество завершений',
  `win_count` int(11) NOT NULL DEFAULT '0' COMMENT 'количество побед',
  PRIMARY KEY (`id`),
  KEY `iu_user_id` (`user_id`),
  KEY `iu_mission_stat` (`mission_stat_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15161478 DEFAULT CHARSET=utf8 COMMENT='статистика по миссиям';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `statistics_mission_count`
--

DROP TABLE IF EXISTS `statistics_mission_count`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `statistics_mission_count` (
  `id` int(11) NOT NULL DEFAULT '-1',
  `date_activity` int(11) NOT NULL DEFAULT '-1',
  `start` int(11) NOT NULL DEFAULT '0',
  `end` int(11) NOT NULL DEFAULT '0',
  `win` int(11) NOT NULL DEFAULT '0',
  `user_unique` int(11) NOT NULL DEFAULT '0' COMMENT 'количество уникальных пользователей миссии',
  `point_min` int(11) NOT NULL DEFAULT '2147483647' COMMENT 'минимальное количество очков набранное в миссии',
  `point_max` int(11) NOT NULL DEFAULT '0' COMMENT 'максимальное количество очков набранное в миссии',
  `point_mid` float NOT NULL DEFAULT '0' COMMENT 'среднее количество очков набранное в миссии. Считается от числа успешных завершений. Т.е.  (суммарное число очков за успешные завершения) / end)',
  `star_1` int(11) NOT NULL DEFAULT '0' COMMENT 'число star_1 полученных за выйгрыш',
  `star_2` int(11) NOT NULL DEFAULT '0' COMMENT 'число star_2 полученных за выйгрыш',
  `star_3` int(11) NOT NULL DEFAULT '0' COMMENT 'число star_3 полученных за выйгрыш',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `storage`
--

DROP TABLE IF EXISTS `storage`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `storage` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL COMMENT 'id пользователя',
  `key_data` varchar(1000) NOT NULL COMMENT 'ключ',
  `data` varchar(10000) NOT NULL COMMENT 'значение',
  PRIMARY KEY (`id`),
  KEY `user_id_and_key_data_index` (`user_id`,`key_data`(255))
) ENGINE=InnoDB AUTO_INCREMENT=7268 DEFAULT CHARSET=utf8 COMMENT='Хранилище данных клиента';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `test`
--

DROP TABLE IF EXISTS `test`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `text1` varchar(2000) NOT NULL DEFAULT '0',
  `text2` varchar(2000) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_booster`
--

DROP TABLE IF EXISTS `user_booster`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_booster` (
  `id` bigint(20) NOT NULL DEFAULT '0',
  `type0` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'число бустеров типа 0',
  `type1` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'число бустеров типа 1',
  `type2` int(10) unsigned NOT NULL DEFAULT '0',
  `type3` int(10) unsigned NOT NULL DEFAULT '0',
  `type4` int(10) unsigned NOT NULL DEFAULT '0',
  `type5` int(10) unsigned NOT NULL DEFAULT '0',
  `type6` int(10) unsigned NOT NULL DEFAULT '0',
  `type7` int(10) unsigned NOT NULL DEFAULT '0',
  `type8` int(10) unsigned NOT NULL DEFAULT '0',
  `type9` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_daily_actions`
--

DROP TABLE IF EXISTS `user_daily_actions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_daily_actions` (
  `id` bigint(20) unsigned NOT NULL COMMENT 'id пользователя в соц.сети',
  `visit_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Время последнего захода(инициализации) в игре',
  `visit_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Счетчик заходов в текущий день',
  `count_of_days` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Счетчик дней посещаемых подряд',
  `status` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_notification`
--

DROP TABLE IF EXISTS `user_notification`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_notification` (
  `id` bigint(10) unsigned NOT NULL DEFAULT '0',
  `type` int(10) unsigned NOT NULL DEFAULT '0',
  `status` int(10) unsigned NOT NULL DEFAULT '0',
  `time` varchar(25) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_orders`
--

DROP TABLE IF EXISTS `user_orders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_orders` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `receiver_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `order_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `date` varchar(50) NOT NULL DEFAULT '0',
  `status` varchar(50) NOT NULL DEFAULT '0',
  `item` varchar(50) NOT NULL DEFAULT '0',
  `item_id` varchar(50) DEFAULT '0',
  `date_server` int(11) NOT NULL DEFAULT '0',
  `item_price` varchar(50) NOT NULL DEFAULT '0',
  `client_inform_flag` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_user_id` (`user_id`),
  KEY `index_receiver_id` (`receiver_id`),
  KEY `index_order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1765475 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_star`
--

DROP TABLE IF EXISTS `user_star`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_star` (
  `id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'user_id',
  `total` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'суммарное количество звезд, которые получил пользователь за все вермя игры',
  `free` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'число свободных звезд, которое пользоваетль может обменять на бонус',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_top_exp`
--

DROP TABLE IF EXISTS `user_top_exp`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_top_exp` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `level` int(10) unsigned NOT NULL DEFAULT '0',
  `exp` int(11) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=336 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `user_top_star`
--

DROP TABLE IF EXISTS `user_top_star`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_top_star` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `star` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
  `id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT 'unknow' COMMENT 'Имя или прозвище',
  `level` int(10) unsigned NOT NULL DEFAULT '1' COMMENT 'Уровень',
  `exp` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Кол-во опыта, см. таб levels',
  `money1` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Валюта1',
  `money2` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Валюта2',
  `energy` int(10) unsigned NOT NULL DEFAULT '100' COMMENT 'Энергия текущая',
  `energy_max` int(10) unsigned NOT NULL DEFAULT '100' COMMENT 'Число до которого восполняется энергия',
  `energy_recovery_start_date` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Дата начала последнего восстановления энергии',
  `energy_type` int(11) NOT NULL DEFAULT '0',
  `energy_unlimited_end_date` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `vars`
--

DROP TABLE IF EXISTS `vars`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vars` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `key` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `key` (`key`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `vars_client`
--

DROP TABLE IF EXISTS `vars_client`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vars_client` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `key` varchar(255) NOT NULL,
  `value` varchar(500) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `key` (`key`)
) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!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 2026-08-28 12:15:46
