forked from Olympic/NTO-2025-Backend-TeamTask
Commit changes
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.example.nto.dto.converter;
|
||||
|
||||
import com.example.nto.dto.EmployeeDto;
|
||||
import com.example.nto.entity.Employee;
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@UtilityClass
|
||||
public class EmployeeDtoConverter {
|
||||
|
||||
public EmployeeDto ToDto(Employee entity) {
|
||||
return EmployeeDto.builder()
|
||||
.name(entity.getName())
|
||||
.photoUrl(entity.getPhotoUrl())
|
||||
//.booking(entity.getBooking().stream().map(DateBookingsDtoConverter::ToDto).collect(Collectors.toSet()))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user