from enum import StrEnum

from pydantic import BaseModel


class FinamDecimal(BaseModel):
    """
    A custom decimal type for Finam API responses.
    """
    value: str = "0.0"


class FinamDate(BaseModel):
    """
    A custom date type for Finam API responses.
    """
    year: int
    month: int
    day: int


class FinamMoney(BaseModel):
    """
    A custom money type for Finam API responses.
    """
    currency_code: str
    units: str
    nanos: int


class Side(StrEnum):
    """Сторона заявки"""
    BUY = "SIDE_BUY"
    SELL = "SIDE_SELL"
