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:
21
Data/Models/Client/Stats/Reference/EFHitLocation.cs
Normal file
21
Data/Models/Client/Stats/Reference/EFHitLocation.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Data.Abstractions;
|
||||
using Stats.Models;
|
||||
|
||||
namespace Data.Models.Client.Stats.Reference
|
||||
{
|
||||
public class EFHitLocation : AuditFields, IUniqueId
|
||||
{
|
||||
[Key]
|
||||
public int HitLocationId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public Models.Reference.Game Game { get; set; }
|
||||
|
||||
public long Id => HitLocationId;
|
||||
public string Value => Name;
|
||||
}
|
||||
}
|
21
Data/Models/Client/Stats/Reference/EFMap.cs
Normal file
21
Data/Models/Client/Stats/Reference/EFMap.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Data.Abstractions;
|
||||
using Stats.Models;
|
||||
|
||||
namespace Data.Models.Client.Stats.Reference
|
||||
{
|
||||
public class EFMap : AuditFields, IUniqueId
|
||||
{
|
||||
[Key]
|
||||
public int MapId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public Models.Reference.Game Game { get; set; }
|
||||
|
||||
public long Id => MapId;
|
||||
public string Value => Name;
|
||||
}
|
||||
}
|
21
Data/Models/Client/Stats/Reference/EFMeansOfDeath.cs
Normal file
21
Data/Models/Client/Stats/Reference/EFMeansOfDeath.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Data.Abstractions;
|
||||
using Stats.Models;
|
||||
|
||||
namespace Data.Models.Client.Stats.Reference
|
||||
{
|
||||
public class EFMeansOfDeath: AuditFields, IUniqueId
|
||||
{
|
||||
[Key]
|
||||
public int MeansOfDeathId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public Models.Reference.Game Game { get; set; }
|
||||
|
||||
public long Id => MeansOfDeathId;
|
||||
public string Value => Name;
|
||||
}
|
||||
}
|
21
Data/Models/Client/Stats/Reference/EFWeapon.cs
Normal file
21
Data/Models/Client/Stats/Reference/EFWeapon.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Data.Abstractions;
|
||||
using Stats.Models;
|
||||
|
||||
namespace Data.Models.Client.Stats.Reference
|
||||
{
|
||||
public class EFWeapon : AuditFields, IUniqueId
|
||||
{
|
||||
[Key]
|
||||
public int WeaponId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public Models.Reference.Game Game { get; set; }
|
||||
|
||||
public long Id => WeaponId;
|
||||
public string Value => Name;
|
||||
}
|
||||
}
|
21
Data/Models/Client/Stats/Reference/EFWeaponAttachment.cs
Normal file
21
Data/Models/Client/Stats/Reference/EFWeaponAttachment.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Data.Abstractions;
|
||||
using Stats.Models;
|
||||
|
||||
namespace Data.Models.Client.Stats.Reference
|
||||
{
|
||||
public class EFWeaponAttachment : AuditFields, IUniqueId
|
||||
{
|
||||
[Key]
|
||||
public int WeaponAttachmentId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public Models.Reference.Game Game { get; set; }
|
||||
|
||||
public long Id => WeaponAttachmentId;
|
||||
public string Value => Name;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
using Data.Abstractions;
|
||||
using Stats.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Data.Models.Client.Stats.Reference
|
||||
{
|
||||
public class EFWeaponAttachmentCombo : AuditFields, IUniqueId
|
||||
{
|
||||
[Key]
|
||||
public int WeaponAttachmentComboId { get; set; }
|
||||
|
||||
[Required]
|
||||
public Models.Reference.Game Game { get; set; }
|
||||
|
||||
[Required]
|
||||
public int Attachment1Id { get; set; }
|
||||
|
||||
[ForeignKey(nameof(Attachment1Id))]
|
||||
public virtual EFWeaponAttachment Attachment1 { get; set; }
|
||||
|
||||
public int? Attachment2Id { get; set; }
|
||||
|
||||
[ForeignKey(nameof(Attachment2Id))]
|
||||
public virtual EFWeaponAttachment Attachment2 { get; set; }
|
||||
|
||||
public int? Attachment3Id { get; set; }
|
||||
|
||||
[ForeignKey(nameof(Attachment3Id))]
|
||||
public virtual EFWeaponAttachment Attachment3 { get; set; }
|
||||
|
||||
public long Id => WeaponAttachmentComboId;
|
||||
public string Value => $"{Attachment1Id}{Attachment2Id}{Attachment3Id}";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user