From e8f6c7115eb987589ef73aedadd9f2baa2bbb170 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 18 Jul 2023 12:39:36 +0100 Subject: [PATCH] Add VSTP Types --- pkg/upstreamApi/vstp.go | 58 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 pkg/upstreamApi/vstp.go diff --git a/pkg/upstreamApi/vstp.go b/pkg/upstreamApi/vstp.go new file mode 100644 index 0000000..62f268d --- /dev/null +++ b/pkg/upstreamApi/vstp.go @@ -0,0 +1,58 @@ +package upstreamApi + +type Schedule struct { + ScheduleID string `json:"schedule_id"` + TransactionType string `json:"transaction_type"` + ScheduleStartDate string `json:"schedule_start_date"` + ScheduleEndDate string `json:"schedule_end_date"` + ScheduleDaysRun string `json:"schedule_days_runs"` + ApplicableTimetable string `json:"applicable_timetable"` + CIFBankHolidayRun string `json:"CIF_bank_holiday_running"` + CIFTrainUID string `json:"CIF_train_uid"` + TrainStatus string `json:"train_status"` + CIFSTPIndicator string `json:"CIF_stp_indicator"` + ScheduleSegment []ScheduleSegment `json:"schedule_segment"` +} + +type ScheduleSegment struct { + SignallingID string `json:"signalling_id"` + UICCode string `json:"uic_code"` + ATOCCode string `json:"atoc_code"` + CIFTrainCategory string `json:"CIF_train_category"` + CIFHeadcode string `json:"CIF_headcode"` + CIFCourseIndicator string `json:"CIF_course_indicator"` + CIFTrainServiceCode string `json:"CIF_train_service_code"` + CIFBusinessSector string `json:"CIF_business_sector"` + CIFPowerType string `json:"CIF_power_type"` + CIFTimingLoad string `json:"CIF_timing_load"` + CIFSpeed string `json:"CIF_speed"` + CIFOperatingCharacteristics string `json:"CIF_operating_characteristics"` + CIFTrainClass string `json:"CIF_train_class"` + CIFSleepers string `json:"CIF_sleepers"` + CIFReservations string `json:"CIF_reservations"` + CIFConnectionIndicator string `json:"CIF_connection_indicator"` + CIFCateringCode string `json:"CIF_catering_code"` + CIFServiceBranding string `json:"CIF_service_branding"` + CIFTractionClass string `json:"CIF_traction_class"` + ScheduleLocation []ScheduleLocation `json:"schedule_location"` +} + +type ScheduleLocation struct { + ScheduledArrivalTime string `json:"scheduled_arrival_time"` + ScheduledDepartureTime string `json:"scheduled_departure_time"` + ScheduledPassTime string `json:"scheduled_pass_time"` + PublicArrivalTime string `json:"public_arrival_time"` + PublicDepartureTime string `json:"public_departure_time"` + CIFPlatform string `json:"CIF_platform"` + CIFLine string `json:"CIF_line"` + CIFPath string `json:"CIF_path"` + CIFActivity string `json:"CIF_activity"` + CIFEngineeringAllowance string `json:"CIF_engineering_allowance"` + CIFPathingAllowance string `json:"CIF_pathing_allowance"` + CIFPerformanceAllowance string `json:"CIF_performance_allowance"` + Location struct { + Tiploc struct { + TiplocID string `json:"tiploc_id"` + } `json:"location"` + } `json:"location"` +} \ No newline at end of file