Will King
03/02/2022, 10:30 PMmodel Dish {
...
}
model Plan {
...
monday Dish[]
tuesday Dish[]
wednesday Dish[]
thursday Dish[]
...
}
Nurul
03/03/2022, 8:32 AMmodel Dish {
id Int @id @default(autoincrement())
planMonday Plan? @relation(name: "monday", fields: [mondayPlanId], references: [id])
planTuesday Plan? @relation(name: "tuesday", fields: [tuesdayPlanId], references: [id])
planWednesday Plan? @relation(name: "wednesday", fields: [wednesdayPlanId], references: [id])
planThursday Plan? @relation(name: "thursday", fields: [thursdayPlanId], references: [id])
mondayPlanId Int?
tuesdayPlanId Int?
wednesdayPlanId Int?
thursdayPlanId Int?
}
model Plan {
id Int @id @default(autoincrement())
monday Dish[] @relation(name: "monday")
tuesday Dish[] @relation(name: "tuesday")
wednesday Dish[] @relation(name: "wednesday")
thursday Dish[] @relation(name: "thursday")
}
Will King
03/03/2022, 8:23 PM