feat: Add Activity Session Metrics functionality
- Introduced Activity Session Metrics for enhanced tracking of session data. - Updated backend to support new API endpoints for managing session metrics. - Added new Pydantic models for activity metrics and replaced metrics functionality. - Enhanced data layer to include session metrics in recent training session data. - Updated documentation to reflect changes in session metrics handling.
This commit is contained in:
1 parent
1b01f5e6d0
commit
48508c164e
13 files changed
+1257
-7
No files matched your search
+14
-2
@@ -3,8 +3,9 @@ Pydantic Models for Mitai Jinkendo API
|
||||
|
||||
Data validation schemas for request/response bodies.
|
||||
"""
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
# ── Profile Models ────────────────────────────────────────────────────────────
|
||||
@@ -91,6 +92,17 @@ class ActivityEntry(BaseModel):
|
||||
training_subcategory: Optional[str] = None # v9d: Denormalized subcategory
|
||||
|
||||
|
||||
class ActivityMetricValue(BaseModel):
|
||||
parameter_key: str
|
||||
value: Any
|
||||
|
||||
|
||||
class ActivityMetricsReplace(BaseModel):
|
||||
"""Voller Ersatz der EAV-Metriken für eine Session (siehe Agent-Guide)."""
|
||||
|
||||
metrics: List[ActivityMetricValue] = Field(default_factory=list)
|
||||
|
||||
|
||||
class NutritionDay(BaseModel):
|
||||
date: str
|
||||
kcal: Optional[float] = None
|
||||
|
||||
Reference in new issue
Block a user