models

package
v0.0.0-...-d9430aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	Id     uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	Name   string `gorm:"type:varchar(64)" json:"name"`
	Icon   string `gorm:"type:varchar(256)" json:"icon"`
	ApiUrl string `gorm:"type:varchar(256)" json:"api_url"`
	*gorm.Model
}

func (*Chain) GetChainList

func (ch *Chain) GetChainList(db *gorm.DB) ([]Chain, error)

func (*Chain) SelfInsert

func (ch *Chain) SelfInsert(db *gorm.DB) error

func (*Chain) SelfUpdate

func (ch *Chain) SelfUpdate(db *gorm.DB) error

func (*Chain) TableName

func (ch *Chain) TableName() string

type Collection

type Collection struct {
	Id                      uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	Rank                    uint64 `json:"rank"`
	Name                    string `gorm:"type:char(128)" json:"name"`
	Creator                 string `gorm:"type:char(128)" json:"creator"`
	ChainName               string `gorm:"type:char(128)" json:"chain_name"`
	CollectionImage         string `gorm:"type:varchar(256)" json:"collection_image"`
	Address                 string `gorm:"type:char(128)" json:"address"`
	Introduce               string `gorm:"type:text" json:"introduce"`
	TotalHolder             uint64 `json:"total_holder" gorm:"column:total_holder;default: 0;"`
	AverageHolder           uint64 `json:"average_holder" gorm:"column:total_holder;default: 0;"`
	TotalGiantWhaleHolder   uint64 `json:"total_giant_whale_holder" gorm:"column:total_giant_whale_holder;default: 0;"`
	AverageGiantWhaleHolder uint64 `json:"average_giant_whale_holder" gorm:"column:average_giant_whale_holder;default: 0;"`
	TotalMint               uint64 `json:"total_mint" gorm:"column:total_mint;default: 0;" json:"total_mint"`
	TotalTxn                uint64 `json:"total_txn" gorm:"column:total_txn;default: 0;"`
	AverageTxn              uint64 `json:"average_txn" gorm:"column:average_txn;default: 0;"`
	FloorPrice              string `gorm:"type:varchar(256)"  json:"floor_price"`
	BestOffer               string `gorm:"type:varchar(256)"  json:"best_offer"`
	AveragePrice            string `gorm:"type:varchar(256)"  json:"average_price"`
	TotalPrice              string `gorm:"type:varchar(256)"  json:"total_price"`
	SuggestLevel            uint8  `json:"suggest_level" gorm:"column:suggest_level;default: 0;"`
	LastMintTime            string `json:"last_mint_time" gorm:"column:last_mint_time;default: 0;"`

	*gorm.Model
}

func (*Collection) GetCollectionById

func (ct *Collection) GetCollectionById(db *gorm.DB) (*Collection, error)

func (*Collection) GetCollectionList

func (ct *Collection) GetCollectionList(page, pageSize int, orderBy int8, db *gorm.DB) ([]Collection, error)

func (*Collection) GetHotCollectionList

func (ct *Collection) GetHotCollectionList(db *gorm.DB) ([]Collection, error)

func (*Collection) GetLiveMintList

func (ct *Collection) GetLiveMintList(db *gorm.DB) ([]Collection, error)

func (*Collection) SelfInsert

func (ct *Collection) SelfInsert(db *gorm.DB) error

func (*Collection) SelfUpdate

func (ct *Collection) SelfUpdate(db *gorm.DB) error

func (*Collection) TableName

func (ct *Collection) TableName() string

type CollectionStat

