text: -- CreateEnum
  CREATE TYPE "Role" AS ENUM ('MERCHANT', 'CUSTOMER');
  
  -- CreateEnum
  CREATE TYPE "Status" AS ENUM ('CART', 'BOUGHT', 'DELIEVERED');
  
  -- CreateEnum
  CREATE TYPE "Category" AS ENUM ('FOOD', 'ACCESSORIES', 'TOYS');
  
  -- CreateTable
  CREATE TABLE "User" (
      "id" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "email" TEXT NOT NULL,
      "password" TEXT NOT NULL,
      "firstname" TEXT,
      "lastname" TEXT,
      "role" "Role" NOT NULL,
      "storeId" TEXT,
  
      CONSTRAINT "User_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Store" (
      "id" TEXT NOT NULL,
      "name" TEXT NOT NULL,
      "description" TEXT,
      "address" TEXT NOT NULL,
      "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
  
      CONSTRAINT "Store_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Product" (
      "id" TEXT NOT NULL,
      "name" TEXT NOT NULL,
      "description" TEXT NOT NULL,
      "price" DOUBLE PRECISION NOT NULL,
      "discount" DOUBLE PRECISION NOT NULL,
      "mediaUrl" TEXT[],
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "storeId" TEXT NOT NULL,
      "category" "Category" NOT NULL,
  
      CONSTRAINT "Product_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Orders" (
      "id" TEXT NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "userId" TEXT NOT NULL,
      "productId" TEXT NOT NULL,
      "quantity" INTEGER NOT NULL,
  
      CONSTRAINT "Orders_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateIndex
  CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
  
  -- AddForeignKey
  ALTER TABLE "User" ADD CONSTRAINT "User_storeId_fkey" FOREIGN KEY ("storeId") REFERENCES "Store"("id") ON DELETE SET NULL ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Product" ADD CONSTRAINT "Product_storeId_fkey" FOREIGN KEY ("storeId") REFERENCES "Store"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Orders" ADD CONSTRAINT "Orders_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Orders" ADD CONSTRAINT "Orders_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Product"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  