update food
This commit is contained in:
@@ -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[] = [
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user