chore: create legal and real user data info
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user