[R2] Create DTO class to receive doctor public data
This commit is contained in:
parent
1360bc1076
commit
8d365061ab
@ -0,0 +1,11 @@
|
|||||||
|
package com.mirna.hospitalmanagementapi.domain.dtos;
|
||||||
|
|
||||||
|
import com.mirna.hospitalmanagementapi.domain.entities.Doctor;
|
||||||
|
import com.mirna.hospitalmanagementapi.domain.enums.Specialty;
|
||||||
|
|
||||||
|
public record DoctorPublicDataDTO(String name, String email, String crm, Specialty specialty){
|
||||||
|
|
||||||
|
public DoctorPublicDataDTO(Doctor doctor){
|
||||||
|
this(doctor.getName(), doctor.getEmail(), doctor.getCrm(), doctor.getSpecialty());
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user