import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { ArrayMinSize, IsArray, IsBoolean, IsOptional, IsUUID } from 'class-validator';

export class ReorderItemsDto {
  @ApiProperty({ description: 'Ordered list of record IDs (new display/step order)', type: [String] })
  @IsArray()
  @ArrayMinSize(1)
  @IsUUID('4', { each: true })
  ids!: string[];

  @ApiPropertyOptional({
    description: 'Approval-rules only: scope reorder to this chain',
  })
  @IsOptional()
  @IsBoolean()
  requiresDirectorApproval?: boolean;
}
