diff --git a/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicAddress.java b/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicAddress.java index c07c95e..63ea4f2 100644 --- a/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicAddress.java +++ b/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicAddress.java @@ -1,6 +1,10 @@ package com.greenfoxacademy.backend.models; -import jakarta.persistence.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import lombok.Data; /** diff --git a/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicDetails.java b/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicDetails.java index b3a2c94..1e1b3e8 100644 --- a/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicDetails.java +++ b/backend/src/main/java/com/greenfoxacademy/backend/models/ClinicDetails.java @@ -1,6 +1,9 @@ package com.greenfoxacademy.backend.models; -import jakarta.persistence.*; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import lombok.Data; /** diff --git a/backend/src/main/java/com/greenfoxacademy/backend/models/Vet.java b/backend/src/main/java/com/greenfoxacademy/backend/models/Vet.java index 08f807c..a1ede20 100644 --- a/backend/src/main/java/com/greenfoxacademy/backend/models/Vet.java +++ b/backend/src/main/java/com/greenfoxacademy/backend/models/Vet.java @@ -1,6 +1,9 @@ package com.greenfoxacademy.backend.models; -import jakarta.persistence.*; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; import java.util.Collection; import java.util.List; import lombok.AllArgsConstructor; diff --git a/backend/src/main/java/com/greenfoxacademy/backend/services/user/vet/VetServiceImpl.java b/backend/src/main/java/com/greenfoxacademy/backend/services/user/vet/VetServiceImpl.java index 04a26fe..e4a44a4 100644 --- a/backend/src/main/java/com/greenfoxacademy/backend/services/user/vet/VetServiceImpl.java +++ b/backend/src/main/java/com/greenfoxacademy/backend/services/user/vet/VetServiceImpl.java @@ -33,9 +33,9 @@ public VetListResponseDto getAll(String word) { List clinicAddressList = clinicAddressRepository .findAllByZipContainingOrCityContainingOrStreetContaining( - word , word, word); + word, word, word); - vetList.addAll( clinicAddressList.stream() + vetList.addAll(clinicAddressList.stream() .map(a -> a.getClinicDetails().getVet()).toList()); vetList.addAll(clinicDetailsRepository.findAllByClinicNameContaining(word)