Store a customer address list for physical catalog requests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-26 11:12:10 +03:30
co-authored by Cursor
parent d0122ab08b
commit 7ee78b070a
11 changed files with 547 additions and 7 deletions
@@ -0,0 +1,13 @@
CREATE TABLE "CustomerAddress" (
"id" TEXT NOT NULL,
"customerId" TEXT NOT NULL,
"label" TEXT,
"text" TEXT NOT NULL,
"isDefault" BOOLEAN NOT NULL DEFAULT false,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "CustomerAddress_pkey" PRIMARY KEY ("id")
);
CREATE INDEX "CustomerAddress_customerId_idx" ON "CustomerAddress"("customerId");
ALTER TABLE "CustomerAddress" ADD CONSTRAINT "CustomerAddress_customerId_fkey" FOREIGN KEY ("customerId") REFERENCES "Customer"("id") ON DELETE CASCADE ON UPDATE CASCADE;