from typing import Optional, List, Any

from ....core.interfaces.dto import Dto
from ....core.enums.status import Status
from ....core.interfaces.core import Core
from ....enums.career.customers import CustomerType
from ....enums.career.common.range import LocationRange


class Customer[Properties: Any](Core[Properties]):
  type: CustomerType
  range: Optional[LocationRange]

  profile: Optional[str]  # Profile ID

  branch: Optional[str]  # Branch ID
  business: str  # Business ID

  location: Optional[str]
  addresses: Optional[List[str]]  # location ID

  stores: Optional[List[str]]
  services: Optional[List[str]]  # Service ID's
  employees: Optional[List[str]]  # Employee ID's

  status: Optional[Status]

  rate: float
  votes: Optional[int]
  rating: Optional[float]

  documents: Optional[List[str]]  # file ID
  certifications: Optional[List[str]]  # file ID


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


class CustomerDto[Properties: Any](Dto[Properties]):
  type: CustomerType
  range: Optional[LocationRange]

  profile: Optional[str]  # Profile ID

  branch: Optional[str]  # Branch ID
  business: str  # Business ID

  location: Optional[str]
  addresses: Optional[List[str]]  # location ID

  stores: Optional[List[str]]
  services: Optional[List[str]]  # Service ID's
  employees: Optional[List[str]]  # Employee ID's

  status: Optional[Status]

  rate: Optional[float]
  votes: Optional[int]
  rating: Optional[float]

  documents: Optional[List[str]]  # file ID
  certifications: Optional[List[str]]  # file ID
