remove unused modules

This commit is contained in:
2026-01-07 12:24:55 +03:30
parent f2284c103d
commit 560b2983f3
150 changed files with 1853 additions and 96521 deletions
+6 -6
View File
@@ -1,20 +1,20 @@
import type { EntityManager } from '@mikro-orm/core';
import { Food } from '../modules/foods/entities/food.entity';
import { product } from '../modules/products/entities/product.entity';
import { Inventory } from '../modules/inventory/entities/inventory.entity';
export class InventorySeeder {
async run(em: EntityManager): Promise<void> {
const foods = await em.find(Food, {});
const products = await em.find(product, {});
for (const food of foods) {
// Check if inventory already exists for this food
for (const product of products) {
// Check if inventory already exists for this product
const existingInventory = await em.findOne(Inventory, {
food: { id: food.id },
product: { id: product.id },
});
if (!existingInventory) {
const inventory = em.create(Inventory, {
food,
product,
totalStock: 50,
availableStock: 50,
});