24 lines
698 B
Python
24 lines
698 B
Python
from pydantic import BaseModel, Field
|
|
|
|
|
|
class HouseCreateRequest(BaseModel):
|
|
address: str = Field(
|
|
...,
|
|
min_length=1,
|
|
max_length=255,
|
|
description="House address",
|
|
examples=["123 Main St"],
|
|
)
|
|
city: str = Field(
|
|
..., description="City where the house is located", examples=["Springfield"]
|
|
)
|
|
country: str = Field(
|
|
..., description="Country where the house is located", examples=["USA"]
|
|
)
|
|
price: float = Field(..., description="Price of the house", examples=[250000.00])
|
|
description: str = Field(
|
|
...,
|
|
description="Description of the house",
|
|
examples=["A beautiful 3-bedroom house"],
|
|
)
|