mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
fix prisma schema
This commit is contained in:
@@ -24,7 +24,6 @@ model User {
|
|||||||
updatedAt DateTime
|
updatedAt DateTime
|
||||||
sessions Session[]
|
sessions Session[]
|
||||||
accounts Account[]
|
accounts Account[]
|
||||||
books Book[]
|
|
||||||
|
|
||||||
@@unique([email])
|
@@unique([email])
|
||||||
@@map("user")
|
@@map("user")
|
||||||
@@ -74,19 +73,3 @@ model Verification {
|
|||||||
|
|
||||||
@@map("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")
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user