import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsString, IsIn, IsOptional } from 'class-validator';

export class CreateFeedbackDto {
  @ApiPropertyOptional({ description: '用户 ID' })
  @IsOptional()
  @IsString()
  userId?: string;

  @ApiProperty({ description: '反馈类型', enum: ['bug', 'feature', 'general'] })
  @IsString()
  @IsIn(['bug', 'feature', 'general'])
  type: 'bug' | 'feature' | 'general';

  @ApiProperty({ description: '反馈内容' })
  @IsString()
  content: string;

  @ApiPropertyOptional({ description: '联系方式' })
  @IsOptional()
  @IsString()
  contact?: string;
}
