1
0
Fork 0

[golang] implement trading and contracting

This commit is contained in:
Julien Dessaux 2025-02-19 00:19:58 +01:00
parent a692a38d28
commit 312ef2eb57
Signed by: adyxax
GPG key ID: F92E51B86E07177E
12 changed files with 422 additions and 39 deletions

View file

@ -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"`

View 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"`
}

View 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"`
}