"""User model for profile management. Stores user profiles with physical stats and goals. """ from datetime import datetime from typing import Optional from sqlmodel import Field, SQLModel class User(SQLModel, table=True): """A user profile in the system. Attributes: id: Primary key, auto-incremented. username: Unique identifier. display_name: Human-readable name shown in the UI. height: User's height as a string (e.g., "6'0\""). weight: User's weight as a string (e.g., "260 lbs"). goals: Free-text training goals. created_at: Timestamp when the record was created. updated_at: Timestamp of the last update. """ __tablename__ = "users" id: Optional[int] = Field(default=None, primary_key=True) username: str = Field(index=True, unique=True) display_name: str = Field(default="") height: Optional[str] = Field(default=None) weight: Optional[str] = Field(default=None) goals: Optional[str] = Field(default=None) created_at: datetime = Field(default_factory=datetime.utcnow) updated_at: datetime = Field(default_factory=datetime.utcnow)