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

export class CheckUpdateDto {
  @ApiProperty({ enum: ['android', 'ios', 'ANDROID', 'IOS'] })
  @IsIn(['android', 'ios', 'ANDROID', 'IOS'])
  platform: string;

  @ApiProperty({ example: 10, minimum: 1 })
  @Type(() => Number)
  @IsInt()
  @Min(1)
  current_version_code: number;
}
