feat(moderation): adding prisma schema
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 58s

This commit is contained in:
SeaswimmerTheFsh 2023-10-26 21:05:01 -04:00
parent b8c3efdedc
commit 9ec42f5d60
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE
3 changed files with 30 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
galaxy/slashtag arguments.txt
.venv
*.db

View file

@ -20,7 +20,7 @@ class Moderation(commands.Cog):
self.config = Config.get_conf(self, identifier=481923957134912)
self.config.register_global(
database_provider = "sqlite",
database_address= " ",
database_address= "file:moderation.db",
database_port = " ",
database_name = "moderation",
database_username = "red",

View file

@ -0,0 +1,28 @@
datasource db {
provider = "sqlite"
url = "file:moderation.db"
}
generator client {
provider = "prisma-client-py"
interface = "asyncio"
recursive_type_depth = 5
}
model Moderation {
moderationId Int @id @unique
timestamp DateTime
moderationType String
targetId BigInt
moderatorId BigInt
roleId BigInt?
duration String?
endTimestamp DateTime?
reason String?
resolved Boolean
resolvedBy BigInt?
resolveReason String?
expired Boolean
@@index([moderationId, targetId, moderatorId])
}