Snapshot of uncommitted work: landing, bots, prod infra, partner cabinet, backoffice stage 1

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
zabudko-ruandClaude Opus 5.5 committed 2026-10-21 01:23:32 +04:00
1 parent 45d7512d2b
commit d452824c62
314 files changed
+44394 -121

No files matched your search

@@ -0,0 +1,38 @@
-- CreateEnum
CREATE TYPE "LeadStatus" AS ENUM ('NEW', 'IN_WORK', 'DONE', 'CANCELLED');
-- CreateEnum
CREATE TYPE "LeadContactType" AS ENUM ('PHONE', 'TELEGRAM');
-- CreateTable
CREATE TABLE "Lead" (
"id" TEXT NOT NULL,
"number" SERIAL NOT NULL,
"key" TEXT NOT NULL,
"name" TEXT NOT NULL,
"contact" TEXT NOT NULL,
"contactType" "LeadContactType" NOT NULL,
"locale" "Locale" NOT NULL,
"agency" TEXT,
"utm" JSONB,
"moved" BOOLEAN,
"moveWhen" TEXT,
"moveDate" TIMESTAMP(3),
"package" TEXT,
"options" JSONB,
"submittedAt" TIMESTAMP(3),
"consentAt" TIMESTAMP(3) NOT NULL,
"consentVersion" TEXT NOT NULL,
"status" "LeadStatus" NOT NULL DEFAULT 'NEW',
"adminNote" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Lead_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Lead_number_key" ON "Lead"("number");
-- CreateIndex
CREATE INDEX "Lead_status_createdAt_idx" ON "Lead"("status", "createdAt");