The file was added src/main/java/co/edu/udistrital/mdp/pets/services/AdoptionHistoryService.java The file was added src/main/java/co/edu/udistrital/mdp/pets/services/DevolutionService.java The file was added src/main/java/co/edu/udistrital/mdp/pets/services/AdoptionTrackingService.java The file was added src/main/java/co/edu/udistrital/mdp/pets/services/ReportService.java The file was added src/test/java/co/edu/udistrital/mdp/pets/services/AdoptionHistoryServiceTest.java The file was added src/test/java/co/edu/udistrital/mdp/pets/services/AdoptionTrackingServiceTest.java The file was added src/test/java/co/edu/udistrital/mdp/pets/services/ReportServiceTest.java The file was added src/test/java/co/edu/udistrital/mdp/pets/services/DevolutionServiceTest.java The file was modified pom.xml (diff)
Commit
2980ec6c74adb901df0c15ff93811c42255bdc26
by juslopezg Add comprehensive AdoptionService tests Implement JPA integration tests for AdoptionService. Adds a @DataJpaTest class that uses TestEntityManager and Podam to create Shelter, Pet, Adopter and Adoption entities, with setup/teardown to seed test data. Tests cover creation (including validations for missing pet/date and pet availability), search (null and not-found cases), update (status change) and delete (only finished adoptions), and import the AdoptionService into the test context. (commit: 2980ec6 ) The file was modified src/test/java/co/test/java/co/edu/udistrital/test/java/co/edu/udistrital/mdp/pets/test/java/co/edu/udistrital/mdp/AdoptionServiceTest.java (diff) The file was added collections/PetManagementandHealth.postman_collection.json The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/ReportController.java The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionHistoryController.java The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/DevolutionController.java The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionTrackingController.java The file was added collections/Lucero - persistencia.postman_collection.json
Commit
3e24ce128f2b48570807fbd7c2a151cc0676c371
by juslopezg Add API controllers and update Postman collections Add new REST controllers (Adoption, Review, Shelter, ShelterEvent, TrialStay) and update AdoptionHistoryController routing/usage. Update numerous Postman collection files: switch requests to localhost API URLs, add request/response examples, include examples paths, and refine collection/definition metadata. Modify several entities, repositories and services, and reorganize/replace test files (move to ZZZ folder and remove old tests) to align with the new endpoints and examples for local testing. (commit: 3e24ce1 ) The file was removed src/test/java/co/edu/udistrital/mdp/pets/services/ReportServiceTest.java The file was added postman/collections/Orejitas y Colas/Shelter/.resources/Delete Shelter.resources/examples/405 Method Not Allowed.example.yaml The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/ReviewEntity.java (diff) The file was added src/test/java/co/edu/udistrital/mdp/ZZZ/services/TrialStayServiceTest.java The file was added postman/collections/Orejitas y Colas/TrialStay/.resources/Create Trial Stay.resources/examples/400 Bad Request.example.yaml The file was modified postman/collections/Orejitas y Colas/TrialStay/Search Trial Stays.request.yaml (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/TrialStayEntity.java (diff) The file was modified postman/collections/Orejitas y Colas/TrialStay/Create Trial Stay.request.yaml (diff) The file was modified postman/collections/Orejitas y Colas/Review/Search Reviews.request.yaml (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/TrialStayService.java (diff) The file was removed src/test/java/co/test/java/co/edu/udistrital/test/java/co/edu/udistrital/mdp/pets/test/java/co/edu/udistrital/mdp/ReviewServiceTest.java The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/TrialStayController.java The file was added postman/collections/Orejitas y Colas/Review/.resources/Search Reviews.resources/examples/200 OK.example.yaml The file was added postman/collections/Orejitas y Colas/Shelter/.resources/Search Shelter.resources/examples/200 OK.example.yaml The file was added postman/collections/Orejitas y Colas/Review/.resources/Update Review.resources/examples/400 Bad Request.example.yaml The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/AdoptionHistoryService.java (diff) The file was modified postman/collections/Orejitas y Colas/Shelter/.resources/definition.yaml (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionController.java The file was added postman/collections/Orejitas y Colas/Shelter/.resources/Create Shelter.resources/examples/500 Internal Server Error.example.yaml The file was modified src/main/java/co/edu/udistrital/mdp/pets/repositories/TrialStayRepository.java (diff) The file was added src/test/java/co/edu/udistrital/mdp/ZZZ/services/AdoptionHistoryServiceTest.java The file was added postman/collections/Orejitas y Colas/Shelter/.resources/Create Shelter.resources/examples/201 Created.example.yaml The file was modified src/main/java/co/edu/udistrital/mdp/pets/repositories/ShelterEventRepository.java (diff) The file was added src/test/java/co/edu/udistrital/mdp/ZZZ/services/ReportService.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/AdoptionHistoryEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionHistoryController.java (diff) The file was added postman/collections/Orejitas y Colas/Shelter/.resources/Delete Shelter.resources/examples/204 No Content.example.yaml The file was added postman/collections/Orejitas y Colas/Review/.resources/Delete Review.resources/examples/400 Bad Request.example.yaml The file was added postman/collections/Orejitas y Colas/Review/.resources/Create Review.resources/examples/500 Internal Server Error.example.yaml The file was modified postman/collections/Orejitas y Colas/TrialStay/Update Trial Stay.request.yaml (diff) The file was added postman/collections/Orejitas y Colas/TrialStay/.resources/Search Trial Stays.resources/examples/200 OK.example.yaml The file was removed src/test/java/co/test/java/co/edu/udistrital/test/java/co/edu/udistrital/mdp/pets/test/java/co/edu/udistrital/mdp/TrialStayServiceTest.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/ShelterEventEntity.java (diff) The file was modified postman/collections/Orejitas y Colas/Review/Update Review.request.yaml (diff) The file was modified postman/collections/Orejitas y Colas/Shelter/Create Shelter.request.yaml (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/repositories/DevolutionRepository.java (diff) The file was modified postman/collections/Orejitas y Colas/Review/Create Review.request.yaml (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/ShelterController.java The file was modified postman/collections/Orejitas y Colas/Shelter/Delete Shelter.request.yaml (diff) The file was removed src/test/java/co/test/java/co/edu/udistrital/test/java/co/edu/udistrital/mdp/pets/test/java/co/edu/udistrital/mdp/AdoptionServiceTest.java The file was modified postman/collections/Orejitas y Colas/Shelter/Search Shelter.request.yaml (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/ShelterEventController.java The file was modified postman/collections/Orejitas y Colas/Review/Search Review.request.yaml (diff) The file was removed src/test/java/co/test/java/co/edu/udistrital/test/java/co/edu/udistrital/mdp/pets/test/java/co/edu/udistrital/mdp/ShelterServiceTest.java The file was modified postman/collections/Orejitas y Colas/TrialStay/Search trial Stay.request.yaml (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/DevolutionService.java (diff) The file was added postman/collections/Orejitas y Colas/Review/.resources/Create Review.resources/examples/400 Bad Request.example.yaml The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/ShelterEventService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/ReportService.java (diff) The file was removed src/test/java/co/edu/udistrital/mdp/pets/services/DevolutionServiceTest.java The file was added postman/collections/Orejitas y Colas/TrialStay/.resources/Update Trial Stay.resources/examples/405 Method Not Allowed.example.yaml The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/ReviewController.java The file was added src/test/java/co/edu/udistrital/mdp/ZZZ/services/ShelterEventServiceTest.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/ShelterEntity.java (diff) The file was added src/test/java/co/edu/udistrital/mdp/ZZZ/services/DevolutionServiceTest.java The file was modified postman/collections/Orejitas y Colas/Review/Delete Review.request.yaml (diff) The file was added postman/collections/Orejitas y Colas/Shelter/.resources/Update Shelter.resources/examples/200 OK.example.yaml The file was added src/test/java/co/edu/udistrital/mdp/ZZZ/services/ReviewServiceTest.java The file was added postman/collections/Orejitas y Colas/TrialStay/.resources/Search trial Stay.resources/examples/200 OK.example.yaml The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionTrackingController.java (diff) The file was removed src/test/java/co/edu/udistrital/mdp/pets/services/AdoptionHistoryServiceTest.java The file was modified postman/collections/Orejitas y Colas/Shelter/Update Shelter.request.yaml (diff) The file was added postman/collections/Orejitas y Colas/TrialStay/.resources/Create Trial Stay.resources/examples/404 Not Found.example.yaml The file was removed src/test/java/co/test/java/co/edu/udistrital/test/java/co/edu/udistrital/mdp/pets/test/java/co/edu/udistrital/mdp/ShelterEventServiceTest.java The file was added postman/collections/Orejitas y Colas/Review/.resources/Search Review.resources/examples/200 OK.example.yaml The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/AdoptionTrackingService.java (diff) The file was added postman/collections/Orejitas y Colas/TrialStay/.resources/Create Trial Stay.resources/examples/500 Internal Server Error.example.yaml The file was added src/test/java/co/edu/udistrital/mdp/ZZZ/services/AdoptionTrackingServiceTest.java The file was added src/test/java/co/edu/udistrital/mdp/ZZZ/services/ShelterServiceTest.java The file was added postman/collections/Orejitas y Colas/Shelter/.resources/Update Shelter.resources/examples/405 Method Not Allowed.example.yaml The file was added src/test/java/co/edu/udistrital/mdp/ZZZ/services/AdoptionServiceTest.java The file was removed src/test/java/co/edu/udistrital/mdp/pets/services/AdoptionTrackingServiceTest.java The file was modified postman/collections/Orejitas y Colas/.resources/definition.yaml (diff)
Commit
c4f32f1a33bfd80a9350d968503979b0ffe440a5
by juslopezg Add DTOs for pets domain and update tests Introduce DTOs and detail variants for Adoption, Review, Shelter, ShelterEvent, and TrialStay to map entity fields and related ids/objects (new files added under src/main/java/co/edu/udistrital/mdp/pets/dto). TrialStayDetail is added as an empty subclass of TrialStayDTO. Update ReviewServiceTest to stabilize tests: ensure transient entities have null ids before persist, switch reviewDate handling to LocalDate, add entityManager.flush/clear calls, adjust test inputs and assertions (search/delete/update/invalid-rating cases) and use more robust id values for not-found/unauthorized scenarios. (commit: c4f32f1 ) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/ReviewDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/ReviewDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/ShelterEventDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/TrialStayDTO.java The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/ReviewServiceTest.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/ShelterDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/ShelterEventDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/ShelterDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/TrialStayDetailDTO.java
Commit
21d63c435e1634a18a35839b989bf513a0711b93
by juslopezg Map adoption in TrialStayDetailDTO Add adoption mapping to TrialStayDetailDTO: import TrialStayEntity, add Lombok annotations, include an AdoptionDTO field and a constructor that populates it from the entity. Also apply minor formatting/whitespace cleanups across several DTO classes (AdoptionDTO, AdoptionDetailDTO, ReviewDTO, ReviewDetailDTO, ShelterDTO, ShelterDetailDTO, ShelterEventDTO, ShelterEventDetailDTO, TrialStayDTO). (commit: 21d63c4 ) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/ReviewDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/ShelterDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/TrialStayDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/TrialStayDetailDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionDetailDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/ShelterEventDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/ShelterDetailDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/ReviewDetailDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/ShelterEventDetailDTO.java (diff)
Commit
294d25a9c3cb0adbcef41b5456a7a50e00f662cf
by juslopezg Refactor services, add validations & tests Refactor Adopter, Message, Notification and Veterinarian services to use Entity types, add logging, transactional boundaries and stronger validation/error handling. Introduces search/list/update/delete methods, uses EntityNotFoundException for missing resources, enforces business-id immutability, and guards deletions when related records exist. MessageService adds sender/recipient extraction (reflection fallback) and edit/delete timing/ownership checks. NotificationService enforces user association and age check before deletion. VeterinarianService validates specialties and shelter association. Tests converted from Mockito unit tests to @DataJpaTest integration tests using TestEntityManager and PodamFactory, covering create/update/search/delete scenarios and error cases. (commit: 294d25a ) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/AdopterServiceTest.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/NotificationServiceTest.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/NotificationService.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/MessageServiceTest.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/VeterinarianServiceTest.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/MessageService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/VeterinarianService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/AdopterService.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/VaccinationRecordDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionRequestDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/PetDTO.java The file was modified collections/PetManagementandHealth.postman_collection.json (diff) The file was modified pom.xml (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/MedicalEventDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/VaccineDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionRequestDetailDTO.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/PetDTO.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/PetDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/MedicalEventController.java The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/VaccineController.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/VaccineDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/VaccinationRecordDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/PetController.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/MedicalEventDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/VaccinationRecordController.java The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionRequestController.java
Commit
3df02535916728b077724983f0e9128fdb890a27
by juslopezg Refactor controllers, entities, DTOs and services Add new REST controllers (AdopterController, PetController) and standardize endpoint names and response handling across controllers; ReviewController now uses ReviewDTO and maps entities to DTOs. Update DTOs (AdoptionDTO, AdoptionDetailDTO, ReviewDetailDTO, ShelterEventDTO) and add a toEntity helper for AdoptionDTO. Rework JPA entities: adjust types, initialize collections, change Lombok annotations, add JsonIgnore/JsonIgnoreProperties to prevent serialization/lazy-loading issues, and refine relationship mappings (e.g. eventCode -> Long, eager/lazy fetch adjustments). Services updated with transactional annotations, stronger validation and business rules (AdopterService and AdoptionService improved checks and messages, PetService simplified and made transactional). Minor repository/import cleanups and controller response consistency (use ResponseEntity.ok / noContent). These changes address serialization errors, NPEs, and tighten business logic and validation. (commit: 3df0253 ) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/ShelterService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/TrialStayController.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/PetServiceTest.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/AdopterEntity.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/PetController.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/ShelterEventController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/ReviewController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/TrialStayEntity.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/AdopterController.java The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/AdoptionServiceTest.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/ReviewDetailDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/AdoptionService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/ShelterEventDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/TrialStayService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/AdopterService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/ShelterEventService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionDetailDTO.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/TrialStayServiceTest.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/AdoptionEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/AdoptionRequestEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/ReviewService.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/ReviewServiceTest.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/ShelterEventServiceTest.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/PetEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/ShelterEventEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/repositories/AdopterRepository.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/PetService.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/AdopterServiceTest.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/ShelterController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/ReviewEntity.java (diff)
Commit
dfbfb7d9bd7532033726644b9e5dee88f0196ed6
by scastanedab feat: connect controllers with services and implement DTO-Entity mapping - Implemented MedicalEventController with service integration and mapping - Implemented VaccinationRecordController aligned with service constraints - Implemented AdoptionRequestController with full CRUD support - Added missing relationship IDs in DTOs (petId, adopterId) - Completed DTO ↔ Entity conversion logic - Ensured consistency with service-layer validations and relationships (commit: dfbfb7d ) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/VaccineController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionRequestDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionRequestController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/MedicalEventController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/MedicalEventDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/VaccinationRecordController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/VaccinationRecordDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/VaccineDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/PetController.java (diff)
Commit
658fbb8176b2f5e23ebb4d0770d6265976ee84e4
by juslopezg Refactor controllers, DTOs, entities and services Convert controller endpoints to return DTOs and declare domain exceptions; map entities to DTOs in Adoption, Shelter, ShelterEvent controllers and add proper HTTP status annotations. Enforce business rules and validations in services: AdoptionService validates inputs, marks pet as ADOPTED and throws domain exceptions; PetService adds creation/update/delete validations, integrates ShelterRepository, and renames search methods to getPets/getPet; ShelterService centralizes validation and exposes getShelters; ShelterEventService simplifies date checks and update logic. Update entity models (PetEntity, AdoptionEntity, ShelterEntity) to include new fields, adjust JPA/JSON annotations and equals/hashCode exclusions to avoid cycles. Update DTOs (AdoptionDTO, ShelterEventDTO) and their entity conversion. Adjust tests to expect new behaviors and exception types. (commit: 658fbb8 ) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/ShelterEventService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/PetService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/ShelterEventController.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/PetServiceTest.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/AdoptionService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/ShelterEventDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/ShelterService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/PetEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/AdoptionEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/PetController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/ShelterController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/ShelterEntity.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/AdoptionServiceTest.java (diff)
Commit
727a2d97541ed9bc39dac785f608c4631444d1b5
by juslopezg Add Postman collection; update Review/TrialStay Add a new Postman collection for the "Orejitas y Colas" API and update Java backend code related to reviews and trial stays. The commit introduces collections/Orejitas y Colas.postman_collection.json (CRUD examples and tests for shelters, reviews, trial stays, events, and adoptions) and modifies controller, DTO, service, and unit test files to align Review and TrialStay API behaviour and mappings: - Updated: src/main/java/.../controllers/ReviewController.java, TrialStayController.java - Updated: src/main/java/.../dto/ReviewDTO.java, TrialStayDTO.java - Updated: src/main/java/.../services/ReviewService.java, TrialStayService.java - Updated tests: src/test/java/.../services/ReviewServiceTest.java, TrialStayServiceTest.java These changes sync API examples with backend logic and update unit tests accordingly. (commit: 727a2d9 ) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/TrialStayDTO.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/TrialStayServiceTest.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/TrialStayController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/TrialStayService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/ReviewService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/ReviewController.java (diff) The file was added collections/Orejitas y Colas.postman_collection.json The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/ReviewDTO.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/ReviewServiceTest.java (diff)
Commit
f79a1381d32cd2157e2d39222bae07567839d8dc
by juslopezg Add messaging/notification controllers and DTOs Introduce REST controllers for Message, Notification and Veterinarian and add many DTO/detail classes for messaging, notifications, users, adopters, veterinarians, pets and related domain objects. Refactor entities to favor ID-based foreign keys (MessageEntity: senderId/recipientId, NotificationEntity: userId) and simplify VeterinarianEntity (Lombok changes, collection initializations, relationship rework). Update services: MessageService adds search/list operations; NotificationService tightens validation/defaults and changes deletion rules; VeterinarianService is simplified and specialty validation extracted. Adjust tests to use the new ID-based message fields and add tests for message search/list behavior. (commit: f79a138 ) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/UserDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/MessageController.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/VeterinarianEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/MessageService.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/UserDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/VeterinarianDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/AdopterDetailDTO.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/NotificationService.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/AdopterDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/NotificationDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/VeterinarianDetailDTO.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/MedicalEventEntity.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/NotificationDTO.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/VaccinationRecordDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/MedicalEventDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/VeterinarianService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/AdoptionRequestEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/NotificationEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/UserEntity.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/NotificationController.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/MessageDetailDTO.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionRequestDetailDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/entities/MessageEntity.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/PetDetailDTO.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/MessageServiceTest.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/controllers/VeterinarianController.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionRequestDTO.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/dto/PetDTO.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/NotificationServiceTest.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/MessageDTO.java
Commit
fab2e7e1d9d11f579b406b71da522667df1987e0
by juslopezg Add Postman items: vets, messages, notifications Add new Postman collection folders for veterinarian, message, and notification resources. Each folder includes CRUD requests (POST/GET/PUT/DELETE) with test scripts that assert status codes, expected error messages, and set global IDs (e.g. veterinarian_id_1, notification_id_1). Endpoints target http://localhost:8080/api/... (commit: fab2e7e ) The file was modified collections/Orejitas y Colas.postman_collection.json (diff)
Commit
5f128f317d3a75e6843df37eb248a602e4659447
by juslopezg Refactor controllers to use DTOs and improve services Convert controllers to accept and return DTOs, add DTO classes, and improve service validation/transactions. Controllers (AdoptionHistory, AdoptionTracking, Devolution, Report) now use DTO request/response objects, map DTOs to entities via toEntity helpers, return proper HTTP statuses and error messages (handle EntityNotFoundException and validation errors), and adjust request paths (e.g. /adoption-histories, /adoption-trackings, /devolutions, /reports). Added DTOs and detail DTOs for adoption history, tracking, devolution and reports (plus related Shelter/Adoption DTO usage). Services (AdoptionTrackingService, DevolutionService, ReportService) were hardened: added null/adoption/shelter existence checks, transactional annotations, clearer method names (create/findAll/findById/update/delete), and safer partial updates. Tests updated to match new service APIs and behaviors (AdoptionTrackingServiceTest, DevolutionServiceTest), and a new ReportServiceTest was added while an outdated test class was removed. Overall this change improves API shape, error handling, and data validation. (commit: 5f128f3 ) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionTrackingController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/AdoptionTrackingService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/ReportService.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/AdoptionHistoryController.java (diff) The file was removed src/test/java/co/edu/udistrital/mdp/ZZZ/services/ReportService.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionHistoryDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionTrackingDetailDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/ReportDetailDTO.java The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/AdoptionTrackingServiceTest.java (diff) The file was modified src/test/java/co/edu/udistrital/mdp/ZZZ/services/DevolutionServiceTest.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/services/DevolutionService.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionTrackingDTO.java The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/ReportController.java (diff) The file was modified src/main/java/co/edu/udistrital/mdp/pets/controllers/DevolutionController.java (diff) The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/ReportDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/AdoptionHistoryDetailDTO.java The file was added src/test/java/co/edu/udistrital/mdp/ZZZ/services/ReportServiceTest.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/DevolutionDTO.java The file was added src/main/java/co/edu/udistrital/mdp/pets/dto/DevolutionDetailDTO.java
Commit
e979fe0495cb2fa76f1f0733ec95c9f841709732
by juslopezg Add adoption, devolution, vaccines & medical Extend Postman collection with new request groups and endpoints: Adoption History, Adoption Tracking, Devolution, Report; add Vaccines endpoints and example responses under veterinarian; add Medical Events POST and response examples. Also adjust several test expectations and prerequest scripts (fix error message strings and minor script entries) and include sample request bodies for the new endpoints. (commit: e979fe0 ) The file was modified collections/Orejitas y Colas.postman_collection.json (diff)