diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 756b3a1..b21e951 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -80,6 +80,7 @@ model Recommend { recommendedBy Int recommendTo Int bookId Int + Book Book @relation(fields: [bookId], references: [id], onDelete: Cascade, map: "recommend_book_id_fk") createdAt DateTime @default(now()) recommendToToUser User @relation("Recommend_recommendToToUser", fields: [recommendTo], references: [id], onDelete: Cascade, map: "recommend_user_id_fk_2") recommendedByToUser User @relation("Recommend_recommendedByToUser", fields: [recommendedBy], references: [id], onDelete: Cascade, map: "recommend_user_id_fk")