Skip to content

Commit cd53ee6

Browse files
Merge pull request #12 from kir-dev/poszt
Post kesz
2 parents 754ef27 + fce8225 commit cd53ee6

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

prisma/schema.prisma

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ model Follow {
5353
model Like {
5454
id Int @id @default(autoincrement())
5555
56-
userId Int
56+
userId Int
5757
user User @relation(fields: [userId], references: [id])
5858
5959
postId Int
@@ -70,14 +70,34 @@ model Tag {
7070

7171
model Comment {
7272
id Int @id @default(autoincrement())
73-
73+
7474
text String
7575
date DateTime @default(now())
7676
77-
postId Int
77+
postId Int
7878
post Post @relation(fields: [postId], references: [id])
7979
8080
userId Int
8181
user User @relation(fields: [userId], references: [id])
8282
83-
}
83+
}
84+
85+
model Post{
86+
id Int @id @default(autoincrement())
87+
88+
title String
89+
text String
90+
91+
date DateTime @default(now())
92+
93+
comments Comment[]
94+
95+
likes Like[]
96+
97+
image String
98+
99+
tags Tag[] @relation("TagPost")
100+
101+
authorId Int
102+
author User @relation(fields: [authorId], references: [id])
103+
}

0 commit comments

Comments
 (0)