Add driver compensation fields to CarpoolServiceBooking
Build and Push Docker Image / build_and_push (push) Failing after 3m5s Details

Add driver_compensation_amount and driver_compensation_currency fields to store driver compensation information in carpool bookings.
This commit is contained in:
Arnaud Delcasse 2025-10-08 15:52:03 +02:00
parent 678286b384
commit 51068be38b
2 changed files with 50 additions and 27 deletions

View File

@ -1276,6 +1276,8 @@ type CarpoolServiceBooking struct {
DriverRoute *CarpoolFeatureCollection `protobuf:"bytes,30,opt,name=driver_route,json=driverRoute,proto3,oneof" json:"driver_route,omitempty"`
PassengerRoute *CarpoolFeatureCollection `protobuf:"bytes,31,opt,name=passenger_route,json=passengerRoute,proto3,oneof" json:"passenger_route,omitempty"`
DriverDepartureDate *timestamppb.Timestamp `protobuf:"bytes,32,opt,name=driverDepartureDate,proto3,oneof" json:"driverDepartureDate,omitempty"`
DriverCompensationAmount *float64 `protobuf:"fixed64,33,opt,name=driver_compensation_amount,json=driverCompensationAmount,proto3,oneof" json:"driver_compensation_amount,omitempty"`
DriverCompensationCurrency *string `protobuf:"bytes,34,opt,name=driver_compensation_currency,json=driverCompensationCurrency,proto3,oneof" json:"driver_compensation_currency,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -1457,6 +1459,20 @@ func (x *CarpoolServiceBooking) GetDriverDepartureDate() *timestamppb.Timestamp
return nil
}
func (x *CarpoolServiceBooking) GetDriverCompensationAmount() float64 {
if x != nil && x.DriverCompensationAmount != nil {
return *x.DriverCompensationAmount
}
return 0
}
func (x *CarpoolServiceBooking) GetDriverCompensationCurrency() string {
if x != nil && x.DriverCompensationCurrency != nil {
return *x.DriverCompensationCurrency
}
return ""
}
type CarpoolServicePreferences struct {
state protoimpl.MessageState `protogen:"open.v1"`
Smoking *bool `protobuf:"varint,1,opt,name=smoking,proto3,oneof" json:"smoking,omitempty"`
@ -2091,7 +2107,7 @@ const file_carpool_service_types_proto_rawDesc = "" +
"\x11_journey_polylineB\n" +
"\n" +
"\b_web_urlB\x0e\n" +
"\f_preferences\"\xde\t\n" +
"\f_preferences\"\xa8\v\n" +
"\x15CarpoolServiceBooking\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12+\n" +
"\x06driver\x18\x02 \x01(\v2\x13.CarpoolServiceUserR\x06driver\x121\n" +
@ -2114,7 +2130,10 @@ const file_carpool_service_types_proto_rawDesc = "" +
"\x14passenger_journey_id\x18\x12 \x01(\tR\x12passengerJourneyId\x12A\n" +
"\fdriver_route\x18\x1e \x01(\v2\x19.CarpoolFeatureCollectionH\x06R\vdriverRoute\x88\x01\x01\x12G\n" +
"\x0fpassenger_route\x18\x1f \x01(\v2\x19.CarpoolFeatureCollectionH\aR\x0epassengerRoute\x88\x01\x01\x12Q\n" +
"\x13driverDepartureDate\x18 \x01(\v2\x1a.google.protobuf.TimestampH\bR\x13driverDepartureDate\x88\x01\x01B\x1b\n" +
"\x13driverDepartureDate\x18 \x01(\v2\x1a.google.protobuf.TimestampH\bR\x13driverDepartureDate\x88\x01\x01\x12A\n" +
"\x1adriver_compensation_amount\x18! \x01(\x01H\tR\x18driverCompensationAmount\x88\x01\x01\x12E\n" +
"\x1cdriver_compensation_currency\x18\" \x01(\tH\n" +
"R\x1adriverCompensationCurrency\x88\x01\x01B\x1b\n" +
"\x19_passenger_pickup_addressB\x19\n" +
"\x17_passenger_drop_addressB\v\n" +
"\t_distanceB\v\n" +
@ -2124,7 +2143,9 @@ const file_carpool_service_types_proto_rawDesc = "" +
"\x04_carB\x0f\n" +
"\r_driver_routeB\x12\n" +
"\x10_passenger_routeB\x16\n" +
"\x14_driverDepartureDate\"\xff\x01\n" +
"\x14_driverDepartureDateB\x1d\n" +
"\x1b_driver_compensation_amountB\x1f\n" +
"\x1d_driver_compensation_currency\"\xff\x01\n" +
"\x19CarpoolServicePreferences\x12\x1d\n" +
"\asmoking\x18\x01 \x01(\bH\x00R\asmoking\x88\x01\x01\x12\x1d\n" +
"\aanimals\x18\x02 \x01(\bH\x01R\aanimals\x88\x01\x01\x12\x19\n" +

View File

@ -154,6 +154,8 @@ message CarpoolServiceBooking {
optional CarpoolFeatureCollection driver_route = 30;
optional CarpoolFeatureCollection passenger_route = 31;
optional google.protobuf.Timestamp driverDepartureDate = 32;
optional double driver_compensation_amount = 33;
optional string driver_compensation_currency = 34;
}
message CarpoolServicePreferences {