feat: 支持 push
This commit is contained in:
29
src/push-notifications/dto/update-device-token.dto.ts
Normal file
29
src/push-notifications/dto/update-device-token.dto.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user