Initial commit: Базовая структура сайта
This commit is contained in:
17
backend/app/schemas/metrics.py
Executable file
17
backend/app/schemas/metrics.py
Executable file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Схемы для модуля Метрика
|
||||
"""
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Dict, Any
|
||||
|
||||
|
||||
class MetricsRow(BaseModel):
|
||||
user: str
|
||||
data: Dict[str, Any] # Динамические ключи типа "Q1", "Q2", "W1", "M1" и т.д.
|
||||
|
||||
|
||||
class MetricsAggregateResponse(BaseModel):
|
||||
period_type: str # 'week', 'month', 'quarter', 'year'
|
||||
year: int
|
||||
data: List[MetricsRow]
|
||||
|
||||
Reference in New Issue
Block a user