Unique validation for (game_id, player_id, round_type), which means that in a game, a player can play a type of round just once (e.g. You can only choose King of Hearts just once)
The game_id will be the game where this round was played
The player_id will be the player that chooses this round
The round_type will be a string value from a pre-defined enum
The scores will hold all the scores of the playing players. E.g. { marius: -100, robert: -300 } for queens, or { marius: 0, robert: -400 } for king of hearts
Model
Validate the uniqueness of (game_id, player_id, round_type)
Define the round_type enum, as
Feel free to change the enum with the desired values (e.g. you can remove levate/whist/totale/renta, and add totale_minus, totale_plus, rentz_minue, rentz_plus)
This will store the data for each round of games.
Columns
Unique validation for (game_id, player_id, round_type), which means that in a game, a player can play a type of round just once (e.g. You can only choose King of Hearts just once)
The game_id will be the game where this round was played The player_id will be the player that chooses this round The round_type will be a string value from a pre-defined enum The scores will hold all the scores of the playing players. E.g.
{ marius: -100, robert: -300 }
for queens, or{ marius: 0, robert: -400 }
for king of heartsModel