feat: define all 8 SQLModel tables
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
33
app/models/warmup.py
Normal file
33
app/models/warmup.py
Normal file
@@ -0,0 +1,33 @@
|
||||
"""Warmup model for the standardized warmup routine.
|
||||
|
||||
Warmups are displayed before every workout in a fixed order.
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from sqlmodel import Field, SQLModel
|
||||
|
||||
|
||||
class Warmup(SQLModel, table=True):
|
||||
"""A warmup exercise in the standardized routine.
|
||||
|
||||
Attributes:
|
||||
id: Primary key, auto-incremented.
|
||||
name: Warmup name (e.g., "Cat / Cow").
|
||||
type: Category (e.g., "Thoracic Mob", "Hip Mobility").
|
||||
reps: Rep scheme as a string (e.g., "8 reps", "8 each side").
|
||||
form_cues: Detailed form instructions.
|
||||
sort_order: Display order in the warmup sequence.
|
||||
created_at: Timestamp when the record was created.
|
||||
"""
|
||||
|
||||
__tablename__ = "warmups"
|
||||
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
name: str = Field(index=True)
|
||||
type: str = Field(default="")
|
||||
reps: str = Field(default="")
|
||||
form_cues: str = Field(default="")
|
||||
sort_order: int = Field(default=0)
|
||||
created_at: datetime = Field(default_factory=datetime.utcnow)
|
||||
Reference in New Issue
Block a user