update food

This commit is contained in:
2025-12-16 14:47:15 +03:30
parent 0040acaf2b
commit 8417eef69c
6 changed files with 49 additions and 26 deletions
+9
View File
@@ -1,3 +1,5 @@
import { MealType } from '../../modules/foods/interface/food.interface';
export interface FoodData {
title: string;
desc: string;
@@ -9,6 +11,13 @@ export interface FoodData {
stockDefault: number;
images: string[];
content?: string[];
weekDays?: number[];
mealTypes?: MealType[];
discount?: number;
score?: number;
inPlaceServe?: boolean;
pickupServe?: boolean;
isSpecialOffer?: boolean;
}
export const foodsData: FoodData[] = [
+8 -11
View File
@@ -30,18 +30,15 @@ export class FoodsSeeder {
restaurant,
category,
isActive: foodData.isActive,
sat: false,
sun: false,
mon: false,
breakfast: false,
noon: false,
dinner: false,
discount: 0,
rate: 0,
inPlaceServe: false,
pickupServe: false,
// new fields on Food entity
weekDays: foodData.weekDays ?? [0, 1, 2, 3, 4, 5, 6],
mealTypes: foodData.mealTypes ?? [],
discount: foodData.discount ?? 0,
score: foodData.score ?? 0,
inPlaceServe: foodData.inPlaceServe ?? false,
pickupServe: foodData.pickupServe ?? false,
images: foodData.images,
isSpecialOffer: false,
isSpecialOffer: foodData.isSpecialOffer ?? false,
});
em.persist(food);