mirror of
https://github.com/sstent/AICyclingCoach.git
synced 2026-04-05 12:33:03 +00:00
sync
This commit is contained in:
@@ -4,16 +4,18 @@ from typing import List, Optional
|
||||
from uuid import UUID
|
||||
|
||||
class PlanBase(BaseModel):
|
||||
user_id: UUID
|
||||
start_date: datetime
|
||||
end_date: datetime
|
||||
goal: str
|
||||
jsonb_plan: dict = Field(..., description="Training plan data in JSONB format")
|
||||
version: int = Field(..., gt=0, description="Plan version number")
|
||||
parent_plan_id: Optional[int] = Field(None, description="Parent plan ID for evolution tracking")
|
||||
|
||||
class PlanCreate(PlanBase):
|
||||
rule_ids: List[UUID]
|
||||
pass
|
||||
|
||||
class Plan(PlanBase):
|
||||
id: UUID
|
||||
id: int
|
||||
created_at: datetime
|
||||
analyses: List["Analysis"] = Field([], description="Analyses that created this plan version")
|
||||
child_plans: List["Plan"] = Field([], description="Evolved versions of this plan")
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
@@ -3,6 +3,12 @@ from typing import Optional, Dict, Any
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class WorkoutMetric(BaseModel):
|
||||
timestamp: datetime
|
||||
heart_rate: Optional[int] = None
|
||||
power: Optional[float] = None
|
||||
cadence: Optional[float] = None
|
||||
|
||||
class WorkoutBase(BaseModel):
|
||||
garmin_activity_id: str
|
||||
activity_type: Optional[str] = None
|
||||
|
||||
Reference in New Issue
Block a user