1
0
Fork 0
gluestick/prisma/schema.prisma

47 lines
826 B
Plaintext

generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = "file:./database.db"
}
model AuthTicket {
id Int @id @default(autoincrement())
ticket String
expiresAt DateTime
user User @relation(references: [id], fields: [userId])
userId Int @unique
}
model User {
id Int @id @default(autoincrement())
username String?
authTicket AuthTicket?
discordAuth DiscordAuth?
githubAuth GitHubAuth?
}
model DiscordAuth {
id String @id
user User @relation(fields: [userId], references: [id])
userId Int @unique
accessToken String
refreshToken String
expiresAt DateTime
}
model GitHubAuth {
id Int @id
user User @relation(fields: [userId], references: [id])
userId Int @unique
accessToken String
}