Skip to content

Commit 754ef27

Browse files
authored
Merge pull request #11 from kir-dev/feat/commentprisma
comment sztem kesz
2 parents f52696a + f148a47 commit 754ef27

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

prisma/schema.prisma

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,35 @@ model Follow {
4949
@@unique([followerId, followingId])
5050
@@map("follows")
5151
}
52+
53+
model Like {
54+
id Int @id @default(autoincrement())
55+
56+
userId Int
57+
user User @relation(fields: [userId], references: [id])
58+
59+
postId Int
60+
post Post @relation(fields: [postid], references: [id])
61+
}
62+
63+
model Tag {
64+
id Int @id @default(autoincrement())
65+
66+
tagName String @unique
67+
68+
posts Post[] @relation("TagPost")
69+
}
70+
71+
model Comment {
72+
id Int @id @default(autoincrement())
73+
74+
text String
75+
date DateTime @default(now())
76+
77+
postId Int
78+
post Post @relation(fields: [postId], references: [id])
79+
80+
userId Int
81+
user User @relation(fields: [userId], references: [id])
82+
83+
}

0 commit comments

Comments
 (0)