import { IsArray, IsIn, IsInt, Max, Min } from 'class-validator';

export class UpdateUploadSettingsDto {
  @IsInt()
  @Min(1)
  @Max(50) // 受 fastify-multipart 当前上限约束（main.ts: fileSize=50MB），后续可提升
  maxFileSizeMB!: number;

  @IsInt()
  @Min(1)
  @Max(20)
  maxFiles!: number;

  @IsArray()
  @IsIn(['image', 'video', 'audio', 'document', 'archive', 'other'], {
    each: true,
  })
  allowedTypes!: string[];
}

export interface UploadSettingsVo {
  maxFileSizeMB: number;
  maxFiles: number;
  allowedTypes: string[];
}
