mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-07 19:18:51 +00:00
add refresh token endpoints
This commit is contained in:
parent
9be66a0a2f
commit
a9bda19891
8 changed files with 235 additions and 35 deletions
|
@ -25,8 +25,9 @@ model User {
|
|||
posts Post[]
|
||||
comments Comment[]
|
||||
likes Like[]
|
||||
media Media[] @relation("UploadedMedia")
|
||||
refreshToken RefreshToken[]
|
||||
|
||||
media Media[] @relation("UploadedMedia")
|
||||
following Follow[] @relation("Following")
|
||||
followers Follow[] @relation("Followers")
|
||||
}
|
||||
|
@ -124,4 +125,10 @@ model Follow {
|
|||
followedUser User @relation("Followers", fields: [followedUserId], references: [id])
|
||||
|
||||
@@id([followingUserId, followedUserId])
|
||||
}
|
||||
model RefreshToken {
|
||||
id String @id @default(uuid())
|
||||
expiresAt DateTime
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
userId String
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue