otp in database

This commit is contained in:
2026-01-20 20:27:01 +03:30
parent 897db44c66
commit 6ba36ca130
13 changed files with 113 additions and 124 deletions
+5 -5
View File
@@ -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()
+2 -2
View File
@@ -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;