-- CreateTable
CREATE TABLE "paypal_events" (
    "id" UUID NOT NULL DEFAULT gen_random_uuid(),
    "paypal_event_id" TEXT NOT NULL,
    "event_type" VARCHAR(100) NOT NULL,
    "resource_id" VARCHAR(100),
    "processed_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "payload" JSONB,

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

-- CreateIndex
CREATE UNIQUE INDEX "paypal_events_paypal_event_id_key" ON "paypal_events"("paypal_event_id");

-- CreateIndex
CREATE INDEX "paypal_events_processed_at_idx" ON "paypal_events"("processed_at");
