14 lines
363 B
Python
14 lines
363 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")
|