mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-09-15 10:42:20 +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")
|
BanEndMod Ban[] @relation("endBanMod")
|
||||||
TempBanUser TempBan[] @relation("tbanUser")
|
TempBanUser TempBan[] @relation("tbanUser")
|
||||||
TempBanMod TempBan[] @relation("tbanMod")
|
TempBanMod TempBan[] @relation("tbanMod")
|
||||||
|
TempBanEndMod TempBan[] @relation("endTbanMod")
|
||||||
VCMuteUser VCMute[] @relation("vcMuteUser")
|
VCMuteUser VCMute[] @relation("vcMuteUser")
|
||||||
VCMuteMod VCMute[] @relation("vcMuteMod")
|
VCMuteMod VCMute[] @relation("vcMuteMod")
|
||||||
}
|
}
|
||||||
@ -139,6 +140,8 @@ model TempBan {
|
|||||||
mod User @relation("tbanMod", fields: [modId], references: [id])
|
mod User @relation("tbanMod", fields: [modId], references: [id])
|
||||||
modId String
|
modId String
|
||||||
startTime DateTime @default(now())
|
startTime DateTime @default(now())
|
||||||
|
endMod User? @relation("endTbanMod", fields: [endModId], references: [id])
|
||||||
|
endModId String?
|
||||||
endTime DateTime
|
endTime DateTime
|
||||||
active Boolean @default(true)
|
active Boolean @default(true)
|
||||||
reason String
|
reason String
|
||||||
|
Loading…
x
Reference in New Issue
Block a user