Robert Woods
08/09/2022, 4:36 PMexport type LessonsCompleted = {
id: number
watchedVideo: boolean
readText: boolean
completionDate: Date | null
userId: string
lessonId: number
}
has a relation to Lesson, however the generate command doesn't add that to the client. I can manually add lesson: Lesson to my LessonsCompleted model and I'm able to select the lesson as needed, however when I regenerate my client, that is undone and the field is no longer on the model. Is there anyway to get around this? Am I misunderstanding something?Nurul
08/10/2022, 2:16 PMLessonsCompletedGetPayload type that is generated and exposed by Prisma Client under the Prisma namespace in combination with the validator.
Hereโs a guide on how exactly you can achieve it: Using Variations of Generated model typeRobert Woods
08/10/2022, 2:36 PM