This commit is contained in:
2025-11-17 23:44:45 +03:30
parent 7bd2b59cb1
commit e699a961be
7 changed files with 517 additions and 4 deletions
+2 -2
View File
@@ -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)