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