feat: Update Ride schemas with new fields
This commit is contained in:
parent
54f25d8adf
commit
4291e39649
@ -4,6 +4,8 @@ from datetime import datetime
|
||||
from uuid import UUID
|
||||
|
||||
class RideBase(BaseModel):
|
||||
dispatch_status: str
|
||||
dispatch_time: Optional[datetime.datetime]
|
||||
pickup_location: str = Field(..., description="Pickup location")
|
||||
drop_location: str = Field(..., description="Drop-off location")
|
||||
pickup_latitude: float = Field(..., description="Pickup latitude")
|
||||
@ -16,6 +18,8 @@ class RideCreate(RideBase):
|
||||
pass
|
||||
|
||||
class RideSchema(RideBase):
|
||||
dispatch_status: str
|
||||
dispatch_time: Optional[datetime.datetime]
|
||||
id: UUID
|
||||
driver_id: Optional[UUID] = Field(None, description="ID of the driver")
|
||||
ride_status: str = Field("requested", description="Status of the ride")
|
||||
@ -26,4 +30,9 @@ class RideSchema(RideBase):
|
||||
updated_at: datetime
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
orm_mode = True
|
||||
|
||||
|
||||
dispatch_status: str
|
||||
dispatch_time: Optional[datetime.datetime]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user