b29a268b1d
- Move completed plan files to .plans/done/ - Move 18 open plan files to .plans/open/ - Update .gitignore to exclude .verified_plans temp file - Verified all 18 open plans still describe unimplemented issues
1.6 KiB
1.6 KiB
Plan: Issue #21 - MemberService with CRUD operations
Summary
Create MemberService that provides business logic for member CRUD operations. Includes validation (required fields, date plausibility, duplicate detection), sub-entity management (addresses, phones, emails), and soft-delete logic that hard-deletes sensitive data per requirements section 4.5.
Steps
- Create
lib/Service/MemberService.phpwith:- create(): validate required fields, check duplicates, set timestamps, persist member + sub-entities
- find(): return member with loaded sub-entities
- findAll(): paginated list with optional filters
- update(): validate, track changes, update timestamps
- delete(): soft-delete (set deleted_at, set status geloescht, hard-delete sensitive data)
- Sub-entity CRUD: addAddress, updateAddress, deleteAddress, etc.
- Validation logic:
- Required fields: vorname, nachname, geburtsdatum, eintritt
- Date plausibility: birthday not future, not >120 years ago, eintritt not before birthday
- Duplicate detection: warn on matching vorname + nachname + geburtsdatum
AC Verification Checklist
- MemberService class exists with proper DI constructor
- Create method validates required fields and checks for duplicates
- Read method returns member with sub-entities (addresses, phones, emails)
- Update method validates fields and updates timestamps
- Soft-delete sets status to geloescht and hard-deletes sensitive data
- Date plausibility checks implemented
- Sub-entity management methods exist (addresses, phones, emails)
- Proper exception handling with meaningful error messages