ven v
10/19/2022, 1:59 PMven v
10/19/2022, 2:01 PMmodel Reply {
id Int @id @default(autoincrement())
content String @default("")
// author
author User @relation(fields: [authId], references: [authId])
authId String
comment Comment? @relation(fields: [commentId], references: [id])
commentId Int
parentReplyId Int?
parentReply Reply? @relation(name: "parent-reply", fields: [parentReplyId], references: [id], onDelete: NoAction, onUpdate: NoAction)
replies Reply[] @relation(name: "parent-reply")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
ven v
10/19/2022, 2:12 PMRaphael Etim
10/19/2022, 2:43 PMRESTRICT
because NoAction
at the moment does nothing. See this link.ven v
10/19/2022, 2:48 PMRaphael Etim
10/19/2022, 2:55 PM