This entity will store information about a Player's highest achieved global and country rank. Each Player can own a maximum of one PlayerHighestRanks per Ruleset (similarly to PlayerRating).
[x] PlayerHighestRanks entity created
[x] Navigation added to existing Player entity
[x] Relevant database migration created and tested
The entity should be structured as such:
public class PlayerHighestRanks : IUpdateableEntity
{
public Ruleset Ruleset { get; set; }
public int GlobalRank { get; set; }
public DateTime GlobalRankDate { get; set; }
public int CountryRank { get; set; }
public DateTime CountryRankDate { get; set; }
// FK, required
public int PlayerId { get; set; }
// Backwards navigation
public Player Player { get; set; }
}
The entity should:
Have a table named player_highest_ranks
Have a one to many relationship with Player (Player -> PlayerHighestRanks)
Unique compound index of { PlayerId, Ruleset } (Max one per ruleset per player)
This entity will store information about a Player's highest achieved global and country rank. Each
Player
can own a maximum of onePlayerHighestRanks
per Ruleset (similarly toPlayerRating
).PlayerHighestRanks
entity createdPlayer
entityThe entity should be structured as such:
The entity should:
player_highest_ranks
Player
(Player
->PlayerHighestRanks
)PlayerId
,Ruleset
} (Max one per ruleset per player)Player
deletion