diff --git a/server/jccommon/types.go b/server/jccommon/types.go index f1cee747..9a5ac507 100644 --- a/server/jccommon/types.go +++ b/server/jccommon/types.go @@ -76,3 +76,38 @@ type NftStacking struct { ItemId int32 Quality int32 } + +type NftStackingPo struct { + TokenId string `json:"t"` + ItemId int32 `json:"i"` + Quality int32 `json:"q"` +} + +type ContractStackingPo struct { + NetId int32 `json:"net_id"` + ContractAddress string `json:"contract_address"` + TokenType int32 `json:"token_type"` + Nfts []*NftStackingPo `json:"nfts"` +} + +type UserStackingPo struct { + AccountAddress string `json:"account_address"` + Contracts []*ContractStackingPo `json:"contracts"` +} + +func NewNftStackingPo() *NftStackingPo { + p := new(NftStackingPo) + return p +} + +func NewContractStackingPo() *ContractStackingPo { + p := new(ContractStackingPo) + p.Nfts = []*NftStackingPo{} + return p +} + +func NewUserStackingPo() *UserStackingPo { + p := new(UserStackingPo) + p.Contracts = []*ContractStackingPo{} + return p +}