[golang] implement ship refueling
This commit is contained in:
parent
23dd8f4a27
commit
01263017fc
8 changed files with 121 additions and 6 deletions
|
@ -2,7 +2,7 @@ package model
|
|||
|
||||
type Nav struct {
|
||||
FlightMode string `json:"flightMode"`
|
||||
Route Route `json:"route"`
|
||||
Route *Route `json:"route"`
|
||||
Status string `json:"status"`
|
||||
SystemSymbol string `json:"systemSymbol"`
|
||||
WaypointSymbol string `json:"waypointSymbol"`
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package model
|
||||
|
||||
type Register struct {
|
||||
Agent Agent `json:"agent"`
|
||||
Agent *Agent `json:"agent"`
|
||||
//contract
|
||||
//faction
|
||||
Ship Ship `json:"ship"`
|
||||
Ship *Ship `json:"ship"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
|
|
@ -3,9 +3,9 @@ package model
|
|||
import "time"
|
||||
|
||||
type Route struct {
|
||||
Arrival time.Time `json:"arrival"`
|
||||
DepartureTime time.Time `json:"departureTime"`
|
||||
Destination RouteEndpoint `json:"destination"`
|
||||
Arrival time.Time `json:"arrival"`
|
||||
DepartureTime time.Time `json:"departureTime"`
|
||||
Destination *RouteEndpoint `json:"destination"`
|
||||
}
|
||||
|
||||
type RouteEndpoint struct {
|
||||
|
|
14
golang/pkg/model/transaction.go
Normal file
14
golang/pkg/model/transaction.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Transaction struct {
|
||||
PricePerUnit int `json:"pricePerUnit"`
|
||||
ShipSymbol string `json:"shipSymbol"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
TotalPrice int `json:"totalPrice"`
|
||||
TradeSymbol string `json:"tradeSymbol"`
|
||||
Type string `json:"type"`
|
||||
Units int `json:"units"`
|
||||
WaypointSymbol string `json:"waypointSymbol"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue