2021-03-22 12:09:25 -04:00
|
|
|
|
using System;
|
2018-05-30 21:50:20 -04:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2021-03-22 12:09:25 -04:00
|
|
|
|
using Data.Models.Server;
|
2018-05-30 21:50:20 -04:00
|
|
|
|
|
2021-03-22 12:09:25 -04:00
|
|
|
|
namespace Data.Models.Client.Stats
|
2018-05-30 21:50:20 -04:00
|
|
|
|
{
|
|
|
|
|
public class EFRating : SharedEntity
|
|
|
|
|
{
|
|
|
|
|
[Key]
|
|
|
|
|
public int RatingId { get; set; }
|
2018-05-31 20:17:52 -04:00
|
|
|
|
public int RatingHistoryId { get; set; }
|
|
|
|
|
[ForeignKey("RatingHistoryId")]
|
|
|
|
|
public virtual EFClientRatingHistory RatingHistory { get; set; }
|
|
|
|
|
// if null, indicates that the rating is an average rating
|
2018-11-27 19:31:48 -05:00
|
|
|
|
public long? ServerId { get; set; }
|
2018-05-31 20:17:52 -04:00
|
|
|
|
// [ForeignKey("ServerId")] can't make this nullable if this annotation is set
|
|
|
|
|
public virtual EFServer Server { get; set; }
|
2018-05-30 21:50:20 -04:00
|
|
|
|
[Required]
|
|
|
|
|
public double Performance { get; set; }
|
|
|
|
|
[Required]
|
|
|
|
|
public int Ranking { get; set; }
|
2018-05-31 20:17:52 -04:00
|
|
|
|
[Required]
|
|
|
|
|
// indicates if the rating is the latest
|
|
|
|
|
public bool Newest { get; set; }
|
2018-06-01 20:55:26 -04:00
|
|
|
|
[Required]
|
|
|
|
|
public int ActivityAmount { get; set; }
|
2018-09-07 23:29:42 -04:00
|
|
|
|
[Required]
|
|
|
|
|
public DateTime When { get; set; } = DateTime.UtcNow;
|
2018-05-30 21:50:20 -04:00
|
|
|
|
}
|
|
|
|
|
}
|