This commit is contained in:
2025-12-08 10:35:11 +03:30
parent a1255f173d
commit aededf6da9
4 changed files with 40 additions and 18 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ import { BaseEntity } from '../../../common/entities/base.entity';
import { Food } from '../../foods/entities/food.entity';
import { User } from '../../users/entities/user.entity';
import { Order } from 'src/modules/orders/entities/order.entity';
import { PositivePoint, NegativePoint } from '../enums/review-point.enum';
@Entity({ tableName: 'food_comments' })
@Unique({ properties: ['order', 'food', 'user'] })
@@ -23,10 +24,10 @@ export class Review extends BaseEntity {
rating: number = 0;
@Property({ type: 'json', nullable: true })
positivePoints?: string[];
positivePoints?: PositivePoint[];
@Property({ type: 'json', nullable: true })
negativePoints?: string[];
negativePoints?: NegativePoint[];
@Property({ type: 'boolean', default: false })
isApproved: boolean = false;