mirror of
https://github.com/escalante29/healthy-fit.git
synced 2026-03-21 10:48:46 +01:00
- Supplement tracking: CRUD endpoints, /today, /logs, Supplements page - Kettlebell workouts: session tracking, analytics endpoint, ActiveSession page - Calendar module: events CRUD, calendar components - Push notifications: VAPID keys, PushSubscription model, APScheduler reminders, service worker with push/notificationclick handlers, Profile notifications UI - PWA: vite-plugin-pwa, manifest, icons, service worker generation - Frontend: TypeScript types, API modules, ConfirmModal, toast notifications - Auth fixes: password hashing, nutrition endpoint auth - CLAUDE.md: project documentation and development guide Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
45 lines
1.1 KiB
Python
45 lines
1.1 KiB
Python
from typing import Optional
|
|
|
|
from sqlmodel import SQLModel
|
|
|
|
|
|
class UserBase(SQLModel):
|
|
email: str
|
|
username: str
|
|
|
|
|
|
class UserCreate(UserBase):
|
|
password: str
|
|
|
|
|
|
class UserRead(UserBase):
|
|
id: int
|
|
firstname: Optional[str] = None
|
|
lastname: Optional[str] = None
|
|
age: Optional[int] = None
|
|
gender: Optional[str] = None
|
|
height: Optional[float] = None
|
|
weight: Optional[float] = None
|
|
unit_preference: str = "metric"
|
|
target_calories: Optional[float] = None
|
|
target_protein: Optional[float] = None
|
|
target_carbs: Optional[float] = None
|
|
target_fat: Optional[float] = None
|
|
|
|
|
|
class UserUpdate(SQLModel):
|
|
email: Optional[str] = None
|
|
username: Optional[str] = None
|
|
password: Optional[str] = None
|
|
firstname: Optional[str] = None
|
|
lastname: Optional[str] = None
|
|
age: Optional[int] = None
|
|
gender: Optional[str] = None
|
|
height: Optional[float] = None
|
|
weight: Optional[float] = None
|
|
unit_preference: Optional[str] = None
|
|
target_calories: Optional[float] = None
|
|
target_protein: Optional[float] = None
|
|
target_carbs: Optional[float] = None
|
|
target_fat: Optional[float] = None
|