import { IsString, IsOptional, IsNumber, IsBoolean, IsEmail, IsUrl } from 'class-validator';

export class UpdateConfigDto {
  // Configuration Email (SMTP)
  @IsOptional()
  @IsString()
  smtp_host?: string;

  @IsOptional()
  @IsNumber()
  smtp_port?: number;

  @IsOptional()
  @IsBoolean()
  smtp_secure?: boolean;

  @IsOptional()
  @IsBoolean()
  smtp_auth_required?: boolean;

  @IsOptional()
  @IsString()
  smtp_user?: string;

  @IsOptional()
  @IsString()
  smtp_password?: string;

  @IsOptional()
  @IsString()
  email_from_name?: string;

  @IsOptional()
  @IsEmail()
  email_from_address?: string;

  // Configuration Application
  @IsOptional()
  @IsString()
  app_name?: string;

  @IsOptional()
  @IsUrl()
  app_url?: string;

  @IsOptional()
  @IsString()
  app_logo_url?: string;

  // Configuration Sécurité
  @IsOptional()
  @IsNumber()
  password_reset_token_expiry_days?: number;

  @IsOptional()
  @IsNumber()
  jwt_expiry_hours?: number;

  @IsOptional()
  @IsNumber()
  max_upload_size_mb?: number;

  @IsOptional()
  @IsNumber()
  bcrypt_rounds?: number;
}

