feat(pet): implement computed pet availability resolver (#61)#118
Open
josealfredo79 wants to merge 2 commits into
Open
feat(pet): implement computed pet availability resolver (#61)#118josealfredo79 wants to merge 2 commits into
josealfredo79 wants to merge 2 commits into
Conversation
|
@josealfredo79 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Owner
|
@josealfredo79 build failed, please check |
Author
|
@amina69 The latest commit (eeed603) fixes the DI error causing the e2e failure — PetAvailabilityService wasn't exported from PetsModule nor imported in AdoptionModule/CustodyModule. The CI run is pending approval at https://github.com/amina69/PetAd-backend/actions/runs/28300755940 — could you please approve and run it? Thanks! |
Owner
|
@josealfredo79 can you refoked the branch to solve conflict issues. |
- Replace boolean isAvailable with PetStatus enum (ADOPTED, IN_CUSTODY, PENDING, AVAILABLE) - PetAvailabilityService.resolve() applies priority rules: COMPLETED > ACTIVE > PENDING > default - Add PET_AVAILABILITY_CHANGED event type to Prisma schema + migration - AdoptionService logs PET_AVAILABILITY_CHANGED on request, complete, reject, cancel - CustodyService logs PET_AVAILABILITY_CHANGED on start, return, violation - Unit tests for PetAvailabilityService covering all 4 states + priority overrides - Update PetsService, pets tests, adoption tests, custody tests
…odule and CustodyModule PetAvailabilityService was not exported from PetsModule and AdoptionModule and CustodyModule were not importing PetsModule, causing DI resolution failures in e2e tests (Nest can't resolve dependencies).
eeed603 to
1c86adf
Compare
Author
|
@amina69 Ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #61
Summary
Pet availability is now computed dynamically via PetAvailabilityService.resolve() from adoption and custody records, eliminating conflicting state.
Changes
Acceptance Criteria