Skip to content

Commit e7dc948

Browse files
Feature/12 add uml mermaid diagram (#15)
* initial pass at something * incorrect association * chaser * initial pass * aligning the comments
1 parent de9d579 commit e7dc948

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
```mermaid
3+
classDiagram
4+
Choice *-- Selection
5+
Ballot *-- Contest
6+
Contest *-- Selection
7+
Choice *-- Ticket
8+
9+
class Choice {
10+
+String name
11+
+String party
12+
+Dict ticket
13+
+String choice_type
14+
}
15+
16+
class Selection {
17+
+Int index
18+
+String name
19+
}
20+
21+
class Ticket {
22+
+String name
23+
+String party
24+
}
25+
26+
class Contest {
27+
+List choices # order is important
28+
+String vote_variation # RCV, plurality
29+
+String uid # unique to election only
30+
+Float win_threshold # default = 0.5
31+
+Int votes_allowed # defines overvote
32+
+String write_in # unimplemented
33+
+List selection # index + name
34+
}
35+
36+
class Ballot {
37+
+List active_ggos # order is important
38+
+Dict contests # ordered by active_ggos
39+
+String ballot_status # blank or cast
40+
}
41+
```

0 commit comments

Comments
 (0)