-- CreateTable
CREATE TABLE "tbl_reel" (
    "id" SERIAL NOT NULL,
    "videoUrl" TEXT NOT NULL,
    "description" TEXT,
    "productPageUrl" TEXT,
    "supplierPageUrl" TEXT,
    "views" INTEGER DEFAULT 0,
    "likes" INTEGER DEFAULT 0,
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "product_id" BIGINT NOT NULL,

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

-- CreateIndex
CREATE INDEX "tbl_reel_product_id_idx" ON "tbl_reel"("product_id");

-- AddForeignKey
ALTER TABLE "tbl_reel" ADD CONSTRAINT "tbl_reel_product_id_fkey" FOREIGN KEY ("product_id") REFERENCES "tbl_product"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
