text: -- CreateEnum
  CREATE TYPE "Time" AS ENUM ('Past');
  
  -- CreateEnum
  CREATE TYPE "Gender" AS ENUM ('Feminino', 'Masculino', 'Outros');
  
  -- CreateEnum
  CREATE TYPE "Status" AS ENUM ('ANALISANDO', 'APROVADO', 'CONCLUIDO', 'ENVIADO', 'ENTREGUE');
  
  -- CreateTable
  CREATE TABLE "Cliente" (
      "id" SERIAL NOT NULL,
      "name" TEXT NOT NULL,
      "tel" TEXT NOT NULL,
      "email" TEXT NOT NULL,
      "gender" "Gender" NOT NULL DEFAULT E'Outros',
      "cpf" TEXT NOT NULL,
      "addressId" INTEGER NOT NULL,
      "updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
  
      CONSTRAINT "Cliente_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Address" (
      "id" SERIAL NOT NULL,
      "street" TEXT NOT NULL,
      "number" TEXT NOT NULL,
      "district" TEXT NOT NULL,
      "postalcode" TEXT NOT NULL,
      "city" TEXT NOT NULL,
      "state" TEXT NOT NULL,
      "complement" TEXT,
  
      CONSTRAINT "Address_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Budget" (
      "id" SERIAL NOT NULL,
      "total" DECIMAL(65,30) NOT NULL,
      "clienteId" INTEGER NOT NULL,
      "status" "Status" NOT NULL DEFAULT E'ANALISANDO',
      "updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
  
      CONSTRAINT "Budget_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "ProductToBudget" (
      "id" SERIAL NOT NULL,
      "qtd" INTEGER NOT NULL,
      "unitPrice" DECIMAL(65,30) NOT NULL,
      "productId" INTEGER NOT NULL,
      "budgetId" INTEGER NOT NULL,
  
      CONSTRAINT "ProductToBudget_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Produto" (
      "id" SERIAL NOT NULL,
      "name" TEXT NOT NULL,
      "desc" TEXT,
      "price" DECIMAL(65,30) NOT NULL,
      "stocks" INTEGER NOT NULL DEFAULT 0,
      "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
  
      CONSTRAINT "Produto_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateIndex
  CREATE UNIQUE INDEX "Cliente_cpf_key" ON "Cliente"("cpf");
  
  -- AddForeignKey
  ALTER TABLE "Cliente" ADD CONSTRAINT "Cliente_addressId_fkey" FOREIGN KEY ("addressId") REFERENCES "Address"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Budget" ADD CONSTRAINT "Budget_clienteId_fkey" FOREIGN KEY ("clienteId") REFERENCES "Cliente"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "ProductToBudget" ADD CONSTRAINT "ProductToBudget_productId_fkey" FOREIGN KEY ("productId") REFERENCES "Produto"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "ProductToBudget" ADD CONSTRAINT "ProductToBudget_budgetId_fkey" FOREIGN KEY ("budgetId") REFERENCES "Budget"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  