Wiki source code of User Class Diagram
Last modified by Robert Schaub on 2025/12/22 13:50
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{mermaid}} | ||
| 2 | classDiagram | ||
| 3 | class User { | ||
| 4 | +UUID id | ||
| 5 | +String username | ||
| 6 | +String email | ||
| 7 | +Role role | ||
| 8 | +Int reputation | ||
| 9 | +Timestamp created_at | ||
| 10 | +contribute() | ||
| 11 | +flag_issue() | ||
| 12 | +earn_reputation() | ||
| 13 | } | ||
| 14 | class Reader { | ||
| 15 | <<Role>> | ||
| 16 | +browse() | ||
| 17 | +search() | ||
| 18 | +flag_content() | ||
| 19 | } | ||
| 20 | class Contributor { | ||
| 21 | <<Role>> | ||
| 22 | +edit_claims() | ||
| 23 | +add_evidence() | ||
| 24 | +suggest_improvements() | ||
| 25 | +requires: reputation sufficient | ||
| 26 | } | ||
| 27 | class Moderator { | ||
| 28 | <<Role>> | ||
| 29 | +review_flags() | ||
| 30 | +hide_content() | ||
| 31 | +resolve_disputes() | ||
| 32 | +requires: appointed by Governing Team | ||
| 33 | } | ||
| 34 | User --> Reader : default role | ||
| 35 | User --> Contributor : registers + earns reputation | ||
| 36 | User --> Moderator : appointed | ||
| 37 | note for User "Reputation system unlocks permissions progressively" | ||
| 38 | note for Contributor "Reputation sufficient: Full edit access" | ||
| 39 | note for Contributor "Reputation sufficient: Can approve changes" | ||
| 40 | {{/mermaid}} | ||
| 41 | |||
| 42 | **Simplified flat role structure**: | ||
| 43 | * Three roles only: Reader (default), Contributor (earned), Moderator (appointed) | ||
| 44 | * Reputation system replaces role hierarchy | ||
| 45 | * Progressive permissions based on reputation, not titles |