type CollectionStat struct {
	Id                      uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	CollectionId            uint64 `json:"collect_id"`
	TotalHolder             uint64 `json:"total_holder" gorm:"column:total_holder;default: 0;"`
	AverageHolder           uint64 `json:"average_holder" gorm:"column:total_holder;default: 0;"`
	TotalGiantWhaleHolder   uint64 `json:"total_giant_whale_holder" gorm:"column:total_giant_whale_holder;default: 0;"`
	AverageGiantWhaleHolder uint64 `json:"average_giant_whale_holder" gorm:"column:average_giant_whale_holder;default: 0;"`
	TotalMint               uint64 `json:"total_mint" gorm:"column:total_mint;default: 0;" json:"total_mint"`
	TotalTxn                uint64 `json:"total_txn" gorm:"column:total_txn;default: 0;"`
	AverageTxn              uint64 `json:"average_txn" gorm:"column:average_txn;default: 0;"`
	FloorPrice              string `gorm:"type:varchar(256)"  json:"floor_price"`
	BestOffer               string `gorm:"type:varchar(256)"  json:"best_offer"`
	AveragePrice            string `gorm:"type:varchar(256)"  json:"average_price"`
	TotalPrice              string `gorm:"type:varchar(256)"  json:"total_price"`
	SuggestLevel            uint8  `json:"suggest_level" gorm:"column:suggest_level;default: 0;"`
	DateTime                string `json:"date_time"`
	*gorm.Model
}

func (*CollectionStat) GetDailyCollectionListById

func (cs *CollectionStat) GetDailyCollectionListById(page, pageSize int, db *gorm.DB) ([]CollectionStat, error)

func (*CollectionStat) SelfInsert

func (cs *CollectionStat) SelfInsert(db *gorm.DB) error

func (*CollectionStat) SelfUpdate

func (cs *CollectionStat) SelfUpdate(db *gorm.DB) error

func (*CollectionStat) TableName

func (cs *CollectionStat) TableName() string

type CollectionWhale

type CollectionWhale struct {
	Id           uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	CollectionId uint64 `json:"collect_id"`
	AddressId    uint64 `json:"address_id"`
	*gorm.Model
}

func (*CollectionWhale) SelfInsert

func (cw *CollectionWhale) SelfInsert(db *gorm.DB) error

func (*CollectionWhale) SelfUpdate

func (cw *CollectionWhale) SelfUpdate(db *gorm.DB) error

func (*CollectionWhale) TableName

func (cw *CollectionWhale) TableName() string

type HolderStat

type HolderStat struct {
	Id         uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	AddressId  uint64 `json:"address_id"`
	DateTime   string `json:"date_time"`
	Balance    string `gorm:"type:varchar(256)"  json:"balance"`
	TokenValue string `gorm:"type:varchar(256)" json:"token_value"`
	NftValue   string `gorm:"type:varchar(256)" json:"nft_value"`
	*gorm.Model
}

func (*HolderStat) GetHolderStatListById

func (hs *HolderStat) GetHolderStatListById(page, pageSize int, db *gorm.DB) ([]HolderStat, error)

func (*HolderStat) SelfInsert

func (hs *HolderStat) SelfInsert(db *gorm.DB) error

func (*HolderStat) SelfUpdate

func (hs *HolderStat) SelfUpdate(db *gorm.DB) error

func (*HolderStat) TableName

func (hs *HolderStat) TableName() string

type Holders

type Holders struct {
	Id           uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	Address      string `gorm:"type:char(42)"`
	Label        string `gorm:"type:char(64)" json:"label"`
	IsGiantWhale uint8  `json:"is_giant_whale" gorm:"column:is_giant_whale;default: 0;"` // 0: normal; 1: giant whale wallet
	Balance      string `gorm:"type:varchar(256)"  json:"balance"`
	Owned        string `gorm:"type:varchar(256)"  json:"owned"`
	TokenValue   string `gorm:"type:varchar(256)" json:"token_value"`
	NftValue     string `gorm:"type:varchar(256)" json:"nft_value"`
	*gorm.Model
}

func (*Holders) GetAddressById

func (hl *Holders) GetAddressById(db *gorm.DB) (*Holders, error)

func (*Holders) GetWhaleHolderList

func (hl *Holders) GetWhaleHolderList(db *gorm.DB) ([]Holders, error)

