Close chat #169
@@ -12,8 +12,6 @@ public class AdoptionRequest {
|
||||
@NotNull(message = "Customer ID is required")
|
||||
private Long customerId;
|
||||
|
||||
private Long employeeId;
|
||||
|
||||
@NotNull(message = "Adoption date is required")
|
||||
private LocalDate adoptionDate;
|
||||
|
||||
@@ -40,10 +38,6 @@ public class AdoptionRequest {
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public Long getEmployeeId() { return employeeId; }
|
||||
|
||||
public void setEmployeeId(Long employeeId) { this.employeeId = employeeId; }
|
||||
|
||||
public LocalDate getAdoptionDate() {
|
||||
return adoptionDate;
|
||||
}
|
||||
|
||||
@@ -28,9 +28,6 @@ public class AppointmentRequest {
|
||||
|
||||
private Long employeeId;
|
||||
|
||||
// @NotNull(message = "Employee ID is required")
|
||||
private Long employeeId;
|
||||
|
||||
public Long getCustomerId() {
|
||||
return customerId;
|
||||
}
|
||||
@@ -95,14 +92,6 @@ public class AppointmentRequest {
|
||||
this.employeeId = employeeId;
|
||||
}
|
||||
|
||||
public Long getEmployeeId() {
|
||||
return employeeId;
|
||||
}
|
||||
|
||||
public void setEmployeeId(Long employeeId) {
|
||||
this.employeeId = employeeId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
||||
@@ -91,10 +91,6 @@ public class AppointmentService {
|
||||
User customer = userRepository.findById(request.getCustomerId())
|
||||
.orElseThrow(() -> new ResourceNotFoundException("Customer not found with id: " + request.getCustomerId()));
|
||||
|
||||
employee = AuthenticationHelper.getAuthenticatedEmployee(
|
||||
userRepository, employeeRepository);
|
||||
}
|
||||
|
||||
StoreLocation store = storeRepository.findById(request.getStoreId())
|
||||
.orElseThrow(() -> new ResourceNotFoundException("Store not found with id: " + request.getStoreId()));
|
||||
|
||||
@@ -116,7 +112,6 @@ public class AppointmentService {
|
||||
appointment.setAppointmentTime(request.getAppointmentTime());
|
||||
appointment.setAppointmentStatus(request.getAppointmentStatus());
|
||||
appointment.setPet(pet);
|
||||
appointment.setEmployee(employee);
|
||||
|
||||
appointment = appointmentRepository.save(appointment);
|
||||
return mapToResponse(appointment);
|
||||
|
||||
Reference in New Issue
Block a user