/*
Navicat MySQL Data Transfer

Source Server         : localhost_3306
Source Server Version : 50553
Source Host           : localhost:3306
Source Database       : raspberry

Target Server Type    : MYSQL
Target Server Version : 50553
File Encoding         : 65001

Date: 2019-10-11 11:25:55
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for rasp_config
-- ----------------------------
DROP TABLE IF EXISTS `rasp_config`;
CREATE TABLE `rasp_config` (
  `height` bigint(20) DEFAULT '0',
  `config` varchar(64) NOT NULL,
  PRIMARY KEY (`config`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for rasp_miner_stat
-- ----------------------------
DROP TABLE IF EXISTS `rasp_miner_stat`;
CREATE TABLE `rasp_miner_stat` (
  `addr` varchar(64) NOT NULL,
  `mined_amount` bigint(20) DEFAULT '0' COMMENT '已挖矿',
  `mined_ticket_count` int(10) DEFAULT '0' COMMENT '中票次数',
  `mining_ticket_count` int(10) DEFAULT '0' COMMENT '正在挖矿票数',
  `total` bigint(20) DEFAULT '0' COMMENT 'ticket总额',
  `balance` bigint(20) DEFAULT '0' COMMENT 'ticket合约中余额',
  `frozen` bigint(20) DEFAULT '0' COMMENT 'ticket合约中冻结得余额',
  `miner_start_time` int(11) DEFAULT '0' COMMENT '开始挖矿记录时间 前端用 ',
  `miner_end_time` int(11) DEFAULT '0' COMMENT '挖矿中止时间 前端用',
  `height` bigint(20) DEFAULT '0',
  `time` int(11) DEFAULT '0',
  PRIMARY KEY (`addr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for rasp_miner_txs
-- ----------------------------
DROP TABLE IF EXISTS `rasp_miner_txs`;
CREATE TABLE `rasp_miner_txs` (
  `height` bigint(20) NOT NULL DEFAULT '0',
  `miner` varchar(64) NOT NULL,
  `return_addr` varchar(64) DEFAULT NULL,
  `amount` int(10) DEFAULT '0' COMMENT '矿工挖矿获利',
  `time` int(11) DEFAULT '0' COMMENT '挖矿时间',
  PRIMARY KEY (`height`),
  KEY `miner` (`miner`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
