category
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Collection, Entity, ManyToMany, ManyToOne, Property } from '@mikro-orm/core';
|
||||
import { Entity, ManyToOne, Property } from '@mikro-orm/core';
|
||||
import { Category } from './category.entity';
|
||||
import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
import { Restaurant } from '../../../modules/restaurants/entities/restaurant.entity';
|
||||
@@ -8,8 +8,8 @@ export class Food extends BaseEntity {
|
||||
@ManyToOne(() => Restaurant)
|
||||
restaurant: Restaurant;
|
||||
|
||||
@ManyToMany(() => Category)
|
||||
categories = new Collection<Category>(this);
|
||||
@ManyToOne(() => Category)
|
||||
category!: Category;
|
||||
|
||||
@Property({ nullable: true })
|
||||
title?: string;
|
||||
|
||||
Reference in New Issue
Block a user