mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
19 lines
584 B
Python
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]:
|
|
...
|