-- MySQL dump 10.14  Distrib 5.5.41-MariaDB, for Linux (x86_64)
--
-- Host: localhost    Database: paydb
-- ------------------------------------------------------
-- 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 `orderinfo`
--

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',
  `orderid` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '订单id',
  `accountid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT '账号id',
  `roleid` bigint NOT NULL COMMENT '角色id',
  `rolename` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '角色名',
  `channel` varchar(20) CHARACTER SET utf8 NOT NULL COMMENT '渠道id',
  `serverid` int(11) NOT NULL COMMENT '服务器id',
  `itemid` int(11) NOT NULL COMMENT '要购买的道具id',
  `price` int(11) NOT NULL COMMENT '价格',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT '0: 新添加订单 1:已经完成订单',
  `confirmtime` int(11) NOT NULL DEFAULT '0' COMMENT 'GameServer订单确认时间',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '订单创建时间',

  `sp_orderid` varchar(32) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '平台的订单id',
  `sp_confirm_time` int(11) NOT NULL DEFAULT '0' COMMENT '平台确认时间',
  `sp_pay_result` int(11) NOT NULL DEFAULT '0' COMMENT '0: 未确认 1: 支付成功 -1:支付失败',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `orderid` (`orderid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

DROP TABLE IF EXISTS `google_subscriptions_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `google_subscriptions_info` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `token` varchar(512) CHARACTER SET utf8 NOT NULL COMMENT '订阅token',
  `product_id` varchar(64) CHARACTER SET utf8 NOT NULL COMMENT '订阅产品id',
  `orderid` varchar(32) CHARACTER SET utf8 NOT NULL unique COMMENT '订单id',
  `start_time` int(11) NOT NULL DEFAULT '0' COMMENT '订阅开始时间',
  `last_continue_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后次续费时间',
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


DROP TABLE IF EXISTS `ios_subscriptions_info`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ios_subscriptions_info` (
  `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `receipt_data` TEXT CHARACTER SET utf8 NOT NULL COMMENT '订阅token',
  `password` varchar(64) CHARACTER SET utf8 NOT NULL COMMENT 'password',
  `product_id` varchar(64) CHARACTER SET utf8 NOT NULL COMMENT '订阅产品id',
  `orderid` varchar(32) CHARACTER SET utf8 NOT NULL unique COMMENT '订单id',
  `start_time` int(11) NOT NULL DEFAULT '0' COMMENT '订阅开始时间',
  `last_continue_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后次续费时间',
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;




/*!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 2015-08-19 18:52:06
