game2006api/sql/marketdb.sql
aozhiwei e793f51aa2 1
2022-03-28 13:47:57 +08:00

197 lines
8.8 KiB
SQL

-- MySQL dump 10.14 Distrib 5.5.41-MariaDB, for Linux (x86_64)
--
-- Host: localhost Database: marketdb
-- ------------------------------------------------------
-- 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_box_order`
--
DROP TABLE IF EXISTS `t_box_order`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_box_order` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT 'game id',
`batch_idx` int(11) NOT NULL DEFAULT '0' COMMENT '批次号idx',
`token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id',
`order_id` varchar(60) NOT NULL DEFAULT '' COMMENT '订单id',
`type` varchar(60) NOT NULL DEFAULT '' COMMENT 'type',
`buyer_address` varchar(60) NOT NULL DEFAULT '' COMMENT '购买者',
`price` varchar(60) NOT NULL DEFAULT '' COMMENT 'price',
`payment_token_address` varchar(60) NOT NULL DEFAULT '' COMMENT '货币地址',
`nonce` varchar(60) NOT NULL DEFAULT '' COMMENT 'nonce',
`signature` varchar(255) NOT NULL DEFAULT '' COMMENT '签名',
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
`token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型 0:英雄 1:枪支 2:芯片',
`bc_paid` int(11) NOT NULL DEFAULT '0' COMMENT '是否已支付',
`bc_pay_count` int(11) NOT NULL DEFAULT '0' COMMENT '支付次数',
`bc_pay_time` int(11) NOT NULL DEFAULT '0' COMMENT '本节点最后一次支付时间',
`bc_pay_prepare_block_number` varchar(60) NOT NULL DEFAULT '' COMMENT '支付准备前块id',
`bc_pay_success_block_number` varchar(60) NOT NULL DEFAULT '' COMMENT '支付成功块id',
`bc_pay_confirm_time` int(11) NOT NULL DEFAULT '0' COMMENT '支付成功被确认时间',
`bc_minted` int(11) NOT NULL DEFAULT '0' COMMENT 'nft是否已创建',
`bc_mint_count` int(11) NOT NULL DEFAULT '0' COMMENT '生成nft次数',
`bc_mint_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后一次生成nft时间',
`bc_mint_prepare_block_number` varchar(60) NOT NULL DEFAULT '' COMMENT 'nft生成准备前块id',
`bc_mint_success_block_number` varchar(60) NOT NULL DEFAULT '' COMMENT 'nft生成成功块id',
`bc_mint_confirm_time` int(11) NOT NULL DEFAULT '0' COMMENT 'nft生成被确认时间',
`suspend` int(11) NOT NULL DEFAULT '0' COMMENT '挂起',
`suspend_reason` mediumblob COMMENT '挂起原因',
`done` 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 `order_id` (`order_id`),
UNIQUE KEY `signature` (`signature`),
KEY `batch_idx` (`batch_idx`),
KEY `bc_paid` (`bc_paid`),
KEY `bc_minted` (`bc_minted`),
KEY `done` (`done`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_nft`
--
DROP TABLE IF EXISTS `t_nft`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_nft` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id',
`game_id` int(11) NOT NULL DEFAULT '0' COMMENT 'game id',
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
`owner_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'owner_id',
`owner_address` varchar(255) NOT NULL DEFAULT '' COMMENT 'owner_address',
`owner_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'owner_name',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `token_id` (`token_id`),
KEY `owner_address` (`owner_address`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_buy_record`
--
DROP TABLE IF EXISTS `t_buy_record`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_buy_record` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`blobdata` mediumblob COMMENT 'blobdata',
`buyer_address` mediumblob COMMENT 'buyer_address',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_block_number`
--
DROP TABLE IF EXISTS `t_block_number`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_block_number` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`block_number` varchar(60) NOT NULL DEFAULT '' COMMENT '块id',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_withdrawal`
--
DROP TABLE IF EXISTS `t_withdrawal`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_withdrawal` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account` varchar(255) NOT NULL DEFAULT '' COMMENT 'account',
`type` int(11) NOT NULL DEFAULT '0' COMMENT 'type',
`net_id` int(11) NOT NULL DEFAULT '0' COMMENT 'net_id',
`amount` bigint NOT NULL DEFAULT '0' COMMENT 'amount',
`state` int(11) NOT NULL DEFAULT '0' COMMENT 'state 0:等待上链 1:上链中2:上链成功 3:提现失败',
`bc_block_number` varchar(60) NOT NULL DEFAULT '' COMMENT '支付准备前块id',
`bc_txhash` varchar(255) COMMENT 'bc_txhash',
`bc_time` 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 `bc_txhash` (`bc_txhash`),
KEY `account` (`account`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_transfer`
--
DROP TABLE IF EXISTS `t_transfer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_transfer` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'txhash',
`type` int(11) NOT NULL DEFAULT '0' COMMENT 'type',
`_from` varchar(255) NOT NULL DEFAULT '' COMMENT '_from',
`_to` varchar(255) NOT NULL DEFAULT '' COMMENT '_to',
`value` bigint NOT NULL DEFAULT '0' COMMENT 'value',
`state` int(11) NOT NULL DEFAULT '0' COMMENT '0:未同步 1:同步成功',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `txhash` (`txhash`),
KEY `_from` (`_from`),
KEY `_to` (`_to`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_log`
--
DROP TABLE IF EXISTS `t_log`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_log` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`type` varchar(255) NOT NULL DEFAULT '' COMMENT '日志类型',
`subtype` varchar(255) NOT NULL DEFAULT '' COMMENT '日志子类型',
`param1` mediumblob COMMENT 'param1',
`param2` mediumblob COMMENT 'param2',
`param3` mediumblob COMMENT 'param3',
`param4` mediumblob COMMENT 'param4',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
-- Dump completed on 2015-08-19 18:51:22