This commit is contained in:
Your Name committed 2026-09-23 06:57:13 +07:00
1 parent c2269ea090
commit 14d3282a81
8 files changed
+226 -39

No files matched your search

@@ -0,0 +1,7 @@
-- AlterTable
ALTER TABLE "Product" ADD COLUMN IF NOT EXISTS "isDeleted" BOOLEAN NOT NULL DEFAULT false;
ALTER TABLE "Product" ADD COLUMN IF NOT EXISTS "deletedAt" TIMESTAMP(3);
-- CreateIndex
CREATE INDEX IF NOT EXISTS "Product_isDeleted_idx" ON "Product"("isDeleted");
CREATE INDEX IF NOT EXISTS "Product_categoryId_isDeleted_idx" ON "Product"("categoryId", "isDeleted");
+5
View File
@@ -72,8 +72,13 @@ model Product {
reviews Review[]
detailSections ProductDetailSection[]
translations ProductTranslation[]
isDeleted Boolean @default(false)
deletedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([isDeleted])
@@index([categoryId, isDeleted])
}
model ProductTranslation {