import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { IsEnum, IsOptional, IsString, MaxLength } from 'class-validator'; export enum CloseChatType { Cancel = 'cancel', Report = 'report', } export class CloseChatDto { @ApiProperty({ enum: CloseChatType, description: 'cancel — отменить матч, report — пожаловаться' }) @IsEnum(CloseChatType) type: CloseChatType; @ApiPropertyOptional({ description: 'Сообщение собеседнику при отмене матча' }) @IsOptional() @IsString() @MaxLength(500) cancelMessage?: string; @ApiPropertyOptional({ description: 'Причина жалобы (preset)' }) @IsOptional() @IsString() @MaxLength(200) reportReason?: string; @ApiPropertyOptional({ description: 'Дополнительное описание жалобы' }) @IsOptional() @IsString() @MaxLength(500) reportDescription?: string; }