src/modules/partner/dtos/partner-register.dto.ts
Properties |
|
| Readonly address |
Type : string
|
Decorators :
@IsString()
|
| Readonly adminEmail |
Type : string
|
Decorators :
@IsString()
|
| Readonly adminFirstName |
Type : string
|
Decorators :
@IsString()
|
| Readonly adminLastName |
Type : string
|
Decorators :
@IsString()
|
| Readonly Optional adminPassword |
Type : string
|
Decorators :
@IsString()
|
| Readonly contact |
Type : string
|
Decorators :
@IsString()
|
| Readonly email |
Type : string
|
Decorators :
@IsString()
|
| Readonly name |
Type : string
|
Decorators :
@IsString()
|
import { ApiProperty } from '@nestjs/swagger';
import { IsEmail, IsNotEmpty, IsString, MinLength, IsOptional } from 'class-validator';
export class PartnerRegisterDto {
@IsString()
@IsNotEmpty()
@ApiProperty()
readonly name: string;
@IsString()
@IsNotEmpty()
@IsEmail()
@ApiProperty()
readonly email: string;
@IsString()
@IsNotEmpty()
@ApiProperty()
readonly contact: string;
@IsString()
@IsNotEmpty()
@ApiProperty()
readonly address: string;
@IsString()
@IsNotEmpty()
@ApiProperty()
readonly adminFirstName: string;
@IsString()
@IsNotEmpty()
@ApiProperty()
readonly adminLastName: string;
@IsString()
@IsNotEmpty()
@IsEmail()
@ApiProperty()
readonly adminEmail: string;
@IsString()
@ApiProperty()
@MinLength(6)
@ApiProperty({ minLength: 6 })
@IsOptional()
readonly adminPassword?: string;
}