import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger' import { IsString, IsInt, Min, IsOptional } from 'class-validator' import { Type, Transform } from 'class-transformer' export class CheckUpdateDto { @ApiProperty({ description: '平台', example: 'android' }) @IsString() @Transform(({ value }) => value?.toLowerCase()) platform: string @ApiPropertyOptional({ description: '当前版本名称', example: '1.0.0' }) @IsOptional() @IsString() current_version?: string @ApiProperty({ description: '当前版本代码', example: 100 }) @Type(() => Number) @IsInt() @Min(0) current_version_code: number }