Wiki source code of Core Data Model ERD Mermaid
Last modified by Robert Schaub on 2025/12/24 09:59
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{mermaid}} | ||
| 2 | erDiagram | ||
| 3 | USER ||--o{ CLAIM : creates | ||
| 4 | CLAIM ||--o{ EVIDENCE : has | ||
| 5 | CLAIM ||--o{ SCENARIO : has | ||
| 6 | SCENARIO ||--o{ VERDICT : assessed | ||
| 7 | EVIDENCE }o--|| SOURCE : from | ||
| 8 | USER { | ||
| 9 | uuid id PK | ||
| 10 | text name | ||
| 11 | text email | ||
| 12 | text role "reader|contributor|moderator|admin" | ||
| 13 | int contributions_count "cached" | ||
| 14 | timestamp created_at | ||
| 15 | } | ||
| 16 | CLAIM { | ||
| 17 | uuid id PK | ||
| 18 | uuid user_id FK | ||
| 19 | text text | ||
| 20 | decimal confidence "0-1" | ||
| 21 | jsonb evidence_summary "cached: top 5 evidence" | ||
| 22 | text_array source_names "cached: for display" | ||
| 23 | int scenario_count "cached: count" | ||
| 24 | timestamp cache_updated_at "cache freshness" | ||
| 25 | timestamp created_at | ||
| 26 | timestamp updated_at | ||
| 27 | } | ||
| 28 | EVIDENCE { | ||
| 29 | uuid id PK | ||
| 30 | uuid claim_id FK | ||
| 31 | uuid source_id FK | ||
| 32 | text content | ||
| 33 | decimal relevance "0-1" | ||
| 34 | text url | ||
| 35 | timestamp created_at | ||
| 36 | } | ||
| 37 | SOURCE { | ||
| 38 | uuid id PK | ||
| 39 | text name | ||
| 40 | text domain | ||
| 41 | decimal track_record_score "0-1" | ||
| 42 | int total_citations | ||
| 43 | timestamp last_updated | ||
| 44 | timestamp created_at | ||
| 45 | } | ||
| 46 | SCENARIO { | ||
| 47 | uuid id PK | ||
| 48 | uuid claim_id FK "belongs to claim" | ||
| 49 | uuid extracted_from "references evidence_id that provided context" | ||
| 50 | text description | ||
| 51 | jsonb assumptions | ||
| 52 | timestamp created_at | ||
| 53 | timestamp updated_at | ||
| 54 | } | ||
| 55 | VERDICT { | ||
| 56 | uuid id PK | ||
| 57 | uuid scenario_id FK "assessed scenario" | ||
| 58 | text likelihood_range "e.g. 0.40-0.65 (uncertain)" | ||
| 59 | decimal confidence "0-1" | ||
| 60 | text explanation_summary "verdict reasoning" | ||
| 61 | text_array uncertainty_factors "factors affecting confidence" | ||
| 62 | timestamp created_at | ||
| 63 | timestamp updated_at | ||
| 64 | } | ||
| 65 | {{/mermaid}} | ||
| 66 | |||
| 67 | **Core Data Model ERD** - Shows primary business entities and their relationships. Claims have Evidence (sources supporting/refuting) and Scenarios (different contexts for evaluation). Each Scenario is assessed by Verdicts (conclusion about the claim in that scenario context). Evidence comes from Sources (with track records). Verdicts track changes through the Edit entity like all other entities. Claims include denormalized cache fields for performance. Most entities created/edited by AKEL automatically. See [[Audit Trail ERD>>FactHarbor.Specification.Diagrams.Audit-Trail-ERD_Mermaid.WebHome]] for edit tracking relationships. |