Skip to content

Instantly share code, notes, and snippets.

@SagnikPradhan
Last active March 5, 2022 16:05
Show Gist options
  • Save SagnikPradhan/6fadd2c5c711a765c9e5b54947ed9cdd to your computer and use it in GitHub Desktop.
Save SagnikPradhan/6fadd2c5c711a765c9e5b54947ed9cdd to your computer and use it in GitHub Desktop.
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