-- CreateEnum
CREATE TYPE "ReservationPhotoType" AS ENUM ('PICKUP', 'DROPOFF');

-- CreateTable
CREATE TABLE "reservation_photos" (
    "id" TEXT NOT NULL,
    "reservationId" TEXT NOT NULL,
    "type" "ReservationPhotoType" NOT NULL,
    "url" TEXT NOT NULL,
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

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

-- CreateIndex
CREATE INDEX "reservation_photos_reservationId_idx" ON "reservation_photos"("reservationId");

-- AddForeignKey
ALTER TABLE "reservation_photos" ADD CONSTRAINT "reservation_photos_reservationId_fkey" FOREIGN KEY ("reservationId") REFERENCES "reservations"("id") ON DELETE CASCADE ON UPDATE CASCADE;
