1
0
Fork 0
gluestick/prisma/schema.prisma

49 lines
886 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())
2023-04-26 23:32:52 -04:00
username String? @unique
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-27 13:47:30 -04:00
invalid Boolean
2023-04-25 01:13:35 -04:00
}
2023-04-26 21:21:28 -04:00
model GitHubAuth {
2023-04-27 13:47:30 -04:00
id String @id
2023-04-26 21:21:28 -04:00
user User @relation(fields: [userId], references: [id])
userId Int @unique
accessToken String
2023-04-27 13:47:30 -04:00
invalid Boolean
2023-04-26 21:21:28 -04:00
}