This commit is contained in:
aozhiwei 2023-08-23 18:43:16 +08:00
parent e4a885b55f
commit c4fa97a065
3 changed files with 34 additions and 1 deletions

View File

@ -18,6 +18,9 @@ class Staking(object):
_common.RspHead(),
['total_staking_value', '', '质押总ceg价值'],
['daily_staking_value', '', '当天总ceg价值'],
['planet', _common.Staking(), '星球质押'],
['badge', _common.Staking(), '徽章质押'],
['cec', _common.Staking(), 'cec质押'],
]
},
]

View File

@ -1398,4 +1398,17 @@ class ExchangeCrystalNum(object):
['num2', 0, '本期晶体260002兑换数'],
['num3', 0, '本期晶体260003兑换数'],
['num4', 0, '本期晶体260004兑换数'],
]
]
class Staking(object):
def __init__(self):
self.fields = [
['type', 0, '1: planet 2: badge 3:cec'],
['is_open', 0, '功能是否开启'],
['staked_quant', 0, '质押数量'],
['claim_rewards', 0, '当前类型自从已产出利息累计'],
['daily_rewards', 0, '每天产出的利息总和'],
['staking_value', 0, '在质押状态的价值总和'],
['maturity_quant', 0, '已到期资产的数量'],
]

View File

@ -71,6 +71,23 @@ CREATE TABLE `t_hash_rate_reward` (
KEY `account_id` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
CREATE TABLE `t_staking` (
`idx` bigint(20) NOT NULL AUTO_INCREMENT,
`address` varchar(60) COMMENT 'address',
`token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id',
`token_type` int(11) NOT NULL DEFAULT '0' COMMENT 'nft类型 1:英雄 2:枪支 3:芯片 6:荣誉 7:徽章',
`net_id` bigint NOT NULL DEFAULT '0' COMMENT 'net_id',
`contract_address` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_address',
`start_time` bigint NOT NULL DEFAULT '0' COMMENT '质押开始时间',
`stake_time` bigint NOT NULL DEFAULT '0' COMMENT '质押结束时间',
`status` int(11) NOT NULL COMMENT '0:质押中 1:已解押',
`createtime` int(11) NOT NULL COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `unikey` (`token_id`, `contract_address`, `net_id`, `start_time`)
KEY `address` (`address`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
alter table t_bc_order add column `currency_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'currency_name';
alter table t_mall add column `currency_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'currency_name';