Open gdezan opened 4 years ago
Also this PR has 2 features. Next time it is better to separate them.
I've come with this. Though there's
User
name
email
password
nusp
Poll
uid (unique id, so we can implement authorization later)
name
description
created
ending_date
type
checkboxes
Vote
user_id
option_id
Options
poll_id
value
Participants
poll_id
user_id
user_role (participant, admin, poll owner)
I think this would be enough for testing the application.
I think this modeling is quite incomplete.
I suggest you to take a look at the interface before modeling. @ET33 was working on it, he may offer help.
By looking at the main page:
We can notice that it is needed an author to each poll, so we can differentiate it by the type (type is defined by whether the polls is yours or not). Polls must have a due date as well (in the print it is written creation date, but due date is written on the poll edit page and makes more sense). The votes are currently represented as integers, but I dont think it is enough. There should be a different model for the option of a poll and a different object for each individual vote, where we would be able to track who voted, when and in what option.
By the poll editing page:
We see administrators, participants and options. Only participants is modeled as I could comprehend. Polls also have a description.
There is another page, but I could extract any other model from it. I still think it is worth to take a look.