2023-07-17 12:20:31 +01:00
|
|
|
package database
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Stop struct {
|
2023-07-20 21:38:35 +01:00
|
|
|
PublicDeparture string `json:"publicDeparture,omitempty"`
|
|
|
|
WttDeparture string `json:"wttDeparture,omitempty"`
|
|
|
|
PublicArrival string `json:"publicArrival,omitempty"`
|
|
|
|
WttArrival string `json:"wttArrival,omitempty"`
|
2024-04-08 20:31:04 +01:00
|
|
|
IsPublic bool `json:"isPublic"` // Ensure omitempty is not set
|
2023-07-20 21:38:35 +01:00
|
|
|
Tiploc string `json:"tiploc,omitempty"`
|
2024-04-07 21:27:12 +01:00
|
|
|
Pass string `json:"pass,omitempty"`
|
|
|
|
Platform string `json:"platform,omitempty"`
|
|
|
|
ArrLine string `json:"arrLine,omitempty"`
|
|
|
|
DepLine string `json:"depLine,omitempty"`
|
2023-07-17 12:20:31 +01:00
|
|
|
}
|
|
|
|
|
2024-04-21 23:01:20 +01:00
|
|
|
// Defined the Database Document format
|
|
|
|
type Service struct {
|
|
|
|
TransactionType string `json:"transactionType,omitempty"`
|
|
|
|
StpIndicator string `json:"stpIndicator,omitempty"`
|
|
|
|
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"`
|
|
|
|
ServiceDetail ServiceDetail `json:"serviceDetail"`
|
|
|
|
DaysRun []string `json:"daysRun,omitempty"`
|
|
|
|
Stops []Stop `json:"stops,omitempty"`
|
2023-07-19 20:16:05 +01:00
|
|
|
}
|
2023-07-27 20:14:57 +01:00
|
|
|
|
2024-04-21 22:59:20 +01:00
|
|
|
// Contains service detail booleans
|
|
|
|
type ServiceDetail struct {
|
|
|
|
FirstClass bool `json:"firstClass"`
|
|
|
|
Catering bool `json:"catering"`
|
|
|
|
Sleeper bool `json:"sleeper"`
|
|
|
|
Vstp bool `json:"vstp"`
|
|
|
|
}
|
|
|
|
|
2023-07-27 20:14:57 +01:00
|
|
|
type DeleteQuery struct {
|
2023-07-27 20:20:11 +01:00
|
|
|
TrainUid string `json:"trainUid"`
|
|
|
|
ScheduleStartDate time.Time `json:"scheduleStartDate"`
|
|
|
|
StpIndicator string `json:"stpIndicator"`
|
2023-07-27 20:14:57 +01:00
|
|
|
}
|