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:
43
Database/Models/Client.cs
Normal file
43
Database/Models/Client.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Database.Models
|
||||
{
|
||||
public class Client
|
||||
{
|
||||
[Key]
|
||||
public int ClientId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public string NetworkId { get; set; }
|
||||
[Required]
|
||||
public SharedLibrary.Player.Permission Level { get; set; }
|
||||
public int Connections { get; set; }
|
||||
[Required]
|
||||
public string IPAddress { get; set; }
|
||||
[Required]
|
||||
public DateTime LastConnection { get; set; }
|
||||
public bool Masked { get; set; }
|
||||
|
||||
public SharedLibrary.Player ToPlayer()
|
||||
{
|
||||
return new SharedLibrary.Player()
|
||||
{
|
||||
Name = Name,
|
||||
Connections = Connections,
|
||||
DatabaseID = ClientId,
|
||||
NetworkID = NetworkId,
|
||||
Level = Level,
|
||||
IP = IPAddress,
|
||||
LastConnection = LastConnection,
|
||||
Masked = Masked
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user