Role bans (#6703)
This commit is contained in:
@@ -29,6 +29,8 @@ namespace Content.Server.Database
|
||||
public DbSet<ServerUnban> Unban { get; set; } = default!;
|
||||
public DbSet<ConnectionLog> ConnectionLog { get; set; } = default!;
|
||||
public DbSet<ServerBanHit> ServerBanHit { get; set; } = default!;
|
||||
public DbSet<ServerRoleBan> RoleBan { get; set; } = default!;
|
||||
public DbSet<ServerRoleUnban> RoleUnban { get; set; } = default!;
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -387,4 +389,37 @@ namespace Content.Server.Database
|
||||
public ServerBan Ban { get; set; } = null!;
|
||||
public ConnectionLog Connection { get; set; } = null!;
|
||||
}
|
||||
|
||||
[Table("server_role_ban")]
|
||||
public sealed class ServerRoleBan
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Guid? UserId { get; set; }
|
||||
[Column(TypeName = "inet")] public (IPAddress, int)? Address { get; set; }
|
||||
public byte[]? HWId { get; set; }
|
||||
|
||||
public DateTime BanTime { get; set; }
|
||||
|
||||
public DateTime? ExpirationTime { get; set; }
|
||||
|
||||
public string Reason { get; set; } = null!;
|
||||
public Guid? BanningAdmin { get; set; }
|
||||
|
||||
public ServerRoleUnban? Unban { get; set; }
|
||||
|
||||
public string RoleId { get; set; } = null!;
|
||||
}
|
||||
|
||||
[Table("server_role_unban")]
|
||||
public sealed class ServerRoleUnban
|
||||
{
|
||||
[Column("role_unban_id")] public int Id { get; set; }
|
||||
|
||||
public int BanId { get; set; }
|
||||
public ServerBan Ban { get; set; } = null!;
|
||||
|
||||
public Guid? UnbanningAdmin { get; set; }
|
||||
|
||||
public DateTime UnbanTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user