mirror of https://github.com/fantasticit/think.git
13 lines
365 B
TypeScript
13 lines
365 B
TypeScript
|
import { IsEmail, IsOptional, IsString } from 'class-validator';
|
|||
|
|
|||
|
export class UpdateUserDto {
|
|||
|
@IsString({ message: '用户头像类型错误(正确类型为:String)' })
|
|||
|
@IsOptional()
|
|||
|
readonly avatar?: string;
|
|||
|
|
|||
|
@IsString({ message: ' 用户邮箱类型错误(正确类型为:String)' })
|
|||
|
@IsEmail()
|
|||
|
@IsOptional()
|
|||
|
readonly email?: string;
|
|||
|
}
|