gluestick/prisma/schema.prisma

37 lines
660 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?
}
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
}