mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-25 06:30:21 -05:00
update zombie models
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
namespace Data.Models.Zombie;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Data.Models.Zombie;
|
||||
|
||||
public class ZombieAggregateClientStat : ZombieClientStat
|
||||
{
|
||||
@ -20,8 +22,23 @@ public class ZombieAggregateClientStat : ZombieClientStat
|
||||
public int HighestRound { get; set; }
|
||||
public int TotalRoundsPlayed { get; set; }
|
||||
public int TotalMatchesPlayed { get; set; }
|
||||
public int TotalMatchesCompleted { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public double RankingMetric { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public static readonly string[] RecordsKeys =
|
||||
{
|
||||
nameof(AverageKillsPerDown),
|
||||
nameof(AverageDowns),
|
||||
nameof(AverageRevives),
|
||||
nameof(HeadshotPercentage),
|
||||
nameof(AlivePercentage),
|
||||
nameof(AverageMelees),
|
||||
nameof(AverageRoundReached),
|
||||
nameof(AveragePoints),
|
||||
nameof(HighestRound),
|
||||
nameof(TotalRoundsPlayed),
|
||||
nameof(TotalMatchesPlayed)
|
||||
};
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ using Data.Models.Client;
|
||||
|
||||
namespace Data.Models.Zombie;
|
||||
|
||||
public abstract class ZombieClientStat
|
||||
public abstract class ZombieClientStat : DatedRecord
|
||||
{
|
||||
[Key]
|
||||
public long ZombieClientStatId { get; set; }
|
||||
@ -27,8 +27,8 @@ public abstract class ZombieClientStat
|
||||
public int Melees { get; set; }
|
||||
public int Downs { get; set; }
|
||||
public int Revives { get; set; }
|
||||
public int PointsEarned { get; set; }
|
||||
public int PointsSpent { get; set; }
|
||||
public long PointsEarned { get; set; }
|
||||
public long PointsSpent { get; set; }
|
||||
public int PerksConsumed { get; set; }
|
||||
public int PowerupsGrabbed { get; set; }
|
||||
}
|
||||
|
29
Data/Models/Zombie/ZombieClientStatRecord.cs
Normal file
29
Data/Models/Zombie/ZombieClientStatRecord.cs
Normal file
@ -0,0 +1,29 @@
|
||||
#nullable enable
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Data.Models.Client;
|
||||
|
||||
namespace Data.Models.Zombie;
|
||||
|
||||
public enum RecordType
|
||||
{
|
||||
Maximum,
|
||||
Minimum
|
||||
}
|
||||
|
||||
public class ZombieClientStatRecord : DatedRecord
|
||||
{
|
||||
[Key]
|
||||
public int ZombieClientStatRecordId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string Value { get; set; } = string.Empty;
|
||||
|
||||
public int? ClientId { get; set; }
|
||||
[ForeignKey(nameof(ClientId))]
|
||||
public virtual EFClient? Client { get; set; }
|
||||
|
||||
public long? RoundId { get; set; }
|
||||
[ForeignKey(nameof(RoundId))]
|
||||
public virtual ZombieRoundClientStat? Round { get; set; }
|
||||
}
|
@ -8,7 +8,7 @@ using Data.Models.Server;
|
||||
|
||||
namespace Data.Models.Zombie;
|
||||
|
||||
public class ZombieMatch
|
||||
public class ZombieMatch : DatedRecord
|
||||
{
|
||||
[Key]
|
||||
public int ZombieMatchId { get; set; }
|
||||
@ -21,6 +21,8 @@ public class ZombieMatch
|
||||
[ForeignKey(nameof(ServerId))]
|
||||
public virtual EFServer? Server { get; set; }
|
||||
|
||||
public int ClientsCompleted { get; set; }
|
||||
|
||||
public virtual ICollection<ZombieClientStat>? ClientStats { get; set; }
|
||||
|
||||
public DateTimeOffset MatchStartDate { get; set; } = DateTimeOffset.UtcNow;
|
||||
|
Reference in New Issue
Block a user