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

export class CreatePositionDto {
  @ApiProperty({ description: 'Sort order / weight' })
  @IsInt()
  @Min(0)
  indexVal!: number;

  @ApiProperty({ required: false, nullable: true })
  @IsOptional()
  @IsInt()
  @Min(1)
  countryId?: number;

  @ApiProperty({ required: false, nullable: true })
  @IsOptional()
  @IsInt()
  @Min(1)
  categoryId?: number;
}
