carpool-service/interoperability/ocss/trips.go

44 lines
2.9 KiB
Go
Raw Normal View History

2023-03-27 18:54:56 +00:00
package ocss
import "time"
type Trip struct {
Operator string `json:"operator"`
PassengerPickupLat float64 `json:"passengerPickupLat" bson:"passengerPickupLat"`
PassengerPickupLng float64 `json:"passengerPickupLng" bson:"passengerPickupLng"`
PassengerDropLat float64 `json:"passengerDropLat" bson:"passengerDropLat"`
PassengerDropLng float64 `json:"passengerDropLng" bson:"passengerDropLng"`
2023-03-27 18:54:56 +00:00
Duration time.Duration `json:"duration"`
PassengerPickupAddress *string `json:"passengerPickupAddress,omitempty" bson:"passengerPickupAddress,omitempty"`
PassengerDropAddress *string `json:"passengerDropAddress,omitempty" bson:"passengerDropAddress,omitempty"`
Distance *int64 `json:"distance,omitempty" bson:"distance,omitempty"`
DriverDepartureLat *float64 `json:"driverDepartureLat,omitempty" bson:"driverDepartureLat,omitempty"`
DriverDepartureLng *float64 `json:"driverDepartureLng,omitempty" bson:"driverDepartureLng,omitempty"`
DriverArrivalLat *float64 `json:"driverArrivalLat,omitempty" bson:"driverArrivalLat,omitempty"`
DriverArrivalLng *float64 `json:"driverArrivalLng,omitempty" bson:"driverArrivalLng,omitempty"`
DriverDepartureAddress *string `json:"driverDepartureAddress,omitempty" bson:"driverDepartureAddress,omitempty"`
DriverArrivalAddress *string `json:"driverArrivalAddress,omitempty" bson:"driverArrivalAddress,omitempty"`
JourneyPolyline *string `json:"journeyPolyline,omitempty" bson:"journeyPolyline,omitempty"`
2023-03-27 18:54:56 +00:00
//WebUrl *string `json:"webUrl,omitempty"`
Preferences *Preferences `json:"preferences,omitempty" bson:"preferences,omitempty"`
2023-03-27 18:54:56 +00:00
}
type DriverTrip struct {
Driver User `json:"driver"`
DepartureToPickupWalkingDistance *int64 `json:"departureToPickupWalkingDistance,omitempty" bson:"departureToPickupWalkingDistance,omitempty"`
DepartureToPickupWalkingDuration *time.Duration `json:"departureToPickupWalkingDuration,omitempty" bson:"departureToPickupWalkingDuration,omitempty"`
DepartureToPickupWalkingPolyline *string `json:"departureToPickupWalkingPolyline,omitempty" bson:"departureToPickupWalkingPolyline,omitempty"`
DropoffToArrivalWalkingDistance *int64 `json:"dropoffToArrivalWalkingDistance,omitempty" bson:"dropoffToArrivalWalkingDistance,omitempty"`
DropoffToArrivalWalkingDuration *time.Duration `json:"dropoffToArrivalWalkingDuration,omitempty" bson:"dropoffToArrivalWalkingDuration,omitempty"`
DropoffToArrivalWalkingPolyline *string `json:"dropoffToArrivalWalkingPolyline,omitempty" bson:"dropoffToArrivalWalkingPolyline,omitempty"`
Car *Car `json:"car,omitempty" bson:"car,omitempty"`
2023-03-27 18:54:56 +00:00
Trip
}
type PassengerTrip struct {
Passenger User `json:"passenger"`
Trip
}