feat: house price prediction model integration
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
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"],
|
||||
)
|
||||
square_feet: float = Field(
|
||||
...,
|
||||
description="Square footage of the house",
|
||||
examples=[1500.00],
|
||||
)
|
||||
bedrooms: int = Field(
|
||||
..., description="Number of bedrooms in the house", examples=[3]
|
||||
)
|
||||
bathrooms: float = Field(
|
||||
..., description="Number of bathrooms in the house", examples=[2.5]
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class HouseCreateResponse(BaseModel):
|
||||
id: str
|
||||
@@ -0,0 +1,8 @@
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import Optional
|
||||
|
||||
class HouseFeatures(BaseModel):
|
||||
square_feet: float = Field(..., description="Total square feet of the house")
|
||||
bedrooms: int = Field(..., description="Number of bedrooms")
|
||||
bathrooms: float = Field(..., description="Number of bathrooms")
|
||||
number_of_floors: Optional[int] = Field(default=None, description="Number of floors")
|
||||
@@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class HousePricePredictionRequest(BaseModel):
|
||||
square_feet: float
|
||||
bedrooms: int
|
||||
bathrooms: float
|
||||
@@ -0,0 +1,5 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class HousePricePredictionResponse(BaseModel):
|
||||
predicted_price: float
|
||||
@@ -0,0 +1,10 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class HouseResponse(BaseModel):
|
||||
id: str
|
||||
description: str
|
||||
address: str
|
||||
city: str
|
||||
country: str
|
||||
price: float
|
||||
@@ -0,0 +1,6 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
from backend.app.dtos.house.house_response import HouseResponse
|
||||
|
||||
class HousesListResponse(BaseModel):
|
||||
houses: list[HouseResponse]
|
||||
@@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class OwnerDetailResponse(BaseModel):
|
||||
id: str
|
||||
user_id: str
|
||||
email: str
|
||||
@@ -0,0 +1,10 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class OwnerResponse(BaseModel):
|
||||
id: str
|
||||
user_id: str
|
||||
|
||||
|
||||
class OwnerListResponse(BaseModel):
|
||||
owners: list[OwnerResponse]
|
||||
@@ -0,0 +1,6 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
from backend.app.dtos.user.user_response import UserResponse
|
||||
|
||||
class UserListResponse(BaseModel):
|
||||
users: list[UserResponse]
|
||||
@@ -0,0 +1,6 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class UserResponse(BaseModel):
|
||||
id: str
|
||||
email: str
|
||||
Reference in New Issue
Block a user