# DB: distribution
```
Table: <coin>_blkreportprofitv2
Struct:
+--------+---------------+------+-----+---------+-------+
| Field  | Type          | Null | Key | Default | Extra |
+--------+---------------+------+-----+---------+-------+
| date   | datetime      | NO   |     | NULL    |       |
| height | int           | NO   | PRI | NULL    |       |
| hash   | varchar(255)  | NO   |     | NULL    |       |
| reward | decimal(32,8) | NO   |     | NULL    |       |
| fees   | decimal(32,8) | YES  |     | NULL    |       |
| state  | tinyint       | NO   |     | NULL    |       |
+--------+---------------+------+-----+---------+-------+
Create Sql:
CREATE TABLE IF NOT EXISTS <coin>_blkreportprofitv2(
    date DATETIME NOT NULL,
    height INT NOT NULL PRIMARY KEY,
    hash VARCHAR(255) NOT NULL,
    reward DECIMAL(32,8) NOT NULL,
    fees DECIMAL(32,8),
    state TINYINT NOT NULL
);
```

```
Table: wallet_in
Struct:
+-----------------+----------------+------+-----+---------+----------------+
| Field           | Type           | Null | Key | Default | Extra          |
+-----------------+----------------+------+-----+---------+----------------+
| id              | int            | NO   | PRI | NULL    | auto_increment |
| coin            | varchar(20)    | NO   | MUL | NULL    |                |
| user            | varchar(32)    | NO   |     | NULL    |                |
| create_date     | datetime       | YES  |     | NULL    |                |
| should_out_date | datetime       | YES  |     | NULL    |                |
| max_height      | int            | YES  |     | NULL    |                |
| amount          | decimal(40,10) | YES  |     | NULL    |                |
| state           | tinyint        | YES  |     | NULL    |                |
| address         | varchar(128)   | YES  |     | NULL    |                |
+-----------------+----------------+------+-----+---------+----------------+
Create Sql:
CREATE TABLE IF NOT EXISTS wallet_in(
    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    coin VARCHAR(20) NOT NULL,
    user VARCHAR(32) NOT NULL,
    create_date DATETIME,
    should_out_date DATETIME,
    max_height INT,
    amount DECIMAL(40,10),
    state TINYINT,
    address VARCHAR(128)
);
```

```
Table: wallet_outv2
Struct:
+------------+----------------+------+-----+---------+----------------+
| Field      | Type           | Null | Key | Default | Extra          |
+------------+----------------+------+-----+---------+----------------+
| id         | int            | NO   | PRI | NULL    | auto_increment |
| coin       | varchar(20)    | NO   | MUL | NULL    |                |
| user       | varchar(32)    | NO   |     | NULL    |                |
| address    | varchar(255)   | YES  |     | NULL    |                |
| date       | datetime       | YES  |     | NULL    |                |
| max_height | int            | YES  |     | NULL    |                |
| tx_id      | varchar(255)   | YES  |     | NULL    |                |
| amount     | decimal(40,10) | YES  |     | NULL    |                |
| tx_fee     | decimal(40,10) | YES  |     | NULL    |                |
+------------+----------------+------+-----+---------+----------------+
Create Sql:
CREATE TABLE IF NOT EXISTS wallet_outv2(
    id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    coin VARCHAR(20) NOT NULL,
    user VARCHAR(32) NOT NULL,
    address VARCHAR(255),
    date DATETIME,
    max_height INT,
    tx_id VARCHAR(255),
    amount DECIMAL(40,10),
    tx_fee DECIMAL(40,10)
);
```

# DB: hashrate
```
Table: <coin>_minersv2
Struct:
+-------------+---------------+------+-----+---------+----------------+
| Field       | Type          | Null | Key | Default | Extra          |
+-------------+---------------+------+-----+---------+----------------+
| id          | int           | NO   | PRI | NULL    | auto_increment |
| user        | varchar(64)   | NO   |     | NULL    |                |
| miner       | varchar(64)   | NO   |     | NULL    |                |
| date        | datetime      | NO   |     | NULL    |                |
| accepts     | decimal(16,8) | NO   |     | NULL    |                |
| state       | varchar(10)   | NO   |     | NULL    |                |
| last_submit | datetime      | NO   |     | NULL    |                |
+-------------+---------------+------+-----+---------+----------------+
Create Sql:
CREATE TABLE IF NOT EXISTS <coin>_minersv2(
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    user VARCHAR(64) NOT NULL,
    miner VARCHAR(64) NOT NULL,
    date DATETIME NOT NULL,
    accepts DECIMAL(16,8) NOT NULL,
    state VARCHAR(10) NOT NULL,
    last_submit DATETIME NOT NULL
);
```

```
Table: <coin>_mhs_realv2
Struct:
+-------------+---------------+------+-----+---------+----------------+
| Field       | Type          | Null | Key | Default | Extra          |
+-------------+---------------+------+-----+---------+----------------+
| id          | int           | NO   | PRI | NULL    | auto_increment |
| user        | varchar(64)   | NO   |     | NULL    |                |
| miner       | varchar(64)   | NO   |     | NULL    |                |
| date        | datetime      | NO   |     | NULL    |                |
| mhs30m      | decimal(32,6) | NO   |     | NULL    |                |
| mhs24h      | decimal(32,6) | NO   |     | NULL    |                |
| state       | varchar(15)   | NO   |     | NULL    |                |
| last_submit | datetime      | NO   |     | NULL    |                |
+-------------+---------------+------+-----+---------+----------------+
Create Sql:
CREATE TABLE IF NOT EXISTS <coin>_mhs_realv2(
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    user VARCHAR(64) NOT NULL,
    miner VARCHAR(64) NOT NULL,
    date DATETIME NOT NULL,
    mhs30m DECIMAL(32, 6) NOT NULL,
    mhs24h DECIMAL(32, 6) NOT NULL,
    state VARCHAR(15) NOT NULL,
    last_submit DATETIME NOT NULL
);
```

```
Table: <coin>_mhsv2
Struct:
+-------------+---------------+------+-----+---------+----------------+
| Field       | Type          | Null | Key | Default | Extra          |
+-------------+---------------+------+-----+---------+----------------+
| id          | int           | NO   | PRI | NULL    | auto_increment |
| user        | varchar(64)   | NO   |     | NULL    |                |
| miner       | varchar(64)   | NO   |     | NULL    |                |
| date        | datetime      | NO   |     | NULL    |                |
| mhs30m      | decimal(32,6) | NO   |     | NULL    |                |
| mhs24h      | decimal(32,6) | NO   |     | NULL    |                |
| state       | varchar(15)   | NO   |     | NULL    |                |
| last_submit | datetime      | NO   |     | NULL    |                |
+-------------+---------------+------+-----+---------+----------------+
Create Sql:
CREATE TABLE IF NOT EXISTS <coin>_mhsv2(
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    user VARCHAR(64) NOT NULL,
    miner VARCHAR(64) NOT NULL,
    date DATETIME NOT NULL,
    mhs30m DECIMAL(32, 6) NOT NULL,
    mhs24h DECIMAL(32, 6) NOT NULL,
    state VARCHAR(15) NOT NULL,
    last_submit DATETIME NOT NULL
);
```