func (*Holders) SelfInsert

func (hl *Holders) SelfInsert(db *gorm.DB) error

func (*Holders) SelfUpdate

func (hl *Holders) SelfUpdate(db *gorm.DB) error

func (*Holders) TableName

func (hl *Holders) TableName() string

type MainToken

type MainToken struct {
	Id   uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	Name string `gorm:"type:varchar(64)" json:"name"`
	*gorm.Model
}

func (*MainToken) GetMainTokenList

func (mt *MainToken) GetMainTokenList(db *gorm.DB) ([]MainToken, error)

func (*MainToken) SelfInsert

func (mt *MainToken) SelfInsert(db *gorm.DB) error

func (*MainToken) SelfUpdate

func (mt *MainToken) SelfUpdate(db *gorm.DB) error

func (*MainToken) TableName

func (mt *MainToken) TableName() string

type Nft

type Nft struct {
	Id                    uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	CollectionId          uint64 `json:"collect_id"`
	Name                  string `gorm:"type:varchar(256)" json:"name"`
	Image                 string `gorm:"type:varchar(256)" json:"image"`
	Introduce             string `gorm:"type:text" json:"introduce"`
	CurrentHolderId       uint64 `json:"current_holder_id"`
	Creator               string `gorm:"type:char(128)" json:"creator"`
	Address               string `gorm:"type:char(128)"`
	MintTxHash            string `gorm:"type:char(66)" json:"mint_tx_hash"`
	MintTime              string `gorm:"type:varchar(128)" json:"mint_time"`
	TokenId               string `gorm:"type:varchar(128)" json:"token_id"`
	TokenUrl              string `gorm:"type:varchar(128)" json:"token_url"`
	TotalTxn              uint64 `json:"total_txn" gorm:"column:total_txn;default: 0;"`
	TotalHolder           uint64 `json:"total_holder" gorm:"column:total_holder;default: 0;"`
	TotalGiantWhaleHolder uint64 `json:"total_giant_whale_holder" gorm:"column:total_giant_whale_holder;default: 0;"`
	LatestPrice           string `gorm:"type:varchar(256)"  json:"latest_price"`
	SalesUnit             string `gorm:"type:varchar(256)"  json:"sales_unit"`
	PriceToUsd            string `gorm:"type:varchar(256)"  json:"price_to_usd"`
	SuggestLevel          uint8  `json:"suggest_level" gorm:"column:suggest_level;default: 0;"`
	*gorm.Model
}

func (*Nft) GetNftById

func (nft *Nft) GetNftById(db *gorm.DB) (*Nft, error)

func (*Nft) GetNftListByCollectionId

func (nft *Nft) GetNftListByCollectionId(page, pageSize int, db *gorm.DB) ([]Nft, error)

func (*Nft) SelfInsert

func (nft *Nft) SelfInsert(db *gorm.DB) error

func (*Nft) SelfUpdate

func (nft *Nft) SelfUpdate(db *gorm.DB) error

func (*Nft) TableName

func (nft *Nft) TableName() string

type NftHolder

type NftHolder struct {
	Id        uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	NftId     uint64 `json:"nft_id"`
	AddressId uint64 `json:"address_id"`
	IsCurrent uint8  `json:"is_current" gorm:"column:is_current;default: 0;"` // 0: default, 1: current holder
	*gorm.Model
}

func (*NftHolder) GetNftHolderListById

func (na *NftHolder) GetNftHolderListById(page, pageSize int, db *gorm.DB) ([]NftHolder, error)

func (*NftHolder) SelfInsert

func (na *NftHolder) SelfInsert(db *gorm.DB) error

func (*NftHolder) SelfUpdate

func (na *NftHolder) SelfUpdate(db *gorm.DB) error

func (*NftHolder) TableName

func (na *NftHolder) TableName() string

type NftStat

type NftStat struct {
	Id                    uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	NftId                 uint64 `json:"nft_id"`
	TotalTxn              uint64 `json:"total_txn" gorm:"column:total_txn;default: 0;"`
	TotalHolder           uint64 `json:"total_holder" gorm:"column:total_holder;default: 0;"`
	TotalGiantWhaleHolder uint64 `json:"total_giant_whale_holder" gorm:"column:total_giant_whale_holder;default: 0;"`
	LatestPrice           string `gorm:"type:varchar(256)"  json:"latest_price"`
	DateTime              string `json:"date_time"`
	*gorm.Model
}

func (*NftStat) GetDailyANftListById

func (ns *NftStat) GetDailyANftListById(page, pageSize int, db *gorm.DB) ([]NftStat, error)

func (*NftStat) SelfInsert

func (ns *NftStat) SelfInsert(db *gorm.DB) error

func (*NftStat) SelfUpdate

func (ns *NftStat) SelfUpdate(db *gorm.DB) error

func (*NftStat) TableName

func (ns *NftStat) TableName() string

type NftTxn

type NftTxn struct {
	Id          uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	NftId       uint64 `json:"nft_id"`
	FromAddress string `gorm:"type:char(42)" json:"from_address"`
	ToAddress   string `gorm:"type:char(42)" json:"to_address"`
	TxType      uint8  `json:"tx_type" gorm:"column:tx_type;default: 0;"` // 0: 销售; 1: 报价; 2:列表;3:转移;4:取消
	TradePrice  string `gorm:"type:varchar(256)"  json:"trade_price"`
	DateTime    string `json:"date_time"`
	*gorm.Model
}

func (*NftTxn) GetNftTxnList

func (nt *NftTxn) GetNftTxnList(page, pageSize int, db *gorm.DB) ([]NftTxn, error)

func (*NftTxn) SelfInsert

func (nt *NftTxn) SelfInsert(db *gorm.DB) error

func (*NftTxn) SelfUpdate

func (nt *NftTxn) SelfUpdate(db *gorm.DB) error

func (*NftTxn) TableName

func (nt *NftTxn) TableName() string

type ShadowScore

type ShadowScore struct {
	Id              uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	CollectionId    uint64 `json:"collect_id"`
	BlueChip        string `gorm:"type:varchar(256)"  json:"blue_chip"`
	Fluidity        string `gorm:"type:varchar(256)"  json:"fluidity"`
	Reliability     string `gorm:"type:varchar(256)"  json:"reliability"`
	CommunityActive string `gorm:"type:varchar(256)"  json:"communityActive"`
	Heat            string `gorm:"type:varchar(256)"  json:"heat"`
	PotentialIncome string `gorm:"type:varchar(256)"  json:"potentialIncome"`
	*gorm.Model
}

func (*ShadowScore) SelfInsert

func (ss *ShadowScore) SelfInsert(db *gorm.DB) error

func (*ShadowScore) SelfUpdate

func (ss *ShadowScore) SelfUpdate(db *gorm.DB) error

func (*ShadowScore) TableName

func (ss *ShadowScore) TableName() string

type TokenPrice

type TokenPrice struct {
	Id          uint64 `json:"id" gorm:"primary_key;AUTO_INCREMENT"`
	MainTokenId uint64 `json:"main_token_id"`
	UsdPrice    string `gorm:"type:varchar(64)" json:"usd_price"`
	CnyPrice    string `gorm:"type:varchar(64)" json:"cny_price"`
	DateTime    string `json:"date_time"`
	*gorm.Model
}

func (*TokenPrice) GetTokenPriceByTokenId

func (tp *TokenPrice) GetTokenPriceByTokenId(db *gorm.DB) (*TokenPrice, error)

func (*TokenPrice) SelfInsert

func (tp *TokenPrice) SelfInsert(db *gorm.DB) error

func (*TokenPrice) SelfUpdate

func (tp *TokenPrice) SelfUpdate(db *gorm.DB) error

func (*TokenPrice) TableName

func (tp *TokenPrice) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL