-- CreateTable
CREATE TABLE "plan_catalogo" (
    "id" TEXT NOT NULL,
    "codename" VARCHAR(50) NOT NULL,
    "nombre" TEXT NOT NULL,
    "verticalProfile" "VerticalProfile" NOT NULL,
    "precio_base" DECIMAL(10,2) NOT NULL,
    "frecuencia" VARCHAR(10) NOT NULL,
    "limits" JSONB NOT NULL,
    "active" BOOLEAN NOT NULL DEFAULT true,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

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

-- CreateTable
CREATE TABLE "plan_addon_catalogo" (
    "id" TEXT NOT NULL,
    "codename" VARCHAR(50) NOT NULL,
    "nombre" TEXT NOT NULL,
    "verticalProfile" "VerticalProfile",
    "precio" DECIMAL(10,2) NOT NULL,
    "frecuencia" VARCHAR(10) NOT NULL,
    "delta" JSONB NOT NULL,
    "active" BOOLEAN NOT NULL DEFAULT true,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

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

-- CreateIndex
CREATE UNIQUE INDEX "plan_catalogo_codename_key" ON "plan_catalogo"("codename");

-- CreateIndex
CREATE UNIQUE INDEX "plan_addon_catalogo_codename_key" ON "plan_addon_catalogo"("codename");
