This commit is contained in:
aozhiwei 2023-08-24 11:56:07 +08:00
parent c4fa97a065
commit 1e2375ff31
2 changed files with 37 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class Staking(object):
self.apis = [
{
'name': 'info',
'desc': '获取商品列表',
'desc': '获取质押信息',
'group': 'Staking',
'url': 'webapp/index.php?c=Staking&a=info',
'params': [
@ -23,4 +23,39 @@ class Staking(object):
['cec', _common.Staking(), 'cec质押'],
]
},
{
'name': 'stacking',
'desc': '质押中nft列表',
'group': 'Staking',
'url': 'webapp/index.php?c=Staking&a=stacking',
'params': [
_common.ReqHead(),
['type', '', '1: planet 2: badge 3:cec'],
],
'response': [
_common.RspHead(),
['!items', [Union([
[NftHeroDetail(), '英雄'],
[NftGunDetail(), '枪支'],
[NftChipDetail(), '芯片'],
])], '星球质押'],
]
},
{
'name': 'history',
'desc': '领取历史',
'group': 'Staking',
'url': 'webapp/index.php?c=Staking&a=history',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['!items', [Union([
[NftHeroDetail(), '英雄'],
[NftGunDetail(), '枪支'],
[NftChipDetail(), '芯片'],
])], '星球质押'],
]
},
]

View File

@ -80,6 +80,7 @@ CREATE TABLE `t_staking` (
`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 '质押结束时间',
`unstake_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 '修改时间',