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

export class CreateScenarioDto {
  @ApiProperty()
  @IsString()
  name: string;

  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  description?: string;
}

export class UpdateScenarioDto {
  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  name?: string;

  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  description?: string;

  @ApiPropertyOptional({ description: 'Full JSON scenario object' })
  @IsOptional()
  @IsObject()
  scenario?: Record<string, unknown>;

  @ApiPropertyOptional({ description: 'Node positions for visual editor { nodeId: { x, y } }' })
  @IsOptional()
  @IsObject()
  positions?: Record<string, unknown>;
}
