Initial commit
This commit is contained in:
41
src/modules/auth/dto/register.dto.ts
Executable file
41
src/modules/auth/dto/register.dto.ts
Executable file
@@ -0,0 +1,41 @@
|
||||
import { IsEmail, IsString, MinLength, IsOptional, IsNumber } from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
|
||||
export class RegisterDto {
|
||||
@ApiProperty({ description: 'Email address', example: 'john.doe@example.com' })
|
||||
@IsEmail()
|
||||
email: string;
|
||||
|
||||
@ApiProperty({ description: 'Password (minimum 8 characters)', example: 'SecurePass123!' })
|
||||
@IsString()
|
||||
@MinLength(8)
|
||||
password: string;
|
||||
|
||||
@ApiProperty({ description: 'First name', example: 'John' })
|
||||
@IsString()
|
||||
firstName: string;
|
||||
|
||||
@ApiProperty({ description: 'Last name', example: 'Doe' })
|
||||
@IsString()
|
||||
lastName: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Phone number', example: '+1234567890' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
phone?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Country ID', example: 1 })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
countryId?: number;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Preferred language', example: 'en' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
preferredLanguage?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Preferred currency', example: 'USD' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
preferredCurrency?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user