mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-16 23:40:57 +00:00
Refactor Database class (#616)
Refactor Database into DatabaseContext Moved into separate folder so it actually has a namespace instead sitting in the root
This commit is contained in:
parent
2aff26f83d
commit
64b95e807d
246 changed files with 1211 additions and 965 deletions
|
@ -1,4 +1,5 @@
|
|||
using LBPUnion.ProjectLighthouse.Configuration;
|
||||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Token;
|
||||
|
@ -9,7 +10,7 @@ namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Moderation;
|
|||
|
||||
public class BannedUsersPage : BaseLayout
|
||||
{
|
||||
public BannedUsersPage(Database database) : base(database)
|
||||
public BannedUsersPage(DatabaseContext database) : base(database)
|
||||
{}
|
||||
|
||||
public List<User> Users = new();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using LBPUnion.ProjectLighthouse.Configuration;
|
||||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Moderation;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
|
@ -9,7 +10,7 @@ namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Moderation;
|
|||
|
||||
public class CasePage : BaseLayout
|
||||
{
|
||||
public CasePage(Database database) : base(database)
|
||||
public CasePage(DatabaseContext database) : base(database)
|
||||
{}
|
||||
|
||||
public List<ModerationCase> Cases = new();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using LBPUnion.ProjectLighthouse.Configuration;
|
||||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Level;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Token;
|
||||
|
@ -9,7 +10,7 @@ namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Moderation;
|
|||
|
||||
public class HiddenLevelsPage : BaseLayout
|
||||
{
|
||||
public HiddenLevelsPage(Database database) : base(database)
|
||||
public HiddenLevelsPage(DatabaseContext database) : base(database)
|
||||
{}
|
||||
|
||||
public int PageAmount;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
@page "/moderation"
|
||||
@using System.Diagnostics
|
||||
@using LBPUnion.ProjectLighthouse.Administration
|
||||
@using LBPUnion.ProjectLighthouse.Extensions
|
||||
@using LBPUnion.ProjectLighthouse.Localization.StringLists
|
||||
@using LBPUnion.ProjectLighthouse.Servers.Website.Types
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||
using LBPUnion.ProjectLighthouse.Servers.Website.Types;
|
||||
|
@ -8,7 +9,7 @@ namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Moderation;
|
|||
|
||||
public class ModPanelPage : BaseLayout
|
||||
{
|
||||
public ModPanelPage(Database database) : base(database)
|
||||
public ModPanelPage(DatabaseContext database) : base(database)
|
||||
{}
|
||||
|
||||
public List<AdminPanelStatistic> Statistics = new();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Moderation;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
|
@ -8,7 +9,7 @@ namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Moderation;
|
|||
|
||||
public class NewCasePage : BaseLayout
|
||||
{
|
||||
public NewCasePage(Database database) : base(database)
|
||||
public NewCasePage(DatabaseContext database) : base(database)
|
||||
{}
|
||||
|
||||
public CaseType Type { get; set; }
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Text.Json;
|
||||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Moderation;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
|
@ -10,7 +11,7 @@ namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Moderation;
|
|||
|
||||
public class ReportPage : BaseLayout
|
||||
{
|
||||
public ReportPage(Database database) : base(database)
|
||||
public ReportPage(DatabaseContext database) : base(database)
|
||||
{}
|
||||
|
||||
public GriefReport Report = null!; // Report is not used if it's null in OnGet
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#nullable enable
|
||||
using System.Text.Json;
|
||||
using LBPUnion.ProjectLighthouse.Configuration;
|
||||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Moderation;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
|
@ -22,7 +23,7 @@ public class ReportsPage : BaseLayout
|
|||
|
||||
public string SearchValue = "";
|
||||
|
||||
public ReportsPage(Database database) : base(database)
|
||||
public ReportsPage(DatabaseContext database) : base(database)
|
||||
{}
|
||||
|
||||
public async Task<IActionResult> OnGet([FromRoute] int pageNumber, [FromQuery] string? name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue