Documentation ¶
Index ¶
Constants ¶
View Source
const (
L2NftHistoryTableName = `l2_nft_history`
)
View Source
const (
L2NftTableName = `l2_nft`
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type L2Nft ¶
type L2NftHistory ¶
type L2NftHistory struct { gorm.Model NftIndex int64 CreatorAccountIndex int64 OwnerAccountIndex int64 NftContentHash string NftL1Address string NftL1TokenId string CreatorTreasuryRate int64 CollectionId int64 Status int L2BlockHeight int64 }
func (*L2NftHistory) TableName ¶
func (*L2NftHistory) TableName() string
type L2NftHistoryModel ¶
type L2NftHistoryModel interface { CreateL2NftHistoryTable() error DropL2NftHistoryTable() error GetLatestNftsCountByBlockHeight(height int64) (count int64, err error) GetLatestNftsByBlockHeight(height int64, limit int, offset int) ( rowsAffected int64, nftAssets []*L2NftHistory, err error, ) CreateNftHistoriesInTransact(tx *gorm.DB, histories []*L2NftHistory) error }
func NewL2NftHistoryModel ¶
func NewL2NftHistoryModel(db *gorm.DB) L2NftHistoryModel
type L2NftModel ¶
type L2NftModel interface { CreateL2NftTable() error DropL2NftTable() error GetNft(nftIndex int64) (nftAsset *L2Nft, err error) GetLatestNftIndex() (nftIndex int64, err error) GetNftsByAccountIndex(accountIndex, limit, offset int64) (nfts []*L2Nft, err error) GetNftsCountByAccountIndex(accountIndex int64) (int64, error) CreateNftsInTransact(tx *gorm.DB, nfts []*L2Nft) error UpdateNftsInTransact(tx *gorm.DB, nfts []*L2Nft) error }
func NewL2NftModel ¶
func NewL2NftModel(db *gorm.DB) L2NftModel
Click to show internal directories.
Click to hide internal directories.