seed
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { Collection, Entity, ManyToMany, OneToOne, Property } from '@mikro-orm/core';
|
||||
import { Collection, Entity, ManyToMany, 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';
|
||||
|
||||
@Entity({ tableName: 'foods' })
|
||||
export class Food extends BaseEntity {
|
||||
@OneToOne(() => Restaurant)
|
||||
@ManyToOne(() => Restaurant)
|
||||
restaurant: Restaurant;
|
||||
|
||||
@ManyToMany(() => Category)
|
||||
|
||||
Reference in New Issue
Block a user