Member Association Store
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Persistence layer for user-to-association membership records. Stores the many-to-many links between users and local chapters along with the primary-affiliation flag used by attribution logic.
member-association-store
Sources & reasoning
NHF (§66) explicitly requires multi-chapter membership handling to prevent double-reporting; listed as a feature of admin-organization in §378. Core Product since it depends on hierarchy and is not in the MVP admin scope.
-
docs/source/likeperson.md · line 66Håndtering av medlemmer i flere lokallag (opptil 5): Avklare tilhørighet og hindre dobbeltrapportering.
-
docs/source/likeperson.md · line 378Member Associations
Responsibilities
- Persist user-to-association membership rows with primary flag
- Enforce uniqueness of one primary affiliation per user at the storage layer
- Support efficient lookup of memberships by user and by association
- Maintain referential integrity with users and organizations
- Provide transactional updates when primary affiliation is reassigned
Interfaces
findByUserId(userId): MemberAssociationRow[]
findByAssociationId(associationId): MemberAssociationRow[]
insert(row): MemberAssociationRow
delete(userId, associationId): void
updatePrimary(userId, associationId): void
Related Data Entities (1)
Data entities managed by this component