AnhLedger's picture
Change update user dto
b2556e4
raw
history blame contribute delete
579 Bytes
import { IsEmail, IsMobilePhone, IsOptional, IsString } from "class-validator";
import { Role } from "../../../common/enums/role.enum.js";
export class UpdateUsersDto {
@IsString()
id: string;
@IsOptional()
avatar: string;
@IsString()
@IsOptional()
full_name?: string;
@IsMobilePhone('vi-VN')
@IsOptional()
phone_number: string
@IsString()
@IsOptional()
address: string;
@IsEmail()
@IsOptional()
email?: string;
@IsOptional()
role: Role;
@IsString()
@IsOptional()
hash_password?: string;
@IsOptional()
is_valid: boolean;
}