user/.old/domain/dtos/update-user.request.ts

36 lines
504 B
TypeScript

import { AutoMap } from '@automapper/classes';
import {
IsEmail,
IsNotEmpty,
IsOptional,
IsPhoneNumber,
IsString,
} from 'class-validator';
export class UpdateUserRequest {
@IsString()
@IsNotEmpty()
@AutoMap()
uuid: string;
@IsString()
@IsOptional()
@AutoMap()
firstName?: string;
@IsString()
@IsOptional()
@AutoMap()
lastName?: string;
@IsEmail()
@IsOptional()
@AutoMap()
email?: string;
@IsPhoneNumber()
@IsOptional()
@AutoMap()
phone?: string;
}