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

export class WorkspaceReorderDTO {
  @ApiProperty({ nullable: true })
  @IsNumber()
  @IsOptional()
  indexFrom?: number | null;

  @ApiProperty({ nullable: true })
  @IsNumber()
  @IsOptional()
  indexTo?: number | null;

  @IsArray()
  @IsUUID(undefined, { each: true })
  @ApiProperty()
  ids: string[];
}
