change entity names

This commit is contained in:
2026-02-08 09:18:20 +03:30
parent 6be6a66079
commit 9a7010dcea
180 changed files with 2751 additions and 2513 deletions
@@ -1,14 +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';
import { Product } from '../../products/entities/product.entity';
@Entity({ tableName: 'favorites' })
@Unique({ properties: ['user', 'food'] })
@Unique({ properties: ['user', 'product'] })
export class Favorite extends BaseEntity {
@ManyToOne(() => User)
user: User;
@ManyToOne(() => Food)
food: Food;
@ManyToOne(() => Product)
product: Product;
}