Set logging is now a united. Sporadic set table removed.
This commit is contained in:
@@ -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])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user