-- CreateEnum
CREATE TYPE "ModerationStatus" AS ENUM ('PENDING', 'APPROVED', 'REJECTED');

-- AlterTable
ALTER TABLE "coupons" ADD COLUMN     "moderationStatus" "ModerationStatus" NOT NULL DEFAULT 'PENDING',
ADD COLUMN     "publishedAt" TIMESTAMP(3),
ADD COLUMN     "rejectedAt" TIMESTAMP(3),
ADD COLUMN     "rejectedReason" TEXT;

-- AlterTable
ALTER TABLE "lucky_draws" ADD COLUMN     "moderationStatus" "ModerationStatus" NOT NULL DEFAULT 'PENDING',
ADD COLUMN     "publishedAt" TIMESTAMP(3),
ADD COLUMN     "rejectedAt" TIMESTAMP(3),
ADD COLUMN     "rejectedReason" TEXT;

-- CreateIndex
CREATE INDEX "coupons_moderationStatus_createdAt_idx" ON "coupons"("moderationStatus", "createdAt");

-- CreateIndex
CREATE INDEX "lucky_draws_moderationStatus_createdAt_idx" ON "lucky_draws"("moderationStatus", "createdAt");
