[golang] implement trading and contracting
This commit is contained in:
parent
a692a38d28
commit
312ef2eb57
12 changed files with 422 additions and 39 deletions
|
@ -7,7 +7,7 @@ type Contract struct {
|
|||
DeadlineToAccept time.Time `json:"deadlineToAccept"`
|
||||
Expiration time.Time `json:"expiration"`
|
||||
FactionSymbol string `json:"factionSymbol"`
|
||||
Fullfilled bool `json:"fulfilled"`
|
||||
Fulfilled bool `json:"fulfilled"`
|
||||
Id string `json:"id"`
|
||||
Terms *Terms `json:"terms"`
|
||||
Type string `json:"type"`
|
||||
|
|
10
golang/pkg/model/market.go
Normal file
10
golang/pkg/model/market.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package model
|
||||
|
||||
type Market struct {
|
||||
Exchange []Common `json:"exchange"`
|
||||
Exports []Common `json:"exports"`
|
||||
Imports []Common `json:"imports"`
|
||||
Symbol string `json:"symbol"`
|
||||
TradeGoods []TradeGood `json:"tradeGoods"`
|
||||
Transactions []Transaction `json:"transactions"`
|
||||
}
|
11
golang/pkg/model/trade_good.go
Normal file
11
golang/pkg/model/trade_good.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package model
|
||||
|
||||
type TradeGood struct {
|
||||
Activity string `json:"activity"`
|
||||
PurchasePrice int `json:"purchasePrice"`
|
||||
SellPrice int `json:"sellPrice"`
|
||||
Supply string `json:"supply"`
|
||||
Symbol string `json:"symbol"`
|
||||
TradeVolume int `json:"tradeVolume"`
|
||||
Type string `json:"type"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue