up
This commit is contained in:
@@ -4,6 +4,7 @@ import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
import { Restaurant } from '../../../modules/restaurants/entities/restaurant.entity';
|
||||
import { Review } from 'src/modules/review/entities/review.entity';
|
||||
import { Inventory } from 'src/modules/inventory/entities/inventory.entity';
|
||||
import { MealType } from '../interface/food.interface';
|
||||
|
||||
@Entity({ tableName: 'foods' })
|
||||
@Index({ properties: ['restaurant', 'isActive'] })
|
||||
@@ -43,23 +44,11 @@ export class Food extends BaseEntity {
|
||||
@Property({ type: 'int', nullable: true })
|
||||
prepareTime?: number; // in minutes
|
||||
|
||||
@Property({ type: 'boolean', default: false })
|
||||
sat: boolean = false;
|
||||
@Property({ type: 'jsonb', default: [] })
|
||||
weekDays: number[] = [0, 1, 2, 3, 4, 5, 6];
|
||||
|
||||
@Property({ type: 'boolean', default: false })
|
||||
sun: boolean = false;
|
||||
|
||||
@Property({ type: 'boolean', default: false })
|
||||
mon: boolean = false;
|
||||
|
||||
@Property({ type: 'boolean', default: false })
|
||||
breakfast: boolean = false;
|
||||
|
||||
@Property({ type: 'boolean', default: false })
|
||||
noon: boolean = false;
|
||||
|
||||
@Property({ type: 'boolean', default: false })
|
||||
dinner: boolean = false;
|
||||
@Property({ type: 'jsonb', default: [] })
|
||||
mealTypes: MealType[] = [];
|
||||
|
||||
@Property({ type: 'boolean', default: true })
|
||||
isActive: boolean = true;
|
||||
@@ -73,8 +62,8 @@ export class Food extends BaseEntity {
|
||||
@Property({ type: 'boolean', default: false })
|
||||
pickupServe: boolean = false;
|
||||
|
||||
@Property({ type: 'float', default: 0 })
|
||||
rate?: number = 0;
|
||||
@Property({ type: 'float', default: null })
|
||||
score?: number | null = null;
|
||||
|
||||
@Property({ type: 'float', default: 0 })
|
||||
discount: number = 0;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export enum MealType {
|
||||
BREAKFAST = 'breakfast',
|
||||
LUNCH = 'lunch',
|
||||
DINNER = 'dinner',
|
||||
}
|
||||
Reference in New Issue
Block a user