mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
24 lines
597 B
Python
24 lines
597 B
Python
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass, field
|
|
from typing import Optional, NewType
|
|
|
|
from domain.postcode import Postcode
|
|
|
|
|
|
def _empty_source_row() -> dict[str, str]:
|
|
return {}
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class UnstandardisedAddress:
|
|
address: str
|
|
postcode: Postcode
|
|
org_reference: Optional[str] = None
|
|
additional_info: dict[str, str] = field(
|
|
default_factory=_empty_source_row, compare=False
|
|
)
|
|
|
|
|
|
# A batch of raw, pre-standardisation addresses as supplied by a landlord.
|
|
AddressList = NewType("AddressList", list[UnstandardisedAddress])
|