sorare/tokens/token_auction.go

60 lines
2.2 KiB
Go

package tokens
import (
"time"
"github.com/shopspring/decimal"
"git.lehouerou.net/laurent/sorare/graphql"
"git.lehouerou.net/laurent/sorare/types"
)
type TokenBid struct {
Amount decimal.Decimal `graphql:"amount"`
AmountInFiat struct {
Eur decimal.Decimal `graphql:"eur"`
Usd decimal.Decimal `graphql:"usd"`
Gbp decimal.Decimal `graphql:"gbp"`
} `graphql:"amountInFiat"`
Amounts MonetaryAmount `graphql:"amounts"`
Auction struct {
Id string `graphql:"id"`
} `graphql:"auction"`
Bidder struct {
User struct {
Id graphql.Id `graphql:"id"`
Slug string `graphql:"slug"`
Nickname string `graphql:"nickname"`
} `graphql:"... on User"`
} `graphql:"bidder"`
CreatedAt time.Time `graphql:"createdAt"`
FiatPayment bool `graphql:"fiatPayment"`
Id graphql.Id `graphql:"id"`
MaximumAmount decimal.Decimal `graphql:"maximumAmount"`
MaximumAmountInFiat struct {
Eur decimal.Decimal `graphql:"eur"`
Usd decimal.Decimal `graphql:"usd"`
Gbp decimal.Decimal `graphql:"gbp"`
} `graphql:"maximumAmountInFiat"`
MaximumAmounts MonetaryAmount `graphql:"maximumAmounts"`
}
type TokenAuction struct {
AutoBid bool `graphql:"autoBid"`
BestBid TokenBid `graphql:"bestBid"`
BidsCount int `graphql:"bidsCount"`
BlockchainId string `graphql:"blockchainId"`
Cancelled bool `graphql:"cancelled"`
CreditCardFee decimal.Decimal `graphql:"creditCardFee"`
Currency types.SupportedCurrency `graphql:"currency"`
CurrentPrice decimal.Decimal `graphql:"currentPrice"`
EndDate time.Time `graphql:"endDate"`
HasTrade bool `graphql:"hasTrade"`
Id graphql.Id `graphql:"id"`
MinNextBid decimal.Decimal `graphql:"minNextBid"`
Nfts []TokenOfferNft `graphql:"nfts"`
Open bool `graphql:"open"`
StartDate time.Time `graphql:"startDate"`
Team string `graphql:"team"`
UpdatedAt time.Time `graphql:"updatedAt"`
}