Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
project_ss23_gameunity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Yusuf Akgül
project_ss23_gameunity
Commits
910e0e67
Commit
910e0e67
authored
1 year ago
by
Omar Kasbah
Browse files
Options
Downloads
Patches
Plain Diff
PrismaFix
parent
08b20fdd
No related branches found
No related tags found
1 merge request
!13
Feat.next auth
Pipeline
#35268
failed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
prisma/schema.prisma
+32
-31
32 additions, 31 deletions
prisma/schema.prisma
with
32 additions
and
31 deletions
prisma/schema.prisma
+
32
−
31
View file @
910e0e67
...
...
@@ -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
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment