mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-18 16:54:16 +02:00
feat(db): add vcmute database
This commit is contained in:
parent
4b6dde3af2
commit
b14de47934
17
prisma/migrations/20230211001033_vcmute/migration.sql
Normal file
17
prisma/migrations/20230211001033_vcmute/migration.sql
Normal file
@ -0,0 +1,17 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "VCMute" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"modId" TEXT NOT NULL,
|
||||
"time" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"endTime" TIMESTAMP(3),
|
||||
"reason" TEXT,
|
||||
|
||||
CONSTRAINT "VCMute_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "VCMute" ADD CONSTRAINT "VCMute_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "VCMute" ADD CONSTRAINT "VCMute_modId_fkey" FOREIGN KEY ("modId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
@ -46,6 +46,8 @@ model User {
|
||||
BanEndMod Ban[] @relation("endBanMod")
|
||||
TempBanUser TempBan[] @relation("tbanUser")
|
||||
TempBanMod TempBan[] @relation("tbanMod")
|
||||
VCMuteUser VCMute[] @relation("vcMuteUser")
|
||||
VCMuteMod VCMute[] @relation("vcMuteMod")
|
||||
}
|
||||
|
||||
model Verify {
|
||||
@ -124,3 +126,14 @@ model TempBan {
|
||||
active Boolean @default(true)
|
||||
reason String
|
||||
}
|
||||
|
||||
model VCMute {
|
||||
id Int @id @default(autoincrement())
|
||||
user User @relation("vcMuteUser", fields: [userId], references: [id])
|
||||
userId String
|
||||
mod User @relation("vcMuteMod", fields: [modId], references: [id])
|
||||
modId String
|
||||
time DateTime @default(now())
|
||||
endTime DateTime?
|
||||
reason String?
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user