1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

change table design for rating history

This commit is contained in:
RaidMax
2018-05-31 19:17:52 -05:00
parent dca4d10967
commit 76d15e488e
10 changed files with 283 additions and 401 deletions

View File

@ -11,12 +11,19 @@ namespace IW4MAdmin.Plugins.Stats.Models
{
[Key]
public int RatingId { get; set; }
public int ClientId { get; set; }
[ForeignKey("ClientId")]
public EFClient Client { get; set; }
public int RatingHistoryId { get; set; }
[ForeignKey("RatingHistoryId")]
public virtual EFClientRatingHistory RatingHistory { get; set; }
// if null, indicates that the rating is an average rating
public int? ServerId { get; set; }
// [ForeignKey("ServerId")] can't make this nullable if this annotation is set
public virtual EFServer Server { get; set; }
[Required]
public double Performance { get; set; }
[Required]
public int Ranking { get; set; }
[Required]
// indicates if the rating is the latest
public bool Newest { get; set; }
}
}