-
Notifications
You must be signed in to change notification settings - Fork 18
/
ir.go
64 lines (55 loc) · 2.01 KB
/
ir.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package model
import (
types "github.com/lino-network/lino/types"
)
// DeveloperIR - apps
type DeveloperIR struct {
Username types.AccountKey `json:"username"` // pk
AppConsumption types.MiniDollar `json:"app_consumption"`
Website string `json:"web_site"`
Description string `json:"description"`
AppMetaData string `json:"app_meta_data"`
IsDeleted bool `json:"is_deleted"`
NAffiliated int64 `json:"n_affiliated"`
}
// AppIDAIR - app issued IDA.
type AppIDAIR struct {
App types.AccountKey `json:"app"` // pk
Name string `json:"name"`
MiniIDAPrice types.MiniDollar `json:"price"`
IsRevoked bool `json:"is_revoked"`
RevokeCoinPrice types.MiniDollar `json:"revoke_coin_price"` // the price of one coin upon revoke.
}
type IDABankIR struct {
App types.AccountKey `json:"app"` // pk
User types.AccountKey `json:"user"` // pk
Balance types.MiniDollar `json:"b"`
Unauthed bool `json:"unauthed,omitempty"`
}
type ReservePoolIR struct {
Total types.Coin `json:"total"`
TotalMiniDollar types.MiniDollar `json:"total_minidollar"`
}
type AffiliatedAccIR struct {
App types.AccountKey `json:"app"` // pk
User types.AccountKey `json:"user"` // pk
}
type UserRoleIR struct {
User types.AccountKey `json:"user"` // pk
AffiliatedApp types.AccountKey `json:"aa"`
}
type IDAStatsIR struct {
App types.AccountKey `json:"app"` // pk
Total types.MiniDollar `json:"total"`
}
// DeveloperTablesIR
type DeveloperTablesIR struct {
Version int `json:"version"`
Developers []DeveloperIR `json:"developers"`
IDAs []AppIDAIR `json:"id_as"`
IDABanks []IDABankIR `json:"ida_banks"`
ReservePool ReservePoolIR `json:"reserve_pool"`
AffiliatedAccs []AffiliatedAccIR `json:"affiliated_accs"`
UserRoles []UserRoleIR `json:"user_roles"`
IDAStats []IDAStatsIR `json:"ida_stats"`
}