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

36 lines
504 B
TypeScript
Raw Normal View History

2022-12-14 10:53:50 +00:00
import { AutoMap } from '@automapper/classes';
2022-12-23 10:00:34 +00:00
import {
IsEmail,
IsNotEmpty,
IsOptional,
IsPhoneNumber,
IsString,
} from 'class-validator';
2022-12-14 10:37:13 +00:00
2022-12-14 10:53:50 +00:00
export class UpdateUserRequest {
@IsString()
2022-12-23 10:00:34 +00:00
@IsNotEmpty()
2022-12-14 10:53:50 +00:00
@AutoMap()
uuid: string;
@IsString()
2022-12-23 10:00:34 +00:00
@IsOptional()
2022-12-14 10:53:50 +00:00
@AutoMap()
firstName?: string;
@IsString()
2022-12-23 10:00:34 +00:00
@IsOptional()
2022-12-14 10:53:50 +00:00
@AutoMap()
lastName?: string;
2022-12-23 10:00:34 +00:00
@IsEmail()
@IsOptional()
2022-12-14 10:53:50 +00:00
@AutoMap()
email?: string;
2022-12-21 15:15:57 +00:00
2022-12-23 10:00:34 +00:00
@IsPhoneNumber()
@IsOptional()
2022-12-21 15:15:57 +00:00
@AutoMap()
phone?: string;
2022-12-14 10:53:50 +00:00
}