import { Type } from 'class-transformer';
import {
  IsIn,
  IsNumber,
  IsOptional,
  IsString,
  MaxLength,
  Min,
} from 'class-validator';

export class UpdateFlyerSelectionDto {
  @IsOptional()
  @Type(() => Number)
  @IsNumber({ maxDecimalPlaces: 2 })
  @Min(0)
  plannedQuantity?: number;

  @IsOptional()
  @IsString()
  @MaxLength(24)
  plannedUnit?: string;

  @IsOptional()
  @IsString()
  @IsIn(['low', 'normal', 'high'])
  priority?: string;

  @IsOptional()
  @IsString()
  @IsIn(['planned', 'bought', 'skipped', 'archived'])
  status?: string;

  @IsOptional()
  @IsString()
  @MaxLength(500)
  note?: string;
}
