fix prisma schema

This commit is contained in:
Aman Varshney
2025-03-05 16:29:17 +05:30
parent 64271666d0
commit 8c764c4d1c

View File

@@ -24,7 +24,6 @@ model User {
updatedAt DateTime
sessions Session[]
accounts Account[]
books Book[]
@@unique([email])
@@map("user")
@@ -74,19 +73,3 @@ model Verification {
@@map("verification")
}
model Book {
id String @id @default(auto()) @map("_id") @db.ObjectId
title String
author String
description String?
price Float @default(0)
publishedAt DateTime
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([id, userId])
@@map("book")
}