-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassetBalance.go
44 lines (39 loc) · 1.52 KB
/
assetBalance.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package models
import "gorm.io/gorm"
type AssetBalance struct {
gorm.Model
GenesisPoint string `json:"genesis_point" gorm:"type:varchar(255)"`
Name string `json:"name" gorm:"type:varchar(255)"`
MetaHash string `json:"meta_hash" gorm:"type:varchar(255)"`
AssetID string `json:"asset_id" gorm:"type:varchar(255)"`
AssetType string `json:"asset_type" gorm:"type:varchar(255)"`
OutputIndex int `json:"output_index"`
Version int `json:"version"`
Balance int `json:"balance"`
DeviceId string `json:"device_id" gorm:"type:varchar(255)"`
UserId int `json:"user_id"`
Username string `json:"username" gorm:"type:varchar(255)"`
Status int `json:"status" gorm:"default:1"`
FromListAsset bool `json:"from_list_asset"`
}
type AssetBalanceSetRequest struct {
GenesisPoint string `json:"genesis_point"`
Name string `json:"name"`
MetaHash string `json:"meta_hash"`
AssetID string `json:"asset_id"`
AssetType string `json:"asset_type"`
OutputIndex int `json:"output_index"`
Version int `json:"version"`
Balance int `json:"balance"`
DeviceId string `json:"device_id" gorm:"type:varchar(255)"`
FromListAsset bool `json:"from_list_asset"`
}
type AssetHolderBalanceLimitAndOffsetRequest struct {
AssetId string `json:"asset_id"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
type GetAssetBalanceByUserIdAndAssetIdRequest struct {
UserId int `json:"user_id"`
AssetId string `json:"asset_id"`
}