from typing import Optional, List, Any

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


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

  weight: float  # kg

  width: float  # cm
  height: float  # cm
  length: float  # cm

  fragile: Optional[bool]
  perishable: Optional[bool]

  travels: Optional[List[str]]


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


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

  weight: float  # kg

  width: float  # cm
  height: float  # cm
  length: float  # cm

  fragile: Optional[bool]
  perishable: Optional[bool]

  travels: Optional[List[str]]
