import { IsBoolean, IsInt, IsNumber, IsOptional, IsString, MaxLength, Min } from 'class-validator';

export class CardFieldDto {
  @IsString()
  @MaxLength(80)
  label!: string;

  @IsOptional()
  @IsInt()
  @Min(0)
  sortOrder?: number;

  @IsOptional()
  @IsInt()
  @Min(0)
  points?: number;

  @IsOptional()
  @IsBoolean()
  isPrimary?: boolean;

  @IsOptional()
  @IsBoolean()
  isRequired?: boolean;

  @IsOptional()
  @IsNumber()
  minNumber?: number;

  @IsOptional()
  @IsNumber()
  maxNumber?: number;

  @IsOptional()
  @IsNumber()
  stepNumber?: number;
}
