from typing import Optional, Any

from ....core.interfaces.dto import Dto
from ....core.interfaces.core import Core
from ....enums.conjoint.contacts import ContactType


class Contact[Properties: Any](Core[Properties]):
  type: ContactType

  phone: Optional[str]
  email: Optional[str]

  account: Optional[str]  # Account ID

  nickname: Optional[str]  # Nickname or Display Name


# ----------------------------------------
# Data Transfer Object Interface
# ----------------------------------------


class ContactDto[Properties: Any](Dto[Properties]):
  type: ContactType

  phone: Optional[str]
  email: Optional[str]

  account: Optional[str]  # Account ID

  nickname: Optional[str]  # Nickname or Display Name
