Last active
March 5, 2022 16:05
-
-
Save SagnikPradhan/6fadd2c5c711a765c9e5b54947ed9cdd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model OAuthAccount { | |
id String | |
type OAuthProvider | |
username String | |
photoURL String? | |
email String | |
accessToken String | |
refreshToken String | |
expiresBy DateTime | |
sessionId String? | |
session Session? @relation(fields: [sessionId], references: [id]) | |
userId String | |
user User @relation(fields: [userId], references: [id]) | |
@@id([id, type]) | |
} | |
enum UserType { | |
ADMINISTRATOR | |
CLIENT | |
DEVELOPER | |
} | |
model User { | |
id String @id @default(uuid()) | |
name String | |
type UserType | |
photoURL String? | |
accounts OAuthAccount[] | |
} | |
model Session { | |
id String @id | |
redirectUser String? | |
accounts OAuthAccount[] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment