IW4M-Admin/Plugins/Stats/Models/EFRating.cs

32 lines
1.1 KiB
C#
Raw Normal View History

using SharedLibraryCore.Database.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace IW4MAdmin.Plugins.Stats.Models
{
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
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; }
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; }
}
}