-- AlterTable: tambah kemampuan admin untuk suspend/ban user (moderasi scam,
-- harassment, TOS violation). Suspended user diblokir sign-in dan dilarang
-- melakukan aksi mutatif. Hard-delete dihindari supaya audit trail terjaga.
ALTER TABLE "User" ADD COLUMN "suspended" BOOLEAN NOT NULL DEFAULT false;
ALTER TABLE "User" ADD COLUMN "suspendedAt" TIMESTAMP(3);
ALTER TABLE "User" ADD COLUMN "suspendedReason" TEXT;
ALTER TABLE "User" ADD COLUMN "suspendedById" TEXT;

-- AddForeignKey: admin yang suspend tetap auditable kalau admin dihapus.
ALTER TABLE "User" ADD CONSTRAINT "User_suspendedById_fkey"
  FOREIGN KEY ("suspendedById") REFERENCES "User"("id")
  ON DELETE SET NULL ON UPDATE CASCADE;

-- CreateIndex: filter user list admin sering pakai suspended status.
CREATE INDEX "User_suspended_idx" ON "User"("suspended");
