github.com/lino-network/lino@v0.6.11/x/developer/model/ir.go (about) 1 package model 2 3 import ( 4 types "github.com/lino-network/lino/types" 5 ) 6 7 // DeveloperIR - apps 8 type DeveloperIR struct { 9 Username types.AccountKey `json:"username"` // pk 10 AppConsumption types.MiniDollar `json:"app_consumption"` 11 Website string `json:"web_site"` 12 Description string `json:"description"` 13 AppMetaData string `json:"app_meta_data"` 14 IsDeleted bool `json:"is_deleted"` 15 NAffiliated int64 `json:"n_affiliated"` 16 } 17 18 // AppIDAIR - app issued IDA. 19 type AppIDAIR struct { 20 App types.AccountKey `json:"app"` // pk 21 Name string `json:"name"` 22 MiniIDAPrice types.MiniDollar `json:"price"` 23 IsRevoked bool `json:"is_revoked"` 24 RevokeCoinPrice types.MiniDollar `json:"revoke_coin_price"` // the price of one coin upon revoke. 25 } 26 27 type IDABankIR struct { 28 App types.AccountKey `json:"app"` // pk 29 User types.AccountKey `json:"user"` // pk 30 Balance types.MiniDollar `json:"b"` 31 Unauthed bool `json:"unauthed,omitempty"` 32 } 33 34 type ReservePoolIR struct { 35 Total types.Coin `json:"total"` 36 TotalMiniDollar types.MiniDollar `json:"total_minidollar"` 37 } 38 39 type AffiliatedAccIR struct { 40 App types.AccountKey `json:"app"` // pk 41 User types.AccountKey `json:"user"` // pk 42 } 43 44 type UserRoleIR struct { 45 User types.AccountKey `json:"user"` // pk 46 AffiliatedApp types.AccountKey `json:"aa"` 47 } 48 49 type IDAStatsIR struct { 50 App types.AccountKey `json:"app"` // pk 51 Total types.MiniDollar `json:"total"` 52 } 53 54 // DeveloperTablesIR 55 type DeveloperTablesIR struct { 56 Version int `json:"version"` 57 Developers []DeveloperIR `json:"developers"` 58 IDAs []AppIDAIR `json:"id_as"` 59 IDABanks []IDABankIR `json:"ida_banks"` 60 ReservePool ReservePoolIR `json:"reserve_pool"` 61 AffiliatedAccs []AffiliatedAccIR `json:"affiliated_accs"` 62 UserRoles []UserRoleIR `json:"user_roles"` 63 IDAStats []IDAStatsIR `json:"ida_stats"` 64 }