Skip to content
Snippets Groups Projects
Commit 910e0e67 authored by Omar Kasbah's avatar Omar Kasbah
Browse files

PrismaFix

parent 08b20fdd
No related branches found
No related tags found
1 merge request!13Feat.next auth
Pipeline #35268 failed
......@@ -11,47 +11,48 @@ datasource db {
}
model User {
id String @id @default(cuid())
userName String @unique
name String?
email String? @unique
emailVerified DateTime?
image String?
Post Post[]
Comment Comment[]
Like Like[]
id String @id @default(dbgenerated()) @db.Uuid
userName String @unique
name String?
email String? @unique
emailVerified DateTime?
image String?
Post Post[]
Comment Comment[]
Like Like[]
}
model Post {
id String @id @default(dbgenerated()) @db.Uuid
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
content String
likeCount Int? @default(0)
gameId String?
published Boolean @default(false)
userId String
user User @relation(fields: [userId], references: [id])
Comment Comment[]
Like Like[]
id String @id @default(dbgenerated()) @db.Uuid
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
content String
likeCount Int? @default(0)
gameId String?
published Boolean @default(false)
userId String @db.Uuid
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
Comment Comment[]
Like Like[]
}
model Like {
id String @id @default(dbgenerated()) @db.Uuid
postId String
userId String
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
id String @id @default(dbgenerated()) @db.Uuid
postId String @db.Uuid
userId String @db.Uuid
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
model Comment {
id String @id @default(cuid())
id String @id @default(dbgenerated()) @db.Uuid
message String
postId String
userId String
postId String @db.Uuid
userId String @db.Uuid
createdAt DateTime @default(now())
post Post @relation(fields: [postId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id])
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment