Sporadic set logging added

This commit is contained in:
AG
2025-11-29 19:03:42 +02:00
parent d86abd6b1b
commit b5c8e8ac43
15 changed files with 1491 additions and 396 deletions

Binary file not shown.

View File

@@ -25,6 +25,7 @@ model User {
exercises Exercise[]
plans WorkoutPlan[]
weightRecords BodyWeightRecord[]
sporadicSets SporadicSet[]
}
model BodyWeightRecord {
@@ -59,6 +60,7 @@ model Exercise {
isArchived Boolean @default(false)
sets WorkoutSet[]
sporadicSets SporadicSet[]
}
model WorkoutSession {
@@ -100,3 +102,23 @@ model WorkoutPlan {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model SporadicSet {
id String @id @default(uuid())
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
exerciseId String
exercise Exercise @relation(fields: [exerciseId], references: [id])
weight Float?
reps Int?
distanceMeters Float?
durationSeconds Int?
height Float?
bodyWeightPercentage Float?
timestamp DateTime @default(now())
note String?
@@index([userId, timestamp])
}