This commit is contained in:
2025-11-25 11:26:33 +03:30
parent d737b3dc24
commit e21abda0ce
7 changed files with 67 additions and 69 deletions
+3 -3
View File
@@ -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;