user/src/modules/users/domain/dtos/create-user.request.ts

30 lines
454 B
TypeScript
Raw Normal View History

2022-12-14 10:37:13 +00:00
import { AutoMap } from '@automapper/classes';
2022-12-23 10:00:34 +00:00
import { IsOptional, 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
@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
email?: string;
@IsString()
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
}