from typing import Optional, List, Any
from datetime import datetime

from ....core.interfaces.dto import Dto
from ....core.interfaces.core import Core


class Event[Properties: Any](Core[Properties]):
  title: str
  subtitle: Optional[str]

  s_date: datetime
  e_date: datetime

  place: Optional[str]
  location: Optional[str]

  attendees: Optional[List[str]]
  organizers: Optional[List[str]]

  status: Optional[str]
  category: Optional[str]

  color: Optional[str]

  correlation: Optional[str]  # use this field if you have recurrent event


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


class EventDto[Properties: Any](Dto[Properties]):
  title: str
  subtitle: Optional[str]

  s_date: datetime
  e_date: datetime

  place: Optional[str]
  location: Optional[str]

  attendees: Optional[List[str]]
  organizers: Optional[List[str]]

  status: Optional[str]
  category: Optional[str]

  color: Optional[str]

  correlation: Optional[str]  # use this field if you have recurrent event
