import { IsString, IsNumber, IsOptional, Min, Max } from 'class-validator'; import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class CreateReviewDto { @ApiProperty({ description: 'User ID' }) @IsString() userId: string; @ApiProperty({ description: 'Reviewable type', example: 'establishment' }) @IsString() reviewableType: string; @ApiProperty({ description: 'Reviewable ID' }) @IsString() reviewableId: string; @ApiProperty({ description: 'Rating (1-5)', example: 5 }) @IsNumber() @Min(1) @Max(5) rating: number; @ApiPropertyOptional({ description: 'Review title', example: 'Amazing experience!' }) @IsOptional() @IsString() title?: string; @ApiPropertyOptional({ description: 'Review comment' }) @IsOptional() @IsString() comment?: string; @ApiPropertyOptional({ description: 'Review images' }) @IsOptional() images?: Record; }