Add PostgreSQL database option and more booking flow functionalities

This commit is contained in:
2023-05-08 01:29:59 +02:00
parent d8346a20be
commit e2e6759dc0
40 changed files with 1594 additions and 907 deletions

View File

@@ -1,11 +1,13 @@
package internal
import "git.coopgo.io/coopgo-platform/carpool-service/interoperability/ocss"
import (
"git.coopgo.io/coopgo-platform/carpool-service/interoperability/ocss"
"github.com/paulmach/orb/geojson"
)
type Booking struct {
ID string `bson:"_id"`
Roles []string // At least one of ["driver", "passenger"]
BookingDefinition ocss.Booking
DriverJourney *PlannedJourney
PassengerJourney *PlannedJourney
ocss.Booking `bson:",inline"`
DriverRoute *geojson.FeatureCollection `bson:"driver_route,omitempty"`
PassengerRoute *geojson.FeatureCollection `bson:"passenger_route,omitempty"`
}