How it should work?
This page explains some rules about uses cases
How does it should work?
Every participants should have an account
Each participants is labeled with role
for the example of Malagasy National Assembly, role can be
deputy
andsessionLeader
deputies are the voters
the one that lead and manage the session. He does not vote.
In a session come one or more Yes/No questions.
Each question has to be voted by voters.
Right after a vote, every body can get the statistic automatically.
Right after a session, every body can get a resume about the session.
In order to be transparent as possible these are some rules to follow:
Rules for session
A session has 3 states: created, open, close
Numbers of voters in a session can be updated only if the state of the session is `created`, you cannot change an open or a closed session.
Questions can be added if and only if session exists and not closed.
Rules for question
Yes,No, NoIdea question-arrays should be empty by creation.
Voted attribute should be `false` by creation.
State attribute should be `created` by creation
Session should not be empty and should match a created or an open session in the database. It tells us, in which session belongs the question.
Sentence attribute can be updated only if the attribute voted is `false`.
Every question has a state : created, open, close
created: No one can vote
open: Every body can vote
close : No one can vote
Rules of vote
Only Session Leader can open the vote.
The vote is Open for a certain time period, decided by the Session Leader. And only during this time, user can vote.
After the periode of time, the vote is automatically closed.
Every registered User can vote
Client sends request to the endpoint vote
The client's ID will be pushed to the set (every item is unique) of their decision (Yes, No, NoIdea)
A voter has only one vote, which means, that if he already voted for `Yes`, he canot vote for `No` or `NoIdea` any more .
The vote cannot be updated. Once the request arrives at server side, you are done.
Last updated