Add JSON tags to database/timetable types

This commit is contained in:
Fred Boniface 2023-07-19 20:16:05 +01:00
parent e492e8ad6a
commit 72e4cb42eb

View File

@ -5,24 +5,24 @@ import (
)
type Stop struct {
PublicDeparture *string
WttDeparture *string
PublicArrival *string
WttArrival *string
IsPublic bool
Tiploc string
PublicDeparture *string `json:"publicDeparture"`
WttDeparture *string `json:"wttDeparture"`
PublicArrival *string `json:"publicArrival"`
WttArrival *string `json:"wttArrival"`
IsPublic bool `json:"isPublic"`
Tiploc string `json:"tiploc"`
}
type Service struct {
TransactionType string
StpIndicator string
Operator string
TrainUid string
Headcode string
PowerType string
PlanSpeed string
ScheduleStartDate time.Time
ScheduleEndDate time.Time
DaysRun []string
Stops []Stop
}
TransactionType string `json:"transactionType"`
StpIndicator string `json:"stpIndicator"`
Operator string `json:"operator"`
TrainUid string `json:"trainUid"`
Headcode string `json:"headcode"`
PowerType string `json:"powerType"`
PlanSpeed int32 `json:"planSpeed"`
ScheduleStartDate time.Time `json:"scheduleStartDate"`
ScheduleEndDate time.Time `json:"scheduleEndDate"`
DaysRun []string `json:"daysRun"`
Stops []Stop `json:"stops"`
}