diff --git a/sql/marketdb.sql b/sql/marketdb.sql index 0f523f3c..b04ee694 100644 --- a/sql/marketdb.sql +++ b/sql/marketdb.sql @@ -500,132 +500,56 @@ CREATE TABLE `t_transaction` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `t_activate721nft` +-- Table structure for table `t_chip_plugin` -- -DROP TABLE IF EXISTS `t_activate721nft`; +DROP TABLE IF EXISTS `t_chip_plugin`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `t_activate721nft` ( +CREATE TABLE `t_chip_plugin` ( `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', - `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', - `token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型 1:英雄 2:枪支 3:芯片', - `item_uniid` varchar(60) NOT NULL DEFAULT '' COMMENT 'item_uniid', - `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', - `buyer_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'buyer_address', - `nft_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'nft_address', - `payment_token_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'payment_token_address', - `seller_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'seller_address', - `price` varchar(255) NOT NULL DEFAULT '' COMMENT 'price', - `nonce` varchar(255) NOT NULL DEFAULT '' COMMENT 'nonce', - `activate_time` int(11) NOT NULL DEFAULT '0' COMMENT 'activate_time', - `signature` varchar(255) NOT NULL DEFAULT '' COMMENT '签名', + `tokenid` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', + `chip1` varchar(60) NOT NULL DEFAULT '' COMMENT 'chip1', + `chip2` varchar(60) NOT NULL DEFAULT '' COMMENT 'chip2', + `chip3` varchar(60) NOT NULL DEFAULT '' COMMENT 'chip3', + `chip4` varchar(60) NOT NULL DEFAULT '' COMMENT 'chip4', + `confirm_count` int(11) NOT NULL DEFAULT '0' COMMENT 'confirm_count', + `confirm_block_number` bigint NOT NULL DEFAULT '0' COMMENT 'confirm_block_number', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `tokenid` (`tokenid`), + KEY `chip1` (`chip1`), + KEY `chip2` (`chip2`), + KEY `chip3` (`chip3`), + KEY `chip4` (`chip4`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_blockchain_event` +-- + +DROP TABLE IF EXISTS `t_blockchain_event`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_blockchain_event` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `instance_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'instance_name', + `event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name', `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'txhash', - `block_number` varchar(60) NOT NULL DEFAULT '' COMMENT 'nft生成成功块id', - `confirm_time` int(11) NOT NULL DEFAULT '0' COMMENT 'nft生成被确认时间', - `done` int(11) NOT NULL DEFAULT '0' COMMENT '是否已完成', + `log_index` bigint NOT NULL DEFAULT '0' COMMENT 'log_index', + `block_number` bigint NOT NULL DEFAULT '0' COMMENT 'block_number', + `raw_data` mediumblob COMMENT 'raw_data', + `return_values` mediumblob COMMENT 'return_values', `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', PRIMARY KEY (`idx`), - UNIQUE KEY `nonce` (`nonce`) -) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `t_order1155` --- - -DROP TABLE IF EXISTS `t_order1155`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `t_order1155` ( - `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', - `order_id` varchar(60) NOT NULL DEFAULT '' COMMENT '订单id', - `buyer_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'buyer_address', - `price` varchar(255) NOT NULL DEFAULT '' COMMENT 'price', - `nonce` varchar(255) NOT NULL DEFAULT '' COMMENT 'nonce', - `timestamp` bigint NOT NULL DEFAULT '0' COMMENT 'timestamp', - `signature` varchar(255) NOT NULL DEFAULT '' COMMENT '签名', - `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'bc_mint_txhash', - `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', - `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', - `token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型 1:英雄 2:枪支 3:芯片', - `block_number` varchar(60) NOT NULL DEFAULT '' COMMENT 'nft生成成功块id', - `confirm_time` int(11) NOT NULL DEFAULT '0' COMMENT 'nft生成被确认时间', - `done` int(11) NOT NULL DEFAULT '0' COMMENT '是否已完成', - `ignore` 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 `nonce` (`nonce`), - KEY `token_id` (`token_id`) -) 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_evolve` --- - -DROP TABLE IF EXISTS `t_nft_evolve`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `t_nft_evolve` ( - `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', - `order_id` varchar(60) NOT NULL DEFAULT '' COMMENT '订单id', - `buyer_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'buyer_address', - `price` varchar(255) NOT NULL DEFAULT '' COMMENT 'price', - `nonce` varchar(255) NOT NULL DEFAULT '' COMMENT 'nonce', - `timestamp` bigint NOT NULL DEFAULT '0' COMMENT 'timestamp', - `signature` varchar(255) NOT NULL DEFAULT '' COMMENT '签名', - `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'bc_mint_txhash', - `itemid` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', - `tokenid` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', - `token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型 1:英雄 2:枪支 3:芯片', - `tags` varchar(60) NOT NULL DEFAULT '' COMMENT 'tags', - `block_number` varchar(60) NOT NULL DEFAULT '' COMMENT 'nft生成成功块id', - `confirm_time` int(11) NOT NULL DEFAULT '0' COMMENT 'nft生成被确认时间', - `done` int(11) NOT NULL DEFAULT '0' COMMENT '是否已完成', - `ignore` 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 `nonce` (`nonce`), - UNIQUE KEY `tokenid` (`tokenid`) -) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `t_chip_evolve` --- - -DROP TABLE IF EXISTS `t_chip_evolve`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `t_chip_evolve` ( - `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', - `order_id` varchar(60) NOT NULL DEFAULT '' COMMENT '订单id', - `buyer_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'buyer_address', - `price` varchar(255) NOT NULL DEFAULT '' COMMENT 'price', - `nonce` varchar(255) NOT NULL DEFAULT '' COMMENT 'nonce', - `timestamp` bigint NOT NULL DEFAULT '0' COMMENT 'timestamp', - `signature` varchar(255) NOT NULL DEFAULT '' COMMENT '签名', - `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'bc_mint_txhash', - `itemid` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', - `tokenid` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', - `token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型 1:英雄 2:枪支 3:芯片', - `tags` varchar(60) NOT NULL DEFAULT '' COMMENT 'tags', - `block_number` varchar(60) NOT NULL DEFAULT '' COMMENT 'nft生成成功块id', - `confirm_time` int(11) NOT NULL DEFAULT '0' COMMENT 'nft生成被确认时间', - `done` int(11) NOT NULL DEFAULT '0' COMMENT '是否已完成', - `ignore` 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 `nonce` (`nonce`), - UNIQUE KEY `tokenid` (`tokenid`) + KEY `instance_name` (`instance_name`), + KEY `event_name` (`event_name`), + KEY `txhash` (`txhash`), + KEY `txhash_log_index` (`txhash`, `'log_index'), + KEY `block_number` (`block_number`) ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */;