diff --git a/prisma/schema.prisma b/prisma/schema.prisma index b21e951..8ad2dec 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -38,6 +38,7 @@ model Book { bookImage String? @db.VarChar(500) publisher String @db.VarChar(50) Bookshelf Bookshelf[] + Recommend Recommend[] } model Bookshelf { @@ -80,8 +81,8 @@ 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()) + Book Book @relation(fields: [bookId], references: [id], onDelete: Cascade, map: "recommend_book_id_fk") 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") RecommendAlarm RecommendAlarm[] @@ -132,4 +133,4 @@ model Version { imageUrl String? @db.VarChar(500) text String? @db.VarChar(255) iosForceVersion String? @db.VarChar(255) -} +} \ No newline at end of file