docs: sync design-document section 3.5.5b with finalised identity matching schema

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 12:35:08 +02:00
parent c75a93aa5d
commit 239fe57a11

View File

@@ -403,9 +403,9 @@ Enterprise-grade identiteitsresolutie met drie stappen: detectie → suggestie
| **Tabel** | **Belangrijkste kolommen** | **Relaties, constraints & opmerkingen** |
|----|----|----|
| **person_identity_matches** | id (ULID), person_id, user_id, match_type (email), confidence (high\|medium), status (pending\|confirmed\|dismissed), confirmed_by_user_id (nullable), confirmed_at (timestamp nullable), dismissed_by_user_id (nullable), dismissed_at (timestamp nullable), created_at | Respecteert UNIQUE(event_id, user_id) op persons — geen dubbele koppeling mogelijk. INDEX: (person_id, status), (user_id, status), (status). |
| **person_identity_matches** | id (ULID), person_id (FK → persons), matched_user_id (FK → users), matched_on (enum: email\|phone\|manual), confidence (enum: exact\|fuzzy), status (enum: pending\|confirmed\|dismissed), resolved_by_user_id (FK nullable → users), resolved_at (timestamp nullable), created_at | Enterprise-grade identiteitsresolutie: detectie → suggestie → bevestiging. Nooit silent auto-linking. `matched_user_id` i.p.v. `user_id` om verwarring met `persons.user_id` te vermijden. `confidence: exact` = deterministische match (email/telefoon identiek), `fuzzy` = algoritmisch (naam-gelijkenis, genormaliseerde telefoon). Eén `resolved_by`/`resolved_at` paar volstaat: `status` enum is exclusief (pending→confirmed OF pending→dismissed), activity log (Spatie) legt het volledige auditspoor vast. UNIQUE(person_id, matched_user_id). INDEX: (person_id, status), (matched_user_id, status), (status). |
**Status:** Ontwerp afgerond, nog niet geïmplementeerd. Tabel wordt aangemaakt bij bouw van de identity matching module.
**Status:** Schema gefinaliseerd, klaar voor implementatie.
### 3.5.6 Accreditatie Engine