1
0
Fork 0
gluestick/prisma/schema.prisma

47 lines
826 B
Plaintext
Raw Normal View History

2023-04-25 01:13:35 -04:00
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?
2023-04-25 01:13:35 -04:00
discordAuth DiscordAuth?
2023-04-26 21:21:28 -04:00
githubAuth GitHubAuth?
2023-04-25 01:13:35 -04:00
}
model DiscordAuth {
id String @id
user User @relation(fields: [userId], references: [id])
userId Int @unique
2023-04-25 01:13:35 -04:00
accessToken String
refreshToken String
expiresAt DateTime
2023-04-25 01:13:35 -04:00
}
2023-04-26 21:21:28 -04:00
model GitHubAuth {
id Int @id
user User @relation(fields: [userId], references: [id])
userId Int @unique
accessToken String
}