2025-02-19 17:16:00 +01:00

17 lines
455 B
Python

from uuid import UUID, uuid4
from sqlmodel import Field, SQLModel
class House(SQLModel, table=True):
id: UUID = Field(primary_key=True, default_factory=uuid4)
address: str = Field()
city: str = Field()
country: str = Field()
price: float = Field()
description: str = Field()
owner_user_id: UUID = Field(foreign_key="owner.user_id")
square_feet: float = Field()
bedrooms: int = Field()
bathrooms: float = Field()