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