feat(fostering): guardian + stay records for fostered rabbits (admin-only) #20
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Track rabbits that are fostered from an owner (ownership stays with the owner; we act as legal guardian for veterinary treatment purposes). Entirely admin-managed — no public form, since this represents an existing relationship staff set up directly rather than a cold inbound request.
Key design goal: no duplicate records for repeat stays
A rabbit may be fostered with us multiple times (e.g. owner's annual holiday). We must not create a new rabbit/owner record each time. Guardian-centric model:
FosterGuardian(one row per owner, reusable across all their rabbits): name, phone, email, address, status (active/inactive), notes, and a legal-guardian-for-vet-treatment acknowledgement + timestamp + text version (captured by staff on the owner's behalf, e.g. from a signed/verbal agreement).Rabbit: add nullablefoster_guardian_idFK. A guardian can have many linked rabbits. No change to the existing status enum — rabbit status staysFosteringfor the life of the relationship.FosterStay: FK torabbit_id(not guardian, since a guardian's rabbits have independent stay histories). Fields: arrival_date, departure_date (nullable while ongoing), status (booked/checked_in/checked_out/cancelled), notes.Each subsequent visit is just a new
FosterStayrow against the same rabbit — owner details and rabbit record are entered once.hutch_idon the rabbit is set on check-in and cleared on check-out, so the rabbit naturally drops out of hutch occupancy between visits without needing extra statuses.When a foster relationship ends permanently, the guardian is simply set to
inactive— no rabbit status change, history preserved on the rabbit and stay records.Admin UI (
/fosters)Notes