Set logging is now a united. Sporadic set table removed.

This commit is contained in:
AG
2025-12-05 08:55:59 +02:00
parent a632de65ea
commit 41d1d0f16a
19 changed files with 1129 additions and 1232 deletions

View File

@@ -25,7 +25,6 @@ model User {
exercises Exercise[]
plans WorkoutPlan[]
weightRecords BodyWeightRecord[]
sporadicSets SporadicSet[]
}
model BodyWeightRecord {
@@ -61,7 +60,6 @@ model Exercise {
isUnilateral Boolean @default(false)
sets WorkoutSet[]
sporadicSets SporadicSet[]
}
model WorkoutSession {
@@ -74,6 +72,7 @@ model WorkoutSession {
note String?
planId String?
planName String?
type String @default("STANDARD") // STANDARD, QUICK_LOG
sets WorkoutSet[]
}
@@ -90,8 +89,11 @@ model WorkoutSet {
reps Int?
distanceMeters Float?
durationSeconds Int?
height Float?
bodyWeightPercentage Float?
completed Boolean @default(true)
side String? // LEFT, RIGHT, or null for bilateral
timestamp DateTime @default(now())
}
model WorkoutPlan {
@@ -105,23 +107,3 @@ model WorkoutPlan {
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?
side String? // LEFT, RIGHT, or null for bilateral
timestamp DateTime @default(now())
note String?
@@index([userId, timestamp])
}