hey, i have a question about db design
model Course {
id String @id @default(cuid())
title String
description String
type CourseType
// slug String @unique
users CourseUser[]
modules CourseModule[]
createdAt DateTime @default(now())
updatedAt DateTime? @updatedAt
}
model CourseModule {
id String @id @default(cuid())
title String
description String
index Int
course Course @relation(fields: [courseId], references: [id])
courseId String
createdAt DateTime @default(now())
updatedAt DateTime? @updatedAt
}```
I wanna know if I wanted to make it so that every ``CourseModule`` several items linked to a ressource : "video" | "project" | "webinar" where each one have some special properties
how can i implement that in a clean way?
I thought about making an enum ``CourseModuleItemType`` and have optional keys Video Project Webinar
Or not have the ``CourseModuleType`` property and straight just optional keys then i would know from which one exists later in the code to know the type