Make jobTitle and phoneNumber optional in InviteUserEntity and DTO

This commit is contained in:
faris Aljohari
2024-12-25 19:58:37 -06:00
parent 769c9be73d
commit 77d2e18b36
2 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ export class InviteUserEntity extends AbstractEntity<InviteUserDto> {
email: string;
@Column({
nullable: false,
nullable: true,
})
jobTitle: string;
@ -52,7 +52,7 @@ export class InviteUserEntity extends AbstractEntity<InviteUserDto> {
})
public lastName: string;
@Column({
nullable: false,
nullable: true,
})
public phoneNumber: string;

View File

@ -38,16 +38,16 @@ export class AddUserInvitationDto {
@ApiProperty({
description: 'The job title of the user',
example: 'Software Engineer',
required: true,
required: false,
})
@IsString()
@IsNotEmpty()
public jobTitle: string;
@IsOptional()
public jobTitle?: string;
@ApiProperty({
description: 'The phone number of the user',
example: '+1234567890',
required: true,
required: false,
})
@IsString()
@IsOptional()