Documentation ¶
Index ¶
Constants ¶
View Source
const ( AssetTableName = `asset` StatusActive uint32 = 0 StatusInactive uint32 = 1 IsGasAsset = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type AssetModel ¶
type AssetModel interface { CreateAssetTable() error DropAssetTable() error CreateAssets(assets []*Asset) (rowsAffected int64, err error) GetAssetsTotalCount() (count int64, err error) GetAssets(limit int64, offset int64) (assets []*Asset, err error) GetAssetById(assetId int64) (asset *Asset, err error) GetAssetBySymbol(symbol string) (asset *Asset, err error) GetAssetByAddress(address string) (asset *Asset, err error) GetGasAssets() (assets []*Asset, err error) GetMaxAssetId() (max int64, err error) CreateAssetsInTransact(tx *gorm.DB, assets []*Asset) error UpdateAssetsInTransact(tx *gorm.DB, assets []*Asset) error }
func NewAssetModel ¶
func NewAssetModel(db *gorm.DB) AssetModel
Click to show internal directories.
Click to hide internal directories.