combined Penalty and EFPenalty

moved some classes around
This commit is contained in:
RaidMax
2019-05-29 16:55:35 -05:00
parent 0b0290a871
commit 95d64df321
54 changed files with 231 additions and 207 deletions

View File

@ -35,26 +35,7 @@ namespace SharedLibraryCore.Database.Models
public string Password { get; set; }
public string PasswordSalt { get; set; }
// list of meta for the client
public virtual ICollection<EFMeta> Meta { get; set; }
[NotMapped]
public virtual string Name
{
get { return CurrentAlias?.Name ?? "--"; }
set { if (CurrentAlias != null) CurrentAlias.Name = value; }
}
[NotMapped]
public virtual int? IPAddress
{
get { return CurrentAlias.IPAddress; }
set { CurrentAlias.IPAddress = value; }
}
[NotMapped]
public string IPAddressString => IPAddress.ConvertIPtoString();
[NotMapped]
public virtual IDictionary<int, long> LinkedAccounts { get; set; }
public virtual ICollection<EFMeta> Meta { get; set; }
public virtual ICollection<EFPenalty> ReceivedPenalties { get; set; }
public virtual ICollection<EFPenalty> AdministeredPenalties { get; set; }
}

View File

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace SharedLibraryCore.Database.Models
{
public class EFPenalty : SharedEntity
public partial class EFPenalty : SharedEntity
{
[Key]
public int PenaltyId { get; set; }
@ -29,6 +29,6 @@ namespace SharedLibraryCore.Database.Models
public string AutomatedOffense { get; set; }
[Required]
public bool IsEvadedOffense { get; set; }
public Objects.Penalty.PenaltyType Type { get; set; }
public PenaltyType Type { get; set; }
}
}