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]: ...