Currently, I am working on a betting system for the next Fifa World Cup Russia 2018.
For this system, I have some strict points(constraints):
- Authentication will be via external api, so no password or sensitive informations about users.
- There are 4 types of betting: bet on a match, a bet on who will win the world cup, and a last one for the winner of each group.
- To determine if a user won a bet, there are 3 possibilities: first one if the score he put is exactly the same, then he will win 4pts, the second one if the score is wrong, but the difference of goals is right then 3pts, the last one if one possibility from the last, then we check if he chose the right winner of the match and he gets 2pts. Otherwise, no points.
- For matches which can contain penalties (from second roud), there is an extra betting (after typing score for the match, there is possibility to type who will win if they play 120min).
- I want to have a statistic for the admin (games won or lost, and users bets ..etc).
As you can see in the picture below, that is what I tried out (not a complete version, i am stuck here) :
What can be the best way to store the
extra bets(as said, there are extra bets, such as the winner of this cup, the winner of each group, and the winner in the case the match goes to penalties)?