from __future__ import annotations

from dataclasses import dataclass, field
from typing import Optional

from domain.postcode import Postcode


def _empty_source_row() -> dict[str, str]:
    return {}


@dataclass(frozen=True)
class UserAddress:
    user_address: str
    postcode: Postcode
    internal_reference: Optional[str] = None
    source_row: dict[str, str] = field(default_factory=_empty_source_row, compare=False)
