-- AlterTable
ALTER TABLE "CommissionRequest" ADD COLUMN     "customFields" JSONB,
ADD COLUMN     "customerSocials" TEXT,
ADD COLUMN     "ipAddress" TEXT,
ADD COLUMN     "status" TEXT NOT NULL DEFAULT 'NEW',
ADD COLUMN     "userAgent" TEXT;

-- CreateTable
CREATE TABLE "CommissionRequestFile" (
    "id" TEXT NOT NULL,
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" TIMESTAMP(3) NOT NULL,
    "sortIndex" INTEGER NOT NULL DEFAULT 0,
    "objectKey" TEXT NOT NULL,
    "originalName" TEXT NOT NULL,
    "mimeType" TEXT NOT NULL,
    "sizeBytes" INTEGER NOT NULL,
    "requestId" TEXT NOT NULL,

    CONSTRAINT "CommissionRequestFile_pkey" PRIMARY KEY ("id")
);

-- AddForeignKey
ALTER TABLE "CommissionRequestFile" ADD CONSTRAINT "CommissionRequestFile_requestId_fkey" FOREIGN KEY ("requestId") REFERENCES "CommissionRequest"("id") ON DELETE CASCADE ON UPDATE CASCADE;
