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

export class CreateBattleMapDto {
  @ApiProperty({ description: 'Map name' })
  @IsString()
  name: string;

  @ApiPropertyOptional({ description: 'Grid columns', default: 20 })
  @IsOptional()
  @IsInt()
  @Min(1)
  gridSizeX?: number = 20;

  @ApiPropertyOptional({ description: 'Grid rows', default: 20 })
  @IsOptional()
  @IsInt()
  @Min(1)
  gridSizeY?: number = 20;

  @ApiPropertyOptional({ description: 'Grid X offset', default: 0 })
  @IsOptional()
  @IsInt()
  gridOffsetX?: number = 0;

  @ApiPropertyOptional({ description: 'Grid Y offset', default: 0 })
  @IsOptional()
  @IsInt()
  gridOffsetY?: number = 0;
}
