This commit is contained in:
2026-02-08 08:50:08 +03:30
commit 8af4936ed0
323 changed files with 92747 additions and 0 deletions
@@ -0,0 +1,14 @@
import { Entity, ManyToOne, Unique } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { User } from '../../users/entities/user.entity';
import { Food } from '../../foods/entities/food.entity';
@Entity({ tableName: 'favorites' })
@Unique({ properties: ['user', 'food'] })
export class Favorite extends BaseEntity {
@ManyToOne(() => User)
user: User;
@ManyToOne(() => Food)
food: Food;
}