public string? Name { get; set; } = default!;
}
+ // Used by SS14.Admin
+ public interface IBanCommon<TUnban> where TUnban : IUnbanCommon
+ {
+ int Id { get; set; }
+ Guid? UserId { get; set; }
+ (IPAddress, int)? Address { get; set; }
+ byte[]? HWId { get; set; }
+ DateTime BanTime { get; set; }
+ DateTime? ExpirationTime { get; set; }
+ string Reason { get; set; }
+ Guid? BanningAdmin { get; set; }
+ TUnban? Unban { get; set; }
+ }
+
+ // Used by SS14.Admin
+ public interface IUnbanCommon
+ {
+ int Id { get; set; }
+ int BanId { get; set; }
+ Guid? UnbanningAdmin { get; set; }
+ DateTime UnbanTime { get; set; }
+ }
+
[Table("server_ban")]
- public class ServerBan
+ public class ServerBan : IBanCommon<ServerUnban>
{
public int Id { get; set; }
public Guid? UserId { get; set; }
}
[Table("server_unban")]
- public class ServerUnban
+ public class ServerUnban : IUnbanCommon
{
[Column("unban_id")] public int Id { get; set; }
}
[Table("server_role_ban")]
- public sealed class ServerRoleBan
+ public sealed class ServerRoleBan : IBanCommon<ServerRoleUnban>
{
public int Id { get; set; }
public Guid? UserId { get; set; }
}
[Table("server_role_unban")]
- public sealed class ServerRoleUnban
+ public sealed class ServerRoleUnban : IUnbanCommon
{
[Column("role_unban_id")] public int Id { get; set; }