Refactor product model by removing unused sellCostMinNeutral and sellCostMaxNeutral fields, and simplify product insertion logic in initialization script.

This commit is contained in:
Torsten Schulz (local)
2025-12-18 14:41:56 +01:00
parent a486292880
commit 8e1e0968ae
2 changed files with 1 additions and 16 deletions

View File

@@ -282,11 +282,7 @@ async function initializeFalukantProducts() {
{ labelTr: 'ox', category: 5, productionTime: 5, sellCost: 60 },
];
const productsToInsert = baseProducts.map(p => ({
...p,
sellCostMinNeutral: Math.ceil(p.sellCost * factorMin),
sellCostMaxNeutral: Math.ceil(p.sellCost * factorMax),
}));
const productsToInsert = baseProducts;
await ProductType.bulkCreate(productsToInsert, {
ignoreDuplicates: true,