| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import { IsNotEmpty, IsString, IsOptional } from 'class-validator';
- import { ApiProperty } from '@nestjs/swagger';
- export class LoginDto {
- @ApiProperty({
- description: '设备唯一标识符(Device ID)',
- example: 'device-123-abc-xyz',
- })
- @IsNotEmpty()
- @IsString()
- uid: string;
- @ApiProperty({
- description: '渠道ID',
- example: 'channel-123',
- required: true,
- })
- @IsOptional()
- @IsString()
- channelId?: string;
- @ApiProperty({
- description: '机器型号',
- example: 'iPhone 12 Pro xxxx',
- required: true,
- })
- @IsOptional()
- @IsString()
- machine?: string;
- @ApiProperty({
- description: '应用版本号',
- example: '1.0.0',
- required: false,
- })
- @IsOptional()
- @IsString()
- appVersion?: string;
- @ApiProperty({
- description: '操作系统类型',
- example: 'Android',
- required: false,
- })
- @IsOptional()
- @IsString()
- os?: string;
- // plus account/password etc.
- }
|