Track all requests to OpenAI in a database

this will be in future used to limit access to the bot
This commit is contained in:
Wroclaw 2023-05-02 17:55:48 +02:00
parent 05c50d25e4
commit a66115c3b8
5 changed files with 94 additions and 0 deletions

23
schema.prisma Normal file
View file

@ -0,0 +1,23 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model Usage {
timestamp DateTime @id
user BigInt
channel BigInt
guild BigInt?
usageReguest Int
usageResponse Int
}
model Limits {
user BigInt @id
limit Int?
vip Boolean @default(false)
}