chore: rebuild runtime bundle for colorsJson fix

This commit is contained in:
2026-10-01 11:50:58 +03:30
parent e1395bc5b0
commit 8e336e32bb
8 changed files with 702 additions and 1094 deletions
@@ -0,0 +1,8 @@
-- AlterTable
ALTER TABLE "Product" ADD COLUMN "brandId" TEXT;
-- CreateIndex
CREATE INDEX "Product_brandId_idx" ON "Product"("brandId");
-- AddForeignKey
ALTER TABLE "Product" ADD CONSTRAINT "Product_brandId_fkey" FOREIGN KEY ("brandId") REFERENCES "Brand"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1 @@
ALTER TABLE "InternalMessage" ADD COLUMN "link" TEXT;
@@ -0,0 +1,5 @@
-- Remove Catalog as independent entity; Product is the sole merchandise unit.
ALTER TABLE "Product" DROP CONSTRAINT IF EXISTS "Product_catalogId_fkey";
DROP INDEX IF EXISTS "Product_catalogId_idx";
ALTER TABLE "Product" DROP COLUMN IF EXISTS "catalogId";
DROP TABLE IF EXISTS "Catalog";
@@ -0,0 +1 @@
DROP TABLE IF EXISTS "StockNotifyRequest";
+6 -40
View File
@@ -143,7 +143,6 @@ model Company {
updatedAt DateTime @updatedAt
bankAccounts BankAccount[]
catalogs Catalog[]
products Product[]
orders Order[]
customers Customer[]
@@ -169,35 +168,16 @@ model BankAccount {
@@index([companyId])
}
model Catalog {
id String @id @default(cuid())
companyId String
name String
code String
description String?
imageUrl String?
displayOrder Int @default(0)
isActive Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
company Company @relation(fields: [companyId], references: [id], onDelete: Cascade)
products Product[]
@@unique([companyId, code])
@@index([companyId])
}
model Product {
id String @id @default(cuid())
companyId String
catalogId String
name String
code String
color String
description String?
minMeterage Float @default(30)
orderMultiplier Float @default(10)
/// قیمت هر متر (تومان) برای نمایش کاتالوگ / پیش‌فاکتور
basePrice Float?
stock Float?
isActive Boolean @default(true)
@@ -214,21 +194,21 @@ model Product {
subtitle String?
rollMeters Float @default(50)
isNew Boolean @default(false)
brandId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
company Company @relation(fields: [companyId], references: [id], onDelete: Cascade)
catalog Catalog @relation(fields: [catalogId], references: [id], onDelete: Cascade)
brand Brand? @relation(fields: [brandId], references: [id], onDelete: SetNull)
cartItems CartItem[]
orderItems OrderItem[]
favorites ProductFavorite[]
catalogRequestItems CatalogRequestItem[]
stockNotifyRequests StockNotifyRequest[]
productSuggestions ProductSuggestion[]
@@unique([companyId, code])
@@index([catalogId])
@@index([companyId])
@@index([brandId])
@@index([usageCategory])
@@index([season])
}
@@ -273,7 +253,6 @@ model Customer {
remindersAbout Reminder[] @relation("ReminderCustomer")
favorites ProductFavorite[]
catalogRequests CatalogRequest[]
stockNotifyRequests StockNotifyRequest[]
productSuggestions ProductSuggestion[]
customerBrands CustomerBrand[]
addresses CustomerAddress[]
@@ -585,6 +564,7 @@ model InternalMessage {
senderName String
subject String
preview String
link String?
isRead Boolean @default(false)
sentAt DateTime @default(now())
}
@@ -658,6 +638,7 @@ model Brand {
updatedAt DateTime @updatedAt
customers CustomerBrand[]
products Product[]
}
model CustomerBrand {
@@ -741,21 +722,6 @@ model CatalogItemMovement {
@@index([itemId])
}
model StockNotifyRequest {
id String @id @default(cuid())
customerId String
productId String
active Boolean @default(true)
createdAt DateTime @default(now())
notifiedAt DateTime?
customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
@@unique([customerId, productId])
@@index([productId, active])
}
model ProductSuggestion {
id String @id @default(cuid())
customerId String
+12 -50
View File
File diff suppressed because one or more lines are too long
+644 -979
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -5,5 +5,5 @@
"outDir": "./dist"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
"exclude": ["node_modules", "test", "dist", "**/*spec.ts", "src/catalogs/**/*"]
}