Separated weight tracking

This commit is contained in:
AG
2025-11-29 12:13:12 +02:00
parent 78930f6b80
commit d86abd6b1b
11 changed files with 300 additions and 22 deletions

Binary file not shown.

View File

@@ -24,6 +24,18 @@ model User {
sessions WorkoutSession[]
exercises Exercise[]
plans WorkoutPlan[]
weightRecords BodyWeightRecord[]
}
model BodyWeightRecord {
id String @id @default(uuid())
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
weight Float
date DateTime @default(now())
dateStr String // YYYY-MM-DD for unique constraint
@@unique([userId, dateStr])
}
model UserProfile {