from __future__ import annotations from typing import ClassVar, Optional from sqlmodel import Field, SQLModel class PropertyRow(SQLModel, table=True): """Defensive view of the FE-owned ``property`` table. The schema and migrations for ``property`` are owned by the front-end Next.js repo; this declares only the identity columns the modelling backend reads/writes, so FE-owned migrations to other columns don't ripple into us. """ __tablename__: ClassVar[str] = "property" # pyright: ignore[reportIncompatibleVariableOverride] # Non-Optional: this is a read-only defensive view of the FE-owned ``property`` # table — the backend never inserts rows, so every row read carries an id. id: int = Field(primary_key=True) portfolio_id: int postcode: str address: str uprn: Optional[int] = Field(default=None) landlord_property_id: Optional[str] = Field(default=None)