Code maintainability fixes
This commit is contained in:
@@ -7,7 +7,6 @@ generator client {
|
||||
|
||||
datasource db {
|
||||
provider = "sqlite"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model User {
|
||||
@@ -60,6 +59,7 @@ model Exercise {
|
||||
isUnilateral Boolean @default(false)
|
||||
|
||||
sets WorkoutSet[]
|
||||
planExercises PlanExercise[]
|
||||
}
|
||||
|
||||
model WorkoutSession {
|
||||
@@ -102,8 +102,19 @@ model WorkoutPlan {
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
name String
|
||||
description String?
|
||||
exercises String // JSON string of exercise IDs
|
||||
exercises String? // JSON string of exercise IDs (Deprecated, to be removed)
|
||||
planExercises PlanExercise[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model PlanExercise {
|
||||
id String @id @default(uuid())
|
||||
planId String
|
||||
plan WorkoutPlan @relation(fields: [planId], references: [id], onDelete: Cascade)
|
||||
exerciseId String
|
||||
exercise Exercise @relation(fields: [exerciseId], references: [id])
|
||||
order Int
|
||||
isWeighted Boolean @default(false)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user