otp in database
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IsString, IsBoolean, IsNotEmpty, IsMobilePhone, IsInt } from 'class-validator';
|
||||
import { IsString, IsBoolean, IsNotEmpty, IsMobilePhone, IsInt, IsNumber, IsOptional } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
export class CreateUserDto {
|
||||
@@ -10,13 +10,13 @@ export class CreateUserDto {
|
||||
|
||||
@ApiProperty({ description: "User's first name", example: 'علی' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
firstName: string;
|
||||
@IsOptional()
|
||||
firstName?: string;
|
||||
|
||||
@ApiProperty({ description: "User's last name", example: 'جعفری' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
lastName: string;
|
||||
@IsOptional()
|
||||
lastName?: string;
|
||||
|
||||
@ApiProperty({ description: 'Gender flag (boolean)', example: true })
|
||||
@IsBoolean()
|
||||
|
||||
@@ -13,8 +13,8 @@ export class User extends BaseEntity {
|
||||
@PrimaryKey({ type: 'string', columnType: 'char(26)' })
|
||||
id: string = ulid();
|
||||
|
||||
@Property()
|
||||
firstName!: string;
|
||||
@Property({ nullable: true })
|
||||
firstName?: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
lastName?: string;
|
||||
|
||||
Reference in New Issue
Block a user