From e7dc948761e05258b0f82e46cd17a6635614917a Mon Sep 17 00:00:00 2001 From: sandy currier Date: Mon, 1 May 2023 10:24:54 -0400 Subject: [PATCH] Feature/12 add uml mermaid diagram (#15) * initial pass at something * incorrect association * chaser * initial pass * aligning the comments --- docs/webapi-to-backend-ballot-UML.md | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docs/webapi-to-backend-ballot-UML.md diff --git a/docs/webapi-to-backend-ballot-UML.md b/docs/webapi-to-backend-ballot-UML.md new file mode 100644 index 0000000..225cbd3 --- /dev/null +++ b/docs/webapi-to-backend-ballot-UML.md @@ -0,0 +1,41 @@ + +```mermaid +classDiagram + Choice *-- Selection + Ballot *-- Contest + Contest *-- Selection + Choice *-- Ticket + + class Choice { + +String name + +String party + +Dict ticket + +String choice_type + } + + class Selection { + +Int index + +String name + } + +class Ticket { + +String name + +String party +} + + class Contest { + +List choices # order is important + +String vote_variation # RCV, plurality + +String uid # unique to election only + +Float win_threshold # default = 0.5 + +Int votes_allowed # defines overvote + +String write_in # unimplemented + +List selection # index + name + } + + class Ballot { + +List active_ggos # order is important + +Dict contests # ordered by active_ggos + +String ballot_status # blank or cast + } +```