-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
101 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/StakingInfoDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.github.ontio.model.dto; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class StakingInfoDto { | ||
private String address; | ||
private String publicKey; | ||
private Integer processing; | ||
private Integer unstaking; | ||
private Integer staked; | ||
private Integer withdrawable; | ||
private String rewards; | ||
private Integer round; | ||
} | ||
|
11 changes: 10 additions & 1 deletion
11
back-end-projects/Explorer/src/main/java/com/github/ontio/model/dto/StakingRewardsDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
package com.github.ontio.model.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.Data; | ||
|
||
@Data | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class StakingRewardsDto { | ||
private String address; | ||
private String publicKey; | ||
private String rewards; | ||
private int round; | ||
private Integer staked; | ||
private Integer processing; | ||
private Integer unstaking; | ||
private Integer withdrawable; | ||
private Integer round; | ||
@JsonIgnore | ||
private Integer nextWithdrawable; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...projects/Explorer/src/main/resources/db/migration/V1.88__tbl_income_info_staking_info.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ALTER TABLE tbl_income_info ADD COLUMN withdraw_pos int(11) DEFAULT NULL AFTER staking_pos; | ||
ALTER TABLE tbl_income_info ADD COLUMN new_pos int(11) DEFAULT NULL AFTER withdraw_pos; | ||
ALTER TABLE tbl_income_info ADD COLUMN next_withdrawable_pos int(11) DEFAULT NULL AFTER new_pos; | ||
ALTER TABLE tbl_income_info ADD COLUMN peer int(2) DEFAULT NULL AFTER next_withdrawable_pos; | ||
|
||
CREATE TABLE `tbl_node_staking_info` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`peer_pub_key` char(80) NOT NULL COMMENT '节点公钥', | ||
`address` char(80) NOT NULL COMMENT '质押地址', | ||
`amount` int(11) NOT NULL COMMENT '数量', | ||
`action` varchar(50) NOT NULL COMMENT '质押行为', | ||
`node_status` int(2) NOT NULL COMMENT '1-候选节点;2-共识节点', | ||
`block_height` int(11) NOT NULL COMMENT '块高', | ||
`tx_hash` varchar(100) NOT NULL COMMENT '交易hash', | ||
`cycle` int(11) NOT NULL COMMENT '周期', | ||
PRIMARY KEY (`id`) USING BTREE, | ||
KEY `idx_peer_address` (`peer_pub_key`,`address`) USING BTREE, | ||
KEY `idx_address` (`address`,`cycle`) USING BTREE, | ||
KEY `idx_tx_hash` (`tx_hash`) USING BTREE | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters