alioth/star-tune/src/module/user/dto/email-login.dto.ts
nie 804d14d8fd feat(api):
1. 注册接口
2. 邮箱验证
3. 发送验证码
2025-05-31 01:25:24 +08:00

22 lines
458 B
TypeScript

import { IsEmail, IsString, Length } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class EmailLoginDto {
@ApiProperty({
description: '邮箱地址',
example: 'user@example.com',
})
@IsEmail()
email: string;
@ApiProperty({
description: '验证码',
example: '123456',
minLength: 6,
maxLength: 6,
})
@IsString()
@Length(6, 6)
code: string;
}