src/modules/auth/dtos/user-register.dto.ts
Properties |
| Readonly email |
Type : string
|
Decorators :
@IsString()
|
| Readonly firstName |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/modules/auth/dtos/user-register.dto.ts:9
|
| Readonly lastName |
Type : string
|
Decorators :
@IsString()
|
| Readonly Optional partner |
Type : string
|
Decorators :
@IsUUID()
|
| Readonly password |
Type : string
|
Decorators :
@IsString()
|
| Readonly Optional role |
Type : string
|
Decorators :
@ApiPropertyOptional()
|
import { ApiPropertyOptional, ApiProperty } from '@nestjs/swagger';
import { PartnerDto } from 'modules/partner/dtos'
import { IsEmail, IsIn, IsNotEmpty, IsString, MinLength, IsOptional, IsUUID } from 'class-validator';
export class UserRegisterDto {
@IsString()
@IsNotEmpty()
@ApiProperty()
readonly firstName: string;
@IsString()
@IsNotEmpty()
@ApiProperty()
readonly lastName: string;
@IsString()
@IsEmail()
@IsNotEmpty()
@ApiProperty()
readonly email: string;
@IsUUID()
@ApiPropertyOptional()
@IsOptional()
readonly partner?: string;
@ApiPropertyOptional()
@IsOptional()
@IsIn(['ADMIN', 'ROOT', 'P_ADMIN', 'USER'])
readonly role?: string;
@IsString()
@MinLength(6)
@ApiProperty({ minLength: 6 })
readonly password: string;
}