IW4M-Admin/Data/Models/Client/Stats/Reference/EFWeaponAttachmentCombo.cs
RaidMax c5375b661b huge commit for advanced stats feature.
broke data out into its own library.
may be breaking changes with existing plugins
2021-03-22 11:09:25 -05:00

36 lines
1.0 KiB
C#

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}";
}
}