mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-09-15 12:02:21 +02:00
feat(db): add end mod for temp bans
This commit is contained in:
parent
dadaacd636
commit
f3fa1398e8
@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "TempBan" ADD COLUMN "endModId" TEXT;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "TempBan" ADD CONSTRAINT "TempBan_endModId_fkey" FOREIGN KEY ("endModId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
@ -49,6 +49,7 @@ model User {
|
||||
BanEndMod Ban[] @relation("endBanMod")
|
||||
TempBanUser TempBan[] @relation("tbanUser")
|
||||
TempBanMod TempBan[] @relation("tbanMod")
|
||||
TempBanEndMod TempBan[] @relation("endTbanMod")
|
||||
VCMuteUser VCMute[] @relation("vcMuteUser")
|
||||
VCMuteMod VCMute[] @relation("vcMuteMod")
|
||||
}
|
||||
@ -139,6 +140,8 @@ model TempBan {
|
||||
mod User @relation("tbanMod", fields: [modId], references: [id])
|
||||
modId String
|
||||
startTime DateTime @default(now())
|
||||
endMod User? @relation("endTbanMod", fields: [endModId], references: [id])
|
||||
endModId String?
|
||||
endTime DateTime
|
||||
active Boolean @default(true)
|
||||
reason String
|
||||
|
Loading…
x
Reference in New Issue
Block a user