chore: create legal and real user data info

This commit is contained in:
Matin
2025-02-17 15:43:12 +03:30
parent 14373bb665
commit 8b8ddb693e
18 changed files with 390 additions and 20 deletions
+16 -1
View File
@@ -4,7 +4,7 @@ import { IsEnum, IsNotEmpty, IsOptional, IsString, IsUUID } from "class-validato
import { FinancialMessage } from "../../../common/enums/message.enum";
import { GenderType } from "../enums/gender-type.enum";
export class CreateFinancialDto {
export class CreateRealUserDto {
@ApiPropertyOptional({ enum: GenderType, description: "Gender type" })
@IsOptional()
@IsEnum(GenderType, { message: FinancialMessage.GENDER_TYPE_INVALID })
@@ -30,9 +30,24 @@ export class CreateFinancialDto {
@IsString({ message: FinancialMessage.NATIONAL_ID_INVALID })
nationalId?: string;
@ApiPropertyOptional({ description: "Address" })
@IsOptional()
@IsString({ message: FinancialMessage.ADDRESS_ID_INVALID })
address?: string;
@ApiPropertyOptional({ description: "PostalCode" })
@IsOptional()
@IsString({ message: FinancialMessage.ADDRESS_ID_INVALID })
postalCode?: string;
@ApiPropertyOptional({ description: "User id", example: "123e4567-e89b-12d3-a456-426614174000" })
@IsOptional()
@IsNotEmpty({ message: FinancialMessage.USER_ID_REQUIRED })
@IsUUID("4", { message: FinancialMessage.USER_ID_SHOULD_BE_A_UUID })
userId: string;
@ApiPropertyOptional({ description: "City id", example: "1" })
@IsOptional()
@IsNotEmpty({ message: FinancialMessage.CITY_ID_REQUIRED })
cityId: string;
}