from pydantic import BaseModel, Field
from typing import List


class MonitoringFuelMonthRequest(BaseModel):
    month: str = Field(
        ...,
        description="Номер месяца строкой с ведущим 0",
        example="02",
        pattern="^(0[1-9]|1[0-2])$"
    )

    class Config:
        json_schema_extra = {
            "example": {
                "month": "02"
            }
        }


class MonitoringFuelTotalRequest(BaseModel):
    columns: List[str] = Field(
        ...,
        description="Массив названий выбираемых столбцов",
        example=["total", "normativ"],
        min_items=1
    )

    class Config:
        json_schema_extra = {
            "example": {
                "columns": ["total", "normativ"]
            }
        }
