Separated weight tracking
This commit is contained in:
Binary file not shown.
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user