mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
huge commit for advanced stats feature.
broke data out into its own library. may be breaking changes with existing plugins
This commit is contained in:
31
Data/Models/Client/Stats/EFRating.cs
Normal file
31
Data/Models/Client/Stats/EFRating.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Data.Models.Server;
|
||||
|
||||
namespace Data.Models.Client.Stats
|
||||
{
|
||||
public class EFRating : SharedEntity
|
||||
{
|
||||
[Key]
|
||||
public int RatingId { 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 long? 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; }
|
||||
[Required]
|
||||
public int ActivityAmount { get; set; }
|
||||
[Required]
|
||||
public DateTime When { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user