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:
parent
05c50d25e4
commit
a66115c3b8
5 changed files with 94 additions and 0 deletions
23
schema.prisma
Normal file
23
schema.prisma
Normal 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue