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

DROP TABLE IF EXISTS `t_transaction`;
/*!40101 SET @saved_cs_client      = @@character_set_client */;
/*!40101 SET character_set_client  = utf8 */;
CREATE TABLE `t_transaction` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `account` varchar(60) NOT NULL DEFAULT '' COMMENT '钱包地址',
  `trans_id` varchar(255) COMMENT '事务id',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT '网络id',
  `data` mediumblob COMMENT 'data',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `trans_id` (`trans_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_used_token_id`
--

DROP TABLE IF EXISTS `t_used_token_id`;
/*!40101 SET @saved_cs_client      = @@character_set_client */;
/*!40101 SET character_set_client  = utf8 */;
CREATE TABLE `t_used_token_id` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `account` varchar(60) NOT NULL DEFAULT '' COMMENT '钱包地址',
  `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id',
  `trans_id` varchar(255) COMMENT '事务id',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT '网络id',
  `confirmed` 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 `token_id` (`token_id`),
  UNIQUE KEY `trans_id` (`trans_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_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 '日志子类型',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT '网络id',
  `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 */;

--
-- 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',
  `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'txhash',
  `log_index` bigint NOT NULL DEFAULT '0' COMMENT 'log_index',
  `hash_code` varchar(60) NOT NULL DEFAULT '' COMMENT 'hash_code',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
  `event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
  `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
  `contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
  `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 `unikey` (`txhash`, `hash_code`, `log_index`, `net_id`, `event_name`, `contract_address`),
  KEY `net_id_event_name_contract_address` (`net_id`, `event_name`, `contract_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_last_block`
--

DROP TABLE IF EXISTS `t_last_block`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_last_block` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
  `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
  `contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
  `event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
  `block_number` bigint NOT NULL DEFAULT '0' COMMENT 'block_number',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `unikey` (`net_id`, `contract_address`, `event_name`)
) 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',
  `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'txhash',
  `log_index` bigint NOT NULL DEFAULT '0' COMMENT 'log_index',
  `hash_code` varchar(60) NOT NULL DEFAULT '' COMMENT 'hash_code',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
  `event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
  `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
  `contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
  `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 `unikey` (`txhash`, `hash_code`, `log_index`, `net_id`, `event_name`, `contract_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_dbpull_last_idx`
--

DROP TABLE IF EXISTS `t_dbpull_last_idx`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_dbpull_last_idx` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
  `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
  `contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
  `event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
  `last_idx` bigint NOT NULL DEFAULT '0' COMMENT 'last_idx',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `unikey` (`net_id`, `contract_address`, `event_name`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_dbprocess_last_idx`
--

DROP TABLE IF EXISTS `t_dbprocess_last_idx`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_dbprocess_last_idx` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
  `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
  `contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
  `event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
  `last_idx` bigint NOT NULL DEFAULT '0' COMMENT 'last_idx',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `unikey` (`net_id`, `contract_address`, `event_name`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_erc721_refresh`
--

DROP TABLE IF EXISTS `t_erc721_refresh`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_erc721_refresh` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
  `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
  `contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
  `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT '0: dirty',
  `refresh_count` bigint NOT NULL DEFAULT '0' COMMENT 'refresh_count',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `unikey` (`net_id`, `contract_address`, `token_id`),
  KEY `net_id_contract_address_state` (`net_id`, `contract_address`, `status`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `t_721nft_transfer`
--

DROP TABLE IF EXISTS `t_721nft_transfer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_721nft_transfer` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'txhash',
  `log_index` bigint NOT NULL DEFAULT '0' COMMENT 'log_index',
  `hash_code` varchar(60) NOT NULL DEFAULT '' COMMENT 'hash_code',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
  `event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
  `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
  `contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
  `block_number` bigint NOT NULL DEFAULT '0' COMMENT 'block_number',
  `return_values` mediumblob COMMENT 'return_values',
  `src_idx` bigint NOT NULL DEFAULT '0' COMMENT 'src_idx',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT 'status 0：待处理 1：已处理',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `unikey` (`txhash`, `hash_code`, `log_index`, `net_id`, `event_name`, `contract_address`),
  KEY `net_id_event_name_contract_address` (`net_id`, `event_name`, `contract_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_nftmarket`
--

DROP TABLE IF EXISTS `t_nftmarket`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_nftmarket` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'txhash',
  `log_index` bigint NOT NULL DEFAULT '0' COMMENT 'log_index',
  `hash_code` varchar(60) NOT NULL DEFAULT '' COMMENT 'hash_code',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
  `event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
  `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
  `contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
  `block_number` bigint NOT NULL DEFAULT '0' COMMENT 'block_number',
  `return_values` mediumblob COMMENT 'return_values',
  `src_idx` bigint NOT NULL DEFAULT '0' COMMENT 'src_idx',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `unikey` (`txhash`, `hash_code`, `log_index`, `net_id`, `event_name`, `contract_address`),
  KEY `net_id_event_name_contract_address` (`net_id`, `event_name`, `contract_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_gameitemmall`
--

DROP TABLE IF EXISTS `t_gameitemmall`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_gameitemmall` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'txhash',
  `log_index` bigint NOT NULL DEFAULT '0' COMMENT 'log_index',
  `hash_code` varchar(60) NOT NULL DEFAULT '' COMMENT 'hash_code',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
  `event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
  `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
  `contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
  `block_number` bigint NOT NULL DEFAULT '0' COMMENT 'block_number',
  `return_values` mediumblob COMMENT 'return_values',
  `src_idx` bigint NOT NULL DEFAULT '0' COMMENT 'src_idx',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT 'status 0：待处理 1：已处理',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `unikey` (`txhash`, `hash_code`, `log_index`, `net_id`, `event_name`, `contract_address`),
  KEY `net_id_event_name_contract_address` (`net_id`, `event_name`, `contract_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_active_721nft`
--

DROP TABLE IF EXISTS `t_active_721nft`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_active_721nft` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `txhash` varchar(255) NOT NULL DEFAULT '' COMMENT 'txhash',
  `log_index` bigint NOT NULL DEFAULT '0' COMMENT 'log_index',
  `hash_code` varchar(60) NOT NULL DEFAULT '' COMMENT 'hash_code',
  `net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
  `event_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'event_name',
  `contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
  `contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
  `block_number` bigint NOT NULL DEFAULT '0' COMMENT 'block_number',
  `return_values` mediumblob COMMENT 'return_values',
  `src_idx` bigint NOT NULL DEFAULT '0' COMMENT 'src_idx',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT 'status 0：待处理 1：已处理',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `unikey` (`txhash`, `hash_code`, `log_index`, `net_id`, `event_name`, `contract_address`),
  KEY `net_id_event_name_contract_address` (`net_id`, `event_name`, `contract_address`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
