feat: implement user profile, order history, and address book with checkout integration

This commit is contained in:
Your Name committed 2026-06-07 18:48:56 +07:00
1 parent bae945b9d4
commit 0c3c450e1f
9 files changed
+1109 -32

No files matched your search

@@ -0,0 +1,20 @@
-- CreateTable
CREATE TABLE "CustomerAddress" (
"id" SERIAL NOT NULL,
"customerId" INTEGER NOT NULL,
"recipientName" TEXT NOT NULL,
"phone" TEXT NOT NULL,
"addressLine" TEXT NOT NULL,
"subdistrict" TEXT NOT NULL,
"district" TEXT NOT NULL,
"province" TEXT NOT NULL,
"zipcode" TEXT NOT NULL,
"isDefault" BOOLEAN NOT NULL DEFAULT false,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "CustomerAddress_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "CustomerAddress" ADD CONSTRAINT "CustomerAddress_customerId_fkey" FOREIGN KEY ("customerId") REFERENCES "Customer"("id") ON DELETE CASCADE ON UPDATE CASCADE;