M9: create validated internal bookings
This commit is contained in:
@@ -61,6 +61,14 @@ class BookingOut(BookingSummaryOut):
|
||||
customer_name: str
|
||||
|
||||
|
||||
class CreateBookingRequest(BaseModel):
|
||||
customer_ref: str = Field(min_length=3, max_length=20)
|
||||
vehicle_ref: str = Field(min_length=3, max_length=20)
|
||||
starts_at: datetime
|
||||
ends_at: datetime
|
||||
requirements_complete: bool = True
|
||||
|
||||
|
||||
class BookingPageOut(BaseModel):
|
||||
items: list[BookingOut]
|
||||
page: int
|
||||
|
||||
Reference in New Issue
Block a user