from typing import Optional, List, Any

from ....core.enums.state import State
from ....core.interfaces.dto import Dto
from ....core.enums.status import Status
from ....core.interfaces.core import Core
from ....enums.career.common import LocationRange
from ....enums.career.stores import StoreType, StoreFork


class Store[Properties: Any](Core[Properties]):
  name: str

  type: StoreType
  fork: StoreFork

  range: Optional[LocationRange]

  state: Optional[State]
  status: Status

  parent: Optional[str]  # Origin Store
  manager: Optional[str]  # Employee ID
  business: str  # Business ID

  categories: Optional[List[str]]

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

  phone: Optional[str]
  address: Optional[str]
  location: Optional[str]


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


class StoreDto[Properties: Any](Dto[Properties]):
  name: str

  type: StoreType
  fork: StoreFork

  range: Optional[LocationRange]

  state: Optional[State]
  status: Status

  parent: Optional[str]  # Origin Store
  manager: Optional[str]  # Employee ID
  business: str  # Business ID

  categories: Optional[List[str]]

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

  phone: Optional[str]
  address: Optional[str]
  location: Optional[str]
