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

export class InstallPluginDto {
  @ApiProperty({ example: 'Kits', maxLength: 255 })
  @IsString()
  @MaxLength(255)
  plugin_name: string;

  @ApiPropertyOptional({ example: 'kits', maxLength: 255 })
  @IsOptional()
  @IsString()
  @MaxLength(255)
  umod_slug?: string;

  @ApiPropertyOptional({ example: 'umod', enum: ['umod', 'manual', 'corrosion_module'], default: 'manual' })
  @IsOptional()
  @IsEnum(['umod', 'manual', 'corrosion_module'])
  source?: 'umod' | 'manual' | 'corrosion_module';
}
