gcx/backend/services/auth-service/src/interface/http/dto/alipay-login.dto.ts

21 lines
611 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { IsString, Length, IsOptional } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class AlipayLoginDto {
@ApiProperty({ description: '支付宝 SDK 返回的 auth_code一次性3分钟有效' })
@IsString()
@Length(1, 200)
authCode: string;
@ApiPropertyOptional({ description: '推荐码(仅新用户注册时有效)' })
@IsOptional()
@IsString()
@Length(1, 20)
referralCode?: string;
@ApiPropertyOptional({ description: '设备信息(型号/OS 版本等)' })
@IsOptional()
@IsString()
deviceInfo?: string;
}