diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 2e48160..0899bb1 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -39,32 +39,40 @@ model Key { // Application stuff model Track { - id Int @id @default(autoincrement()) - title String - objectKey String + id Int @id @default(autoincrement()) + title String + objectKey String - producer User @relation(fields: [producerId], references: [id], onDelete: Cascade) + producer User @relation(fields: [producerId], references: [id], onDelete: Cascade) producerId String - versions TrackVersion[] + versions TrackVersion[] + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt } model TrackVersion { - id Int @id @default(autoincrement()) + id Int @id @default(autoincrement()) - track Track @relation(fields: [trackId], references: [id], onDelete: Cascade) - trackId Int + track Track @relation(fields: [trackId], references: [id], onDelete: Cascade) + trackId Int - comments Comment[] + comments Comment[] + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt } model Comment { - id Int @id @default(autoincrement()) - content String + id Int @id @default(autoincrement()) + content String - author User @relation(fields: [authorId], references: [id]) - authorId String + author User @relation(fields: [authorId], references: [id]) + authorId String trackVersion TrackVersion @relation(fields: [trackVersionId], references: [id], onDelete: Cascade) trackVersionId Int + + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt }