go-types/pkg/database/timetable.go

52 lines
2.0 KiB
Go

package database
import (
"time"
)
type Stop struct {
PublicDeparture string `json:"publicDeparture,omitempty"`
WttDeparture string `json:"wttDeparture,omitempty"`
PublicArrival string `json:"publicArrival,omitempty"`
WttArrival string `json:"wttArrival,omitempty"`
IsPublic bool `json:"isPublic"` // Ensure omitempty is not set
Tiploc string `json:"tiploc,omitempty"`
Pass string `json:"pass,omitempty"`
Platform string `json:"platform,omitempty"`
ArrLine string `json:"arrLine,omitempty"`
DepLine string `json:"depLine,omitempty"`
}
type Service struct { // Consider including catering, train class etc. here too.
TransactionType string `json:"transactionType,omitempty"`
StpIndicator string `json:"stpIndicator,omitempty"`
Vstp bool `json:"vstp"`
Operator string `json:"operator,omitempty"`
TrainUid string `json:"trainUid,omitempty"`
Headcode string `json:"headcode,omitempty"`
PowerType string `json:"powerType,omitempty"`
PlanSpeed int32 `json:"planSpeed,omitempty"`
ScheduleStartDate time.Time `json:"scheduleStartDate,omitempty"`
ScheduleEndDate time.Time `json:"scheduleEndDate,omitempty"`
FirstClass bool `json:"firstClass"` // Ensure omitempty is not set
Catering bool `json:"catering"` // Ensure omitempty is not set
Sleeper bool `json:"sleeper"` // Ensure omitempty is not set
DaysRun []string `json:"daysRun,omitempty"`
Stops []Stop `json:"stops,omitempty"`
}
// Contains service detail booleans
type ServiceDetail struct {
FirstClass bool `json:"firstClass"`
Catering bool `json:"catering"`
Sleeper bool `json:"sleeper"`
Vstp bool `json:"vstp"`
Guard bool `json:"guard"`
}
type DeleteQuery struct {
TrainUid string `json:"trainUid"`
ScheduleStartDate time.Time `json:"scheduleStartDate"`
StpIndicator string `json:"stpIndicator"`
}