feat(moderation): adding prisma schema
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 58s
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 58s
This commit is contained in:
parent
b8c3efdedc
commit
9ec42f5d60
3 changed files with 30 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
galaxy/slashtag arguments.txt
|
||||
.venv
|
||||
*.db
|
||||
|
|
|
@ -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",
|
||||
|
|
28
moderation/prisma/schema.prisma
Normal file
28
moderation/prisma/schema.prisma
Normal 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])
|
||||
}
|
Loading…
Reference in a new issue