mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 18:52:06 +00:00
feat: implement user follow system
This commit is contained in:
@@ -44,6 +44,18 @@ model User {
|
||||
beerStyleLikes BeerStyleLike[]
|
||||
beerStyleComments BeerStyleComment[]
|
||||
userAvatar UserAvatar?
|
||||
followedBy UserFollow[] @relation("following")
|
||||
following UserFollow[] @relation("follower")
|
||||
}
|
||||
|
||||
model UserFollow {
|
||||
follower User @relation("follower", fields: [followerId], references: [id])
|
||||
followerId String
|
||||
following User @relation("following", fields: [followingId], references: [id])
|
||||
followingId String
|
||||
followedAt DateTime @default(now()) @db.Timestamptz(3)
|
||||
|
||||
@@id([followerId, followingId])
|
||||
}
|
||||
|
||||
model UserAvatar {
|
||||
|
||||
Reference in New Issue
Block a user