1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

Moved from SQLITE to EntityFramework.

Lots of things are broken!
This commit is contained in:
RaidMax
2017-11-25 19:29:58 -06:00
parent c56d98d11c
commit 23eb641113
61 changed files with 1690 additions and 1685 deletions

View File

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SharedLibrary.Database.Models
{
public class EFClient : SharedEntity
{
[Key]
public int ClientId { get; set; }
[Index(IsUnique = true)]
public string NetworkId { get; set; }
[Required]
public string Name { get; set; }
[Required]
public Objects.Player.Permission Level { get; set; }
[Required]
public int Connections { get; set; }
[Required]
public int TotalConnectionTime { get; set; }
[Required]
public string IPAddress { get; set; }
[Required]
public DateTime FirstConnection { get; set; }
[Required]
public DateTime LastConnection { get; set; }
public bool Masked { get; set; }
[Required]
public int AliasLinkId { get; set; }
[ForeignKey("AliasLinkId")]
public virtual EFAliasLink AliasLink { get; set; }
public virtual ICollection<EFPenalty> ReceivedPenalties { get; set; }
public virtual ICollection<EFPenalty> AdministeredPenalties { get; set; }
public EFClient()
{
ReceivedPenalties = new List<EFPenalty>();
AdministeredPenalties = new List<EFPenalty>();
}
}
}