Files
python_parser/python_parser/app/schemas/monitoring_fuel.py
2025-08-26 23:33:29 +03:00

35 lines
815 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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"]
}
}