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

export class UploadMapDto {
  @ApiProperty({ example: 'Custom PvP Map', maxLength: 255 })
  @IsString()
  @MaxLength(255)
  display_name: string;

  @ApiProperty({ example: 'custom', enum: ['custom', 'procedural'] })
  @IsEnum(['custom', 'procedural'])
  map_type: 'custom' | 'procedural';

  @ApiPropertyOptional({ example: 123456, description: 'Procedural map seed' })
  @IsOptional()
  @IsInt()
  seed?: number;

  @ApiPropertyOptional({ example: 4000, description: 'World size in meters' })
  @IsOptional()
  @IsInt()
  @Min(1000)
  @Max(6000)
  world_size?: number;
}
