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