Skip to content
Snippets Groups Projects

added DR update API

Files

/**
@file <file name>
@description <description>
@author <Your Name>
@created <YYYY-MM-DD>
**/
import {
IsString,
IsEmail,
IsOptional,
IsNumber,
IsUUID,
IsNotEmpty,
} from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
/**
*
*/
export class UpdateDoctorsRequestDto {
@IsUUID()
@IsNotEmpty({ message: 'Doctor ID must be a valid UUID' })
@ApiProperty({ example: 'uuid', description: 'Doctor ID' })
doctorId: string;
@IsUUID()
@IsNotEmpty({ message: 'User ID must be a valid UUID' })
@ApiProperty({
example: '2733a326-f4e2-4005-ad18-3b8f67a7613c',
description: 'User ID',
})
userId: string;
@IsOptional()
@IsString({ message: 'Doctor name must be a string' })
@ApiProperty({
example: 'Dr. Prathviraj Thokal',
description: 'Name of the doctor',
})
doctorName?: string;
@IsOptional()
@IsString({ message: 'Doctor registration number must be a string' })
@ApiProperty({
example: 'DRREG-112',
description: 'Registration number of the doctor',
})
doctorRegNo?: string;
@IsOptional()
@IsUUID()
@IsNotEmpty({ message: 'Doctor speciality ID must be a valid UUID' })
@ApiProperty({
example: '2733a326-f4e2-4005-ad18-3b8f67a7613c',
description: 'Doctor speciality ID',
})
doctorSpecialityId?: string;
@IsOptional()
@IsUUID()
@IsNotEmpty({ message: 'Doctor qualification ID must be a valid UUID' })
@ApiProperty({
example: '2733a326-f4e2-4005-ad18-3b8f67a7613c',
description: 'Doctor qualification ID',
})
doctorQualificationId?: string;
@IsOptional()
@IsString({ message: 'Contact number must be a string' })
@ApiProperty({
example: '7208806389',
description: 'Contact number of the doctor',
})
contactNo?: string;
@IsOptional()
@IsString({ message: 'HPR code must be a string' })
@ApiProperty({
example: 'HPR-112',
description: 'HPR code of the doctor',
})
hprCode?: string;
@IsOptional()
@IsEmail({}, { message: 'Invalid email format' })
@ApiProperty({
example: 'niveus@example.com',
description: 'Email of the doctor',
})
emailId?: string;
@IsOptional()
@IsString({ message: 'Pan number must be a string' })
@ApiProperty({
example: 'HSLDY8769P',
description: 'Pan number of the doctor',
})
panNo?: string;
@IsOptional()
@IsString({ message: 'Address must be a string' })
@ApiProperty({
example: 'Mumbai',
description: 'Address of the doctor',
})
address?: string;
@IsOptional()
@IsUUID()
@IsNotEmpty({ message: 'Pincode ID must be a valid UUID' })
@ApiProperty({
example: '2733a326-f4e2-4005-ad18-3b8f67a7613c',
description: 'Pincode ID',
})
pincode?: string;
@IsOptional()
@Type(() => Number)
@IsNumber()
@ApiProperty({
example: 76.22222,
description: 'Latitude',
})
latitude?: number;
@IsOptional()
@Type(() => Number)
@IsNumber()
@ApiProperty({
example: 76.22222,
description: 'Longitude',
})
longitude?: number;
//State and city ID
@IsOptional()
@IsUUID()
@IsNotEmpty({ message: 'State ID must be a valid UUID' })
@ApiProperty({
example: '2733a326-f4e2-4005-ad18-3b8f67a7613c',
description: 'State ID',
})
stateId?: string;
@IsOptional()
@IsUUID()
@IsNotEmpty({ message: 'City ID must be a valid UUID' })
@ApiProperty({
example: '2733a326-f4e2-4005-ad18-3b8f67a7613c',
description: 'City ID',
})
cityId?: string;
}
Loading