Model/repositories/condition/property_reference_reader.py
Khalim Conn-Kowlessar 4e291e4184 Resolve landlord references to UPRNs, excluding unresolved rows 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 15:03:55 +00:00

19 lines
584 B
Python

from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import List, Optional
@dataclass(frozen=True)
class PropertyReference:
"""A property's landlord reference and resolved UPRN, as held in the
``property`` table. ``uprn`` is nullable — a property whose UPRN has not been
resolved yet cannot receive condition rows."""
landlord_property_id: Optional[str]
uprn: Optional[int]
class PropertyReferenceReader(ABC):
@abstractmethod
def references_for_portfolio(self, portfolio_id: int) -> List[PropertyReference]:
...