29 lines
752 B
TypeScript
29 lines
752 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsString, IsNotEmpty, IsOptional } from 'class-validator';
|
|
|
|
export class UpdateDeviceTokenDto {
|
|
@ApiProperty({ description: '当前设备推送令牌' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
currentDeviceToken: string;
|
|
|
|
@ApiProperty({ description: '新的设备推送令牌' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
newDeviceToken: string;
|
|
|
|
@ApiProperty({ description: '应用版本', required: false })
|
|
@IsString()
|
|
@IsOptional()
|
|
appVersion?: string;
|
|
|
|
@ApiProperty({ description: '操作系统版本', required: false })
|
|
@IsString()
|
|
@IsOptional()
|
|
osVersion?: string;
|
|
|
|
@ApiProperty({ description: '设备名称', required: false })
|
|
@IsString()
|
|
@IsOptional()
|
|
deviceName?: string;
|
|
} |