Format everything
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
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"])
|
||||
|
||||
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"],
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class HouseCreateResponse(BaseModel):
|
||||
id: str
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class HouseResponse(BaseModel):
|
||||
id: str
|
||||
description: str
|
||||
@@ -8,5 +9,6 @@ class HouseResponse(BaseModel):
|
||||
country: str
|
||||
price: float
|
||||
|
||||
|
||||
class HousesListResponse(BaseModel):
|
||||
houses: list[HouseResponse]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class OwnerDetailResponse(BaseModel):
|
||||
id: str
|
||||
user_id: str
|
||||
email: str
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class OwnerResponse(BaseModel):
|
||||
id: str
|
||||
user_id: str
|
||||
|
||||
|
||||
class OwnerListResponse(BaseModel):
|
||||
owners: list[OwnerResponse]
|
||||
owners: list[OwnerResponse]
|
||||
|
||||
Reference in New Issue
Block a user