diff --git a/extra/admin-api/ConfigTest/ConfigTest.csproj b/extra/admin-api/ConfigTest/ConfigTest.csproj
deleted file mode 100644
index 7eea9a8a..00000000
--- a/extra/admin-api/ConfigTest/ConfigTest.csproj
+++ /dev/null
@@ -1,20 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk.Worker">
-
- <PropertyGroup>
- <TargetFramework>net10.0</TargetFramework>
- <Nullable>enable</Nullable>
- <ImplicitUsings>enable</ImplicitUsings>
- <UserSecretsId>dotnet-ConfigTest-18d89c0e-df5d-447b-8429-7d526a35ab13</UserSecretsId>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.1" />
- <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.1" />
- <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\Spacebar.ConfigModel\Spacebar.ConfigModel.csproj" />
- <ProjectReference Include="..\Spacebar.Db\Spacebar.Db.csproj" />
- </ItemGroup>
-</Project>
diff --git a/extra/admin-api/Spacebar.AdminApi.Models/ApplicationModel.cs b/extra/admin-api/Models/Spacebar.Models.AdminApi/ApplicationModel.cs
index 7f83a686..54285795 100644
--- a/extra/admin-api/Spacebar.AdminApi.Models/ApplicationModel.cs
+++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/ApplicationModel.cs
@@ -1,4 +1,4 @@
-namespace Spacebar.AdminApi.Models;
+namespace Spacebar.Models.AdminApi;
public class ApplicationModel {
public string Id { get; set; } = null!;
diff --git a/extra/admin-api/Spacebar.AdminApi.Models/AsyncActionResult.cs b/extra/admin-api/Models/Spacebar.Models.AdminApi/AsyncActionResult.cs
index fe686be9..c306b954 100644
--- a/extra/admin-api/Spacebar.AdminApi.Models/AsyncActionResult.cs
+++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/AsyncActionResult.cs
@@ -1,6 +1,6 @@
using System.Text.Json.Serialization;
-namespace Spacebar.AdminApi.Models;
+namespace Spacebar.Models.AdminApi;
public class AsyncActionResult {
public AsyncActionResult() { }
diff --git a/extra/admin-api/Spacebar.AdminApi.Models/FileMetadataModel.cs b/extra/admin-api/Models/Spacebar.Models.AdminApi/FileMetadataModel.cs
index dfc577a9..56c5eaf5 100644
--- a/extra/admin-api/Spacebar.AdminApi.Models/FileMetadataModel.cs
+++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/FileMetadataModel.cs
@@ -1,6 +1,6 @@
using System.Text.Json.Serialization;
-namespace Spacebar.AdminApi.Models;
+namespace Spacebar.Models.AdminApi;
public class FileMetadataModel {
public string UserId { get; set; } = null!;
diff --git a/extra/admin-api/Spacebar.AdminApi.Models/ForceJoinRequest.cs b/extra/admin-api/Models/Spacebar.Models.AdminApi/ForceJoinRequest.cs
index 60bd6bce..495e5176 100644
--- a/extra/admin-api/Spacebar.AdminApi.Models/ForceJoinRequest.cs
+++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/ForceJoinRequest.cs
@@ -1,4 +1,4 @@
-namespace Spacebar.AdminApi.Models;
+namespace Spacebar.Models.AdminApi;
public class ForceJoinRequest {
public string? UserId { get; set; } = null!;
diff --git a/extra/admin-api/Spacebar.AdminApi.Models/GuildModel.cs b/extra/admin-api/Models/Spacebar.Models.AdminApi/GuildModel.cs
index aa67ac38..ae516f15 100644
--- a/extra/admin-api/Spacebar.AdminApi.Models/GuildModel.cs
+++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/GuildModel.cs
@@ -1,4 +1,4 @@
-namespace Spacebar.AdminApi.Models;
+namespace Spacebar.Models.AdminApi;
public class GuildModel {
public string Id { get; set; } = null!;
diff --git a/extra/admin-api/Spacebar.AdminApi.Models/Rights.cs b/extra/admin-api/Models/Spacebar.Models.AdminApi/Rights.cs
index ef82cb50..62785f5e 100644
--- a/extra/admin-api/Spacebar.AdminApi.Models/Rights.cs
+++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/Rights.cs
@@ -1,6 +1,6 @@
using System.Diagnostics.CodeAnalysis;
-namespace Spacebar.AdminApi.Models;
+namespace Spacebar.Models.AdminApi;
public static class SpacebarRights {
[Flags]
diff --git a/extra/admin-api/Spacebar.AdminApi.Models/Spacebar.AdminApi.Models.csproj b/extra/admin-api/Models/Spacebar.Models.AdminApi/Spacebar.Models.AdminApi.csproj
index d25bf93f..d25bf93f 100644
--- a/extra/admin-api/Spacebar.AdminApi.Models/Spacebar.AdminApi.Models.csproj
+++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/Spacebar.Models.AdminApi.csproj
diff --git a/extra/admin-api/Spacebar.AdminApi.Models/StickerModel.cs b/extra/admin-api/Models/Spacebar.Models.AdminApi/StickerModel.cs
index e0914eaa..0ad81b8f 100644
--- a/extra/admin-api/Spacebar.AdminApi.Models/StickerModel.cs
+++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/StickerModel.cs
@@ -1,4 +1,4 @@
-namespace Spacebar.AdminApi.Models;
+namespace Spacebar.Models.AdminApi;
public class StickerModel {
public string Id { get; set; } = null!;
diff --git a/extra/admin-api/Spacebar.AdminApi.Models/UserModel.cs b/extra/admin-api/Models/Spacebar.Models.AdminApi/UserModel.cs
index e1c0b9d2..dd1d4839 100644
--- a/extra/admin-api/Spacebar.AdminApi.Models/UserModel.cs
+++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/UserModel.cs
@@ -1,6 +1,6 @@
using System.Text.Json.Serialization;
-namespace Spacebar.AdminApi.Models;
+namespace Spacebar.Models.AdminApi;
public class UserModel {
public string Id { get; set; } = null!;
diff --git a/extra/admin-api/Spacebar.ConfigModel/Config.cs b/extra/admin-api/Models/Spacebar.Models.Config/Config.cs
index 26e9d0fc..26e9d0fc 100644
--- a/extra/admin-api/Spacebar.ConfigModel/Config.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Config/Config.cs
diff --git a/extra/admin-api/Spacebar.ConfigModel/DefaultsConfiguration.cs b/extra/admin-api/Models/Spacebar.Models.Config/DefaultsConfiguration.cs
index 3cac4cbe..3cac4cbe 100644
--- a/extra/admin-api/Spacebar.ConfigModel/DefaultsConfiguration.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Config/DefaultsConfiguration.cs
diff --git a/extra/admin-api/Spacebar.ConfigModel/Extensions/JsonExtensions.cs b/extra/admin-api/Models/Spacebar.Models.Config/Extensions/JsonExtensions.cs
index 20ae7331..20ae7331 100644
--- a/extra/admin-api/Spacebar.ConfigModel/Extensions/JsonExtensions.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Config/Extensions/JsonExtensions.cs
diff --git a/extra/admin-api/Spacebar.ConfigModel/GeneralConfiguration.cs b/extra/admin-api/Models/Spacebar.Models.Config/GeneralConfiguration.cs
index 1e006759..1e006759 100644
--- a/extra/admin-api/Spacebar.ConfigModel/GeneralConfiguration.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Config/GeneralConfiguration.cs
diff --git a/extra/admin-api/Spacebar.ConfigModel/LimitsConfiguration.cs b/extra/admin-api/Models/Spacebar.Models.Config/LimitsConfiguration.cs
index 56648bd3..56648bd3 100644
--- a/extra/admin-api/Spacebar.ConfigModel/LimitsConfiguration.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Config/LimitsConfiguration.cs
diff --git a/extra/admin-api/Spacebar.ConfigModel/SecurityConfiguration.cs b/extra/admin-api/Models/Spacebar.Models.Config/SecurityConfiguration.cs
index e1592c8d..e1592c8d 100644
--- a/extra/admin-api/Spacebar.ConfigModel/SecurityConfiguration.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Config/SecurityConfiguration.cs
diff --git a/extra/admin-api/Spacebar.ConfigModel/ServerConfiguration.cs b/extra/admin-api/Models/Spacebar.Models.Config/ServerConfiguration.cs
index 2ea107b8..2ea107b8 100644
--- a/extra/admin-api/Spacebar.ConfigModel/ServerConfiguration.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Config/ServerConfiguration.cs
diff --git a/extra/admin-api/Spacebar.ConfigModel/Spacebar.ConfigModel.csproj b/extra/admin-api/Models/Spacebar.Models.Config/Spacebar.Models.Config.csproj
index 237d6616..237d6616 100644
--- a/extra/admin-api/Spacebar.ConfigModel/Spacebar.ConfigModel.csproj
+++ b/extra/admin-api/Models/Spacebar.Models.Config/Spacebar.Models.Config.csproj
diff --git a/extra/admin-api/Spacebar.Db/Contexts/SpacebarDbContext.cs b/extra/admin-api/Models/Spacebar.Models.Db/Contexts/SpacebarDbContext.cs
index 8142b07b..716079d0 100644
--- a/extra/admin-api/Spacebar.Db/Contexts/SpacebarDbContext.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Contexts/SpacebarDbContext.cs
@@ -1,10 +1,10 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
-using Spacebar.Db.Models;
-using Stream = Spacebar.Db.Models.Stream;
+using Spacebar.Models.Db.Models;
+using Stream = Spacebar.Models.Db.Models.Stream;
-namespace Spacebar.Db.Contexts;
+namespace Spacebar.Models.Db.Contexts;
public partial class SpacebarDbContext : DbContext
{
diff --git a/extra/admin-api/Spacebar.Db/Models/Application.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Application.cs
index a5dda6f8..bb9661d0 100644
--- a/extra/admin-api/Spacebar.Db/Models/Application.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Application.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("applications")]
[Index("BotUserId", Name = "REL_2ce5a55796fe4c2f77ece57a64", IsUnique = true)]
diff --git a/extra/admin-api/Spacebar.Db/Models/ApplicationCommand.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/ApplicationCommand.cs
index 96c6d2ae..bad2fd9e 100644
--- a/extra/admin-api/Spacebar.Db/Models/ApplicationCommand.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/ApplicationCommand.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("application_commands")]
public partial class ApplicationCommand
diff --git a/extra/admin-api/Spacebar.Db/Models/Attachment.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Attachment.cs
index 832f56de..7cff9482 100644
--- a/extra/admin-api/Spacebar.Db/Models/Attachment.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Attachment.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("attachments")]
public partial class Attachment
diff --git a/extra/admin-api/Spacebar.Db/Models/AuditLog.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/AuditLog.cs
index 892a4a17..68bcf589 100644
--- a/extra/admin-api/Spacebar.Db/Models/AuditLog.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/AuditLog.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("audit_logs")]
public partial class AuditLog
diff --git a/extra/admin-api/Spacebar.Db/Models/AutomodRule.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/AutomodRule.cs
index 7d106a7f..e0da822b 100644
--- a/extra/admin-api/Spacebar.Db/Models/AutomodRule.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/AutomodRule.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("automod_rules")]
public partial class AutomodRule
diff --git a/extra/admin-api/Spacebar.Db/Models/BackupCode.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/BackupCode.cs
index b73a7233..57933360 100644
--- a/extra/admin-api/Spacebar.Db/Models/BackupCode.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/BackupCode.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("backup_codes")]
public partial class BackupCode
diff --git a/extra/admin-api/Spacebar.Db/Models/Badge.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Badge.cs
index bdcfaf0d..e92ddd45 100644
--- a/extra/admin-api/Spacebar.Db/Models/Badge.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Badge.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("badges")]
public partial class Badge
diff --git a/extra/admin-api/Spacebar.Db/Models/Ban.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Ban.cs
index bea49842..634dad13 100644
--- a/extra/admin-api/Spacebar.Db/Models/Ban.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Ban.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("bans")]
public partial class Ban
diff --git a/extra/admin-api/Spacebar.Db/Models/Category.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Category.cs
index 2e800a18..accd6c20 100644
--- a/extra/admin-api/Spacebar.Db/Models/Category.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Category.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("categories")]
public partial class Category
diff --git a/extra/admin-api/Spacebar.Db/Models/Channel.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Channel.cs
index c321c88f..057a9a32 100644
--- a/extra/admin-api/Spacebar.Db/Models/Channel.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Channel.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("channels")]
public partial class Channel
diff --git a/extra/admin-api/Spacebar.Db/Models/ClientRelease.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/ClientRelease.cs
index cec74d3e..ad4befb9 100644
--- a/extra/admin-api/Spacebar.Db/Models/ClientRelease.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/ClientRelease.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("client_release")]
public partial class ClientRelease
diff --git a/extra/admin-api/Spacebar.Db/Models/CloudAttachment.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/CloudAttachment.cs
index e7f05e94..3b780604 100644
--- a/extra/admin-api/Spacebar.Db/Models/CloudAttachment.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/CloudAttachment.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("cloud_attachments")]
public partial class CloudAttachment
diff --git a/extra/admin-api/Spacebar.Db/Models/Config.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Config.cs
index 1b7c50ef..31016c6a 100644
--- a/extra/admin-api/Spacebar.Db/Models/Config.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Config.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("config")]
public partial class Config
diff --git a/extra/admin-api/Spacebar.Db/Models/ConnectedAccount.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/ConnectedAccount.cs
index 30b6033c..977797b7 100644
--- a/extra/admin-api/Spacebar.Db/Models/ConnectedAccount.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/ConnectedAccount.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("connected_accounts")]
public partial class ConnectedAccount
diff --git a/extra/admin-api/Spacebar.Db/Models/ConnectionConfig.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/ConnectionConfig.cs
index 414af3b9..0bbd0dd9 100644
--- a/extra/admin-api/Spacebar.Db/Models/ConnectionConfig.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/ConnectionConfig.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("connection_config")]
public partial class ConnectionConfig
diff --git a/extra/admin-api/Spacebar.Db/Models/EmbedCache.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/EmbedCache.cs
index 1a6e35a0..3ae84bc1 100644
--- a/extra/admin-api/Spacebar.Db/Models/EmbedCache.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/EmbedCache.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("embed_cache")]
public partial class EmbedCache
diff --git a/extra/admin-api/Spacebar.Db/Models/Emoji.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Emoji.cs
index 12af34c8..faa52249 100644
--- a/extra/admin-api/Spacebar.Db/Models/Emoji.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Emoji.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("emojis")]
public partial class Emoji
diff --git a/extra/admin-api/Spacebar.Db/Models/Guild.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Guild.cs
index 0cc80b05..f4729ae1 100644
--- a/extra/admin-api/Spacebar.Db/Models/Guild.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Guild.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("guilds")]
public partial class Guild
diff --git a/extra/admin-api/Spacebar.Db/Models/InstanceBan.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/InstanceBan.cs
index 92d510fb..48ff0e77 100644
--- a/extra/admin-api/Spacebar.Db/Models/InstanceBan.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/InstanceBan.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("instance_bans")]
[Index("OriginInstanceBanId", Name = "REL_0b02d18d0d830f160c921192a3", IsUnique = true)]
diff --git a/extra/admin-api/Spacebar.Db/Models/Invite.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Invite.cs
index 449bb5b4..b53a397c 100644
--- a/extra/admin-api/Spacebar.Db/Models/Invite.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Invite.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("invites")]
public partial class Invite
diff --git a/extra/admin-api/Spacebar.Db/Models/Member.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Member.cs
index df63dfa4..dfa24f31 100644
--- a/extra/admin-api/Spacebar.Db/Models/Member.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Member.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("members")]
[Index("Id", "GuildId", Name = "IDX_bb2bf9386ac443afbbbf9f12d3", IsUnique = true)]
diff --git a/extra/admin-api/Spacebar.Db/Models/Message.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Message.cs
index b9260a4d..ca0abd78 100644
--- a/extra/admin-api/Spacebar.Db/Models/Message.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Message.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("messages")]
[Index("AuthorId", Name = "IDX_05535bc695e9f7ee104616459d")]
diff --git a/extra/admin-api/Spacebar.Db/Models/Migration.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Migration.cs
index 7bf1194f..d5748e51 100644
--- a/extra/admin-api/Spacebar.Db/Models/Migration.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Migration.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("migrations")]
public partial class Migration
diff --git a/extra/admin-api/Spacebar.Db/Models/Note.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Note.cs
index 55bfb9d2..38b230f9 100644
--- a/extra/admin-api/Spacebar.Db/Models/Note.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Note.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("notes")]
[Index("OwnerId", "TargetId", Name = "UQ_74e6689b9568cc965b8bfc9150b", IsUnique = true)]
diff --git a/extra/admin-api/Spacebar.Db/Models/RateLimit.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/RateLimit.cs
index 3414c2bc..9748832d 100644
--- a/extra/admin-api/Spacebar.Db/Models/RateLimit.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/RateLimit.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("rate_limits")]
public partial class RateLimit
diff --git a/extra/admin-api/Spacebar.Db/Models/ReadState.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/ReadState.cs
index 04bbae2b..43bc0ac7 100644
--- a/extra/admin-api/Spacebar.Db/Models/ReadState.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/ReadState.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("read_states")]
[Index("ChannelId", "UserId", Name = "IDX_0abf8b443321bd3cf7f81ee17a", IsUnique = true)]
diff --git a/extra/admin-api/Spacebar.Db/Models/Recipient.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Recipient.cs
index d89c47d7..50fa20ca 100644
--- a/extra/admin-api/Spacebar.Db/Models/Recipient.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Recipient.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("recipients")]
public partial class Recipient
diff --git a/extra/admin-api/Spacebar.Db/Models/Relationship.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Relationship.cs
index 99a43ad7..799c9ae6 100644
--- a/extra/admin-api/Spacebar.Db/Models/Relationship.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Relationship.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("relationships")]
[Index("FromId", "ToId", Name = "IDX_a0b2ff0a598df0b0d055934a17", IsUnique = true)]
diff --git a/extra/admin-api/Spacebar.Db/Models/Role.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Role.cs
index 9a6391d4..a57875c0 100644
--- a/extra/admin-api/Spacebar.Db/Models/Role.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Role.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("roles")]
public partial class Role
diff --git a/extra/admin-api/Spacebar.Db/Models/SecurityKey.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/SecurityKey.cs
index d96c98cd..a7a962e3 100644
--- a/extra/admin-api/Spacebar.Db/Models/SecurityKey.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/SecurityKey.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("security_keys")]
public partial class SecurityKey
diff --git a/extra/admin-api/Spacebar.Db/Models/SecuritySetting.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/SecuritySetting.cs
index 4df21e4d..cb52206a 100644
--- a/extra/admin-api/Spacebar.Db/Models/SecuritySetting.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/SecuritySetting.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("security_settings")]
public partial class SecuritySetting
diff --git a/extra/admin-api/Spacebar.Db/Models/Session.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Session.cs
index 0a342ad8..31c559d9 100644
--- a/extra/admin-api/Spacebar.Db/Models/Session.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Session.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("sessions")]
[Index("UserId", Name = "IDX_085d540d9f418cfbdc7bd55bb1")]
diff --git a/extra/admin-api/Spacebar.Db/Models/Sticker.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Sticker.cs
index 9d3571a0..048d3a01 100644
--- a/extra/admin-api/Spacebar.Db/Models/Sticker.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Sticker.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("stickers")]
public partial class Sticker
diff --git a/extra/admin-api/Spacebar.Db/Models/StickerPack.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/StickerPack.cs
index 6ed142ba..96369f8a 100644
--- a/extra/admin-api/Spacebar.Db/Models/StickerPack.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/StickerPack.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("sticker_packs")]
public partial class StickerPack
diff --git a/extra/admin-api/Spacebar.Db/Models/Stream.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Stream.cs
index 45dcae65..db1b2cb8 100644
--- a/extra/admin-api/Spacebar.Db/Models/Stream.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Stream.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("streams")]
public partial class Stream
diff --git a/extra/admin-api/Spacebar.Db/Models/StreamSession.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/StreamSession.cs
index a0e5a20d..cbc64dc6 100644
--- a/extra/admin-api/Spacebar.Db/Models/StreamSession.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/StreamSession.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("stream_sessions")]
public partial class StreamSession
diff --git a/extra/admin-api/Spacebar.Db/Models/Team.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Team.cs
index 9c1f20dd..3443ad3b 100644
--- a/extra/admin-api/Spacebar.Db/Models/Team.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Team.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("teams")]
public partial class Team
diff --git a/extra/admin-api/Spacebar.Db/Models/TeamMember.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/TeamMember.cs
index 0d5c453c..106ddee9 100644
--- a/extra/admin-api/Spacebar.Db/Models/TeamMember.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/TeamMember.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("team_members")]
public partial class TeamMember
diff --git a/extra/admin-api/Spacebar.Db/Models/Template.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Template.cs
index 0eb0675f..4c65ed93 100644
--- a/extra/admin-api/Spacebar.Db/Models/Template.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Template.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("templates")]
[Index("Code", Name = "UQ_be38737bf339baf63b1daeffb55", IsUnique = true)]
diff --git a/extra/admin-api/Spacebar.Db/Models/User.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/User.cs
index f8211ec1..242402b2 100644
--- a/extra/admin-api/Spacebar.Db/Models/User.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/User.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("users")]
[Index("SettingsIndex", Name = "REL_0c14beb78d8c5ccba66072adbc", IsUnique = true)]
diff --git a/extra/admin-api/Spacebar.Db/Models/UserSetting.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/UserSetting.cs
index 5bd3354f..a8d6d91c 100644
--- a/extra/admin-api/Spacebar.Db/Models/UserSetting.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/UserSetting.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("user_settings")]
public partial class UserSetting
diff --git a/extra/admin-api/Spacebar.Db/Models/UserSettingsProto.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/UserSettingsProto.cs
index e6f2cfae..1e458592 100644
--- a/extra/admin-api/Spacebar.Db/Models/UserSettingsProto.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/UserSettingsProto.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("user_settings_protos")]
public partial class UserSettingsProto
diff --git a/extra/admin-api/Spacebar.Db/Models/ValidRegistrationToken.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/ValidRegistrationToken.cs
index 48edfb75..32c2b30a 100644
--- a/extra/admin-api/Spacebar.Db/Models/ValidRegistrationToken.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/ValidRegistrationToken.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("valid_registration_tokens")]
public partial class ValidRegistrationToken
diff --git a/extra/admin-api/Spacebar.Db/Models/VoiceState.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/VoiceState.cs
index 0082ea9d..f1d8504d 100644
--- a/extra/admin-api/Spacebar.Db/Models/VoiceState.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/VoiceState.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("voice_states")]
public partial class VoiceState
diff --git a/extra/admin-api/Spacebar.Db/Models/Webhook.cs b/extra/admin-api/Models/Spacebar.Models.Db/Models/Webhook.cs
index 96fa9d93..122db3aa 100644
--- a/extra/admin-api/Spacebar.Db/Models/Webhook.cs
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Models/Webhook.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-namespace Spacebar.Db.Models;
+namespace Spacebar.Models.Db.Models;
[Table("webhooks")]
public partial class Webhook
diff --git a/extra/admin-api/Spacebar.Db/Spacebar.Db.csproj b/extra/admin-api/Models/Spacebar.Models.Db/Spacebar.Models.Db.csproj
index 2d1dcaf5..2d1dcaf5 100644
--- a/extra/admin-api/Spacebar.Db/Spacebar.Db.csproj
+++ b/extra/admin-api/Models/Spacebar.Models.Db/Spacebar.Models.Db.csproj
diff --git a/extra/admin-api/Spacebar.Db/deps.json b/extra/admin-api/Models/Spacebar.Models.Db/deps.json
index c978dd1b..c978dd1b 100644
--- a/extra/admin-api/Spacebar.Db/deps.json
+++ b/extra/admin-api/Models/Spacebar.Models.Db/deps.json
diff --git a/extra/admin-api/db-patches/00-use-stream-class.patch b/extra/admin-api/Models/db-patches/00-use-stream-class.patch
index 1636f120..1636f120 100644
--- a/extra/admin-api/db-patches/00-use-stream-class.patch
+++ b/extra/admin-api/Models/db-patches/00-use-stream-class.patch
diff --git a/extra/admin-api/db-patches/01-ulong-user-rights.patch b/extra/admin-api/Models/db-patches/01-ulong-user-rights.patch
index 362b67d7..362b67d7 100644
--- a/extra/admin-api/db-patches/01-ulong-user-rights.patch
+++ b/extra/admin-api/Models/db-patches/01-ulong-user-rights.patch
diff --git a/extra/admin-api/Spacebar.AdminApi/Controllers/ConfigController.cs b/extra/admin-api/Spacebar.AdminApi/Controllers/ConfigController.cs
index 96465616..9976e0fe 100644
--- a/extra/admin-api/Spacebar.AdminApi/Controllers/ConfigController.cs
+++ b/extra/admin-api/Spacebar.AdminApi/Controllers/ConfigController.cs
@@ -2,10 +2,10 @@ using System.Text.Json.Nodes;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Spacebar.AdminApi.Extensions;
-using Spacebar.AdminApi.Models;
+using Spacebar.Models.AdminApi;
using Spacebar.AdminApi.Services;
-using Spacebar.Db.Contexts;
-using Spacebar.Db.Models;
+using Spacebar.Models.Db.Contexts;
+using Spacebar.Models.Db.Models;
using Spacebar.RabbitMqUtilities;
using Spacebar.ConfigModel.Extensions;
diff --git a/extra/admin-api/Spacebar.AdminApi/Controllers/GuildController.cs b/extra/admin-api/Spacebar.AdminApi/Controllers/GuildController.cs
index 05bd604a..a7a623f2 100644
--- a/extra/admin-api/Spacebar.AdminApi/Controllers/GuildController.cs
+++ b/extra/admin-api/Spacebar.AdminApi/Controllers/GuildController.cs
@@ -3,10 +3,10 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using RabbitMQ.Client;
using Spacebar.AdminApi.Extensions;
-using Spacebar.AdminApi.Models;
+using Spacebar.Models.AdminApi;
using Spacebar.AdminApi.Services;
-using Spacebar.Db.Contexts;
-using Spacebar.Db.Models;
+using Spacebar.Models.Db.Contexts;
+using Spacebar.Models.Db.Models;
using Spacebar.RabbitMqUtilities;
namespace Spacebar.AdminApi.Controllers;
diff --git a/extra/admin-api/Spacebar.AdminApi/Controllers/Media/StickerController.cs b/extra/admin-api/Spacebar.AdminApi/Controllers/Media/StickerController.cs
index 25070052..1e2ec3cb 100644
--- a/extra/admin-api/Spacebar.AdminApi/Controllers/Media/StickerController.cs
+++ b/extra/admin-api/Spacebar.AdminApi/Controllers/Media/StickerController.cs
@@ -1,10 +1,10 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Spacebar.AdminApi.Extensions;
-using Spacebar.AdminApi.Models;
+using Spacebar.Models.AdminApi;
using Spacebar.AdminApi.Services;
-using Spacebar.Db.Contexts;
-using Spacebar.Db.Models;
+using Spacebar.Models.Db.Contexts;
+using Spacebar.Models.Db.Models;
using Spacebar.RabbitMqUtilities;
namespace Spacebar.AdminApi.Controllers.Media;
diff --git a/extra/admin-api/Spacebar.AdminApi/Controllers/Media/UserMediaController.cs b/extra/admin-api/Spacebar.AdminApi/Controllers/Media/UserMediaController.cs
index f3415731..052776dc 100644
--- a/extra/admin-api/Spacebar.AdminApi/Controllers/Media/UserMediaController.cs
+++ b/extra/admin-api/Spacebar.AdminApi/Controllers/Media/UserMediaController.cs
@@ -1,10 +1,10 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Spacebar.AdminApi.Extensions;
-using Spacebar.AdminApi.Models;
+using Spacebar.Models.AdminApi;
using Spacebar.AdminApi.Services;
-using Spacebar.Db.Contexts;
-using Spacebar.Db.Models;
+using Spacebar.Models.Db.Contexts;
+using Spacebar.Models.Db.Models;
using Spacebar.RabbitMqUtilities;
namespace Spacebar.AdminApi.Controllers.Media;
diff --git a/extra/admin-api/Spacebar.AdminApi/Controllers/UserController.cs b/extra/admin-api/Spacebar.AdminApi/Controllers/UserController.cs
index 505f789e..331b3cdc 100644
--- a/extra/admin-api/Spacebar.AdminApi/Controllers/UserController.cs
+++ b/extra/admin-api/Spacebar.AdminApi/Controllers/UserController.cs
@@ -5,62 +5,76 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using RabbitMQ.Client;
using Spacebar.AdminApi.Extensions;
-using Spacebar.AdminApi.Models;
+using Spacebar.Models.AdminApi;
using Spacebar.AdminApi.Services;
-using Spacebar.Db.Contexts;
-using Spacebar.Db.Models;
+using Spacebar.Models.Db.Contexts;
+using Spacebar.Models.Db.Models;
using Spacebar.RabbitMqUtilities;
namespace Spacebar.AdminApi.Controllers;
[ApiController]
[Route("/users")]
-public class UserController(ILogger<UserController> logger, Configuration config, RabbitMQConfiguration amqpConfig, SpacebarDbContext db, RabbitMQService mq, IServiceProvider sp, AuthenticationService auth) : ControllerBase {
+public class UserController(
+ ILogger<UserController> logger,
+ Configuration config,
+ RabbitMQConfiguration amqpConfig,
+ SpacebarDbContext db,
+ RabbitMQService mq,
+ IServiceProvider sp,
+ AuthenticationService auth) : ControllerBase {
private readonly ILogger<UserController> _logger = logger;
[HttpGet]
public async IAsyncEnumerable<UserModel> Get() {
(await auth.GetCurrentUser(Request)).GetRights().AssertHasAllRights(SpacebarRights.Rights.OPERATOR);
-
- var results = db.Users.Select(x => new UserModel {
- Id = x.Id,
- Username = x.Username,
- Discriminator = x.Discriminator,
- Avatar = x.Avatar,
- AccentColor = x.AccentColor,
- Banner = x.Banner,
- ThemeColors = x.ThemeColors,
- Pronouns = x.Pronouns,
- Phone = x.Phone,
- Desktop = x.Desktop,
- Mobile = x.Mobile,
- Premium = x.Premium,
- PremiumType = x.PremiumType,
- Bot = x.Bot,
- Bio = x.Bio,
- System = x.System,
- NsfwAllowed = x.NsfwAllowed,
- MfaEnabled = x.MfaEnabled,
- WebauthnEnabled = x.WebauthnEnabled,
- CreatedAt = x.CreatedAt,
- PremiumSince = x.PremiumSince,
- Verified = x.Verified,
- Disabled = x.Disabled,
- Deleted = x.Deleted,
- Email = x.Email,
- Flags = x.Flags,
- PublicFlags = x.PublicFlags,
- Rights = x.Rights,
- ApplicationBotUser = x.ApplicationBotUser == null ? null : new(),
- ConnectedAccounts = new List<UserModel.ConnectedAccountModel>(),
- MessageCount = x.MessageAuthors.Count, // This property is weirdly named due to scaffolding, might patch later
- SessionCount = x.Sessions.Count,
- TemplateCount = x.Templates.Count,
- VoiceStateCount = x.VoiceStates.Count,
- GuildCount = x.Guilds.Count,
- OwnedGuildCount = x.Guilds.Count(g => g.OwnerId == x.Id)
- }).AsAsyncEnumerable();
-
+
+ var results = db.Users
+ .Include(user => user.ApplicationBotUser)
+ .Include(user => user.MessageAuthors)
+ .Include(user => user.Sessions)
+ .Include(user => user.Templates)
+ .Include(user => user.VoiceStates)
+ .Include(user => user.Guilds)
+ .AsAsyncEnumerable().Select(x => new UserModel {
+ Id = x.Id,
+ Username = x.Username,
+ Discriminator = x.Discriminator,
+ Avatar = x.Avatar,
+ AccentColor = x.AccentColor,
+ Banner = x.Banner,
+ ThemeColors = x.ThemeColors,
+ Pronouns = x.Pronouns,
+ Phone = x.Phone,
+ Desktop = x.Desktop,
+ Mobile = x.Mobile,
+ Premium = x.Premium,
+ PremiumType = x.PremiumType,
+ Bot = x.Bot,
+ Bio = x.Bio,
+ System = x.System,
+ NsfwAllowed = x.NsfwAllowed,
+ MfaEnabled = x.MfaEnabled,
+ WebauthnEnabled = x.WebauthnEnabled,
+ CreatedAt = x.CreatedAt,
+ PremiumSince = x.PremiumSince,
+ Verified = x.Verified,
+ Disabled = x.Disabled,
+ Deleted = x.Deleted,
+ Email = x.Email,
+ Flags = x.Flags,
+ PublicFlags = x.PublicFlags,
+ Rights = x.Rights,
+ ApplicationBotUser = x.ApplicationBotUser == null ? null : new(),
+ ConnectedAccounts = new List<UserModel.ConnectedAccountModel>(),
+ MessageCount = x.MessageAuthors.Count, // This property is weirdly named due to scaffolding, might patch later
+ SessionCount = x.Sessions.Count,
+ TemplateCount = x.Templates.Count,
+ VoiceStateCount = x.VoiceStates.Count,
+ GuildCount = x.Guilds.Count,
+ OwnedGuildCount = x.Guilds.Count(g => g.OwnerId == x.Id)
+ });
+
await foreach (var user in results) {
yield return user;
}
@@ -150,7 +164,7 @@ public class UserController(ILogger<UserController> logger, Configuration config
[HttpGet("{id}/delete")]
public async IAsyncEnumerable<AsyncActionResult> DeleteUser(string id, [FromQuery] int messageDeleteChunkSize = 100) {
(await auth.GetCurrentUser(Request)).GetRights().AssertHasAllRights(SpacebarRights.Rights.OPERATOR);
-
+
var user = await db.Users.FindAsync(id);
if (user == null) {
Console.WriteLine($"User {id} not found");
@@ -259,7 +273,7 @@ public class UserController(ILogger<UserController> logger, Configuration config
[HttpGet("duplicate")]
public async Task<IActionResult> Duplicate() {
(await auth.GetCurrentUser(Request)).GetRights().AssertHasAllRights(SpacebarRights.Rights.OPERATOR);
-
+
var msg = db.Messages.First();
var channels = db.Channels.Select(x => new { x.Id, x.GuildId }).ToList();
int count = 1;
@@ -304,7 +318,7 @@ public class UserController(ILogger<UserController> logger, Configuration config
[HttpGet("duplicate/{id}")]
public async Task<IActionResult> DuplicateMessage(ulong id, [FromQuery] int count = 100) {
(await auth.GetCurrentUser(Request)).GetRights().AssertHasAllRights(SpacebarRights.Rights.OPERATOR);
-
+
var msg = await db.Messages.FindAsync(id.ToString());
int createdCount = 1;
while (true) {
@@ -350,7 +364,7 @@ public class UserController(ILogger<UserController> logger, Configuration config
[HttpGet("truncate_messages")]
public async Task TruncateMessages() {
(await auth.GetCurrentUser(Request)).GetRights().AssertHasAllRights(SpacebarRights.Rights.OPERATOR);
-
+
var channels = db.Channels.Select(x => new { x.Id, x.GuildId }).ToList();
var ss = new SemaphoreSlim(12, 12);
@@ -363,11 +377,11 @@ public class UserController(ILogger<UserController> logger, Configuration config
// set timeout
_db.Database.SetCommandTimeout(6000);
await _db.Database.ExecuteSqlAsync($"""
- DELETE FROM messages
- WHERE channel_id = '{channelId}'
- AND guild_id = '{guildId}'
- AND id LIKE '%{i:00}';
- """);
+ DELETE FROM messages
+ WHERE channel_id = '{channelId}'
+ AND guild_id = '{guildId}'
+ AND id LIKE '%{i:00}';
+ """);
Console.WriteLine($"Truncated messages for {channelId} in {guildId} ending with {i}");
})).ToList();
@@ -381,7 +395,7 @@ public class UserController(ILogger<UserController> logger, Configuration config
private async IAsyncEnumerable<T> AggregateAsyncEnumerablesWithoutOrder<T>(params IEnumerable<IAsyncEnumerable<T>> enumerables) {
(await auth.GetCurrentUser(Request)).GetRights().AssertHasAllRights(SpacebarRights.Rights.OPERATOR);
-
+
var enumerators = enumerables.Select(e => e.GetAsyncEnumerator()).ToList();
var tasks = enumerators.Select(e => e.MoveNextAsync().AsTask()).ToList();
@@ -434,31 +448,31 @@ public class UserController(ILogger<UserController> logger, Configuration config
}
// {
- // "op": 0,
- // "t": "GUILD_ROLE_UPDATE",
- // "d": {
- // "guild_id": "1006649183970562092",
- // "role": {
- // "id": "1006706520514028812",
- // "guild_id": "1006649183970562092",
- // "color": 16711680,
- // "hoist": true,
- // "managed": false,
- // "mentionable": true,
- // "name": "Adminstrator",
- // "permissions": "9",
- // "position": 5,
- // "unicode_emoji": "💖",
- // "flags": 0
- // }
- // },
- // "s": 38
+ // "op": 0,
+ // "t": "GUILD_ROLE_UPDATE",
+ // "d": {
+ // "guild_id": "1006649183970562092",
+ // "role": {
+ // "id": "1006706520514028812",
+ // "guild_id": "1006649183970562092",
+ // "color": 16711680,
+ // "hoist": true,
+ // "managed": false,
+ // "mentionable": true,
+ // "name": "Adminstrator",
+ // "permissions": "9",
+ // "position": 5,
+ // "unicode_emoji": "💖",
+ // "flags": 0
+ // }
+ // },
+ // "s": 38
// }
[HttpGet("test")]
public async IAsyncEnumerable<string> Test() {
(await auth.GetCurrentUser(Request)).GetRights().AssertHasAllRights(SpacebarRights.Rights.OPERATOR);
-
+
var factory = new ConnectionFactory {
Uri = new Uri(amqpConfig.ToConnectionString())
};
@@ -511,9 +525,10 @@ public class UserController(ILogger<UserController> logger, Configuration config
await Task.Delay(10);
}
} while (!publishSuccess);
+
yield return $"{clr.r:X2} {clr.g:X2} {clr.b:X2} | {color:X8} | {sw.Elapsed} (waiting {Math.Max(0, (int)delay - (int)sw.ElapsedMilliseconds)} out of {delay} ms)";
await Task.Delay(Math.Max(0, (int)delay - (int)sw.ElapsedMilliseconds));
sw.Restart();
}
}
-}
+}
\ No newline at end of file
diff --git a/extra/admin-api/Spacebar.AdminApi/Extensions/DbExtensions.cs b/extra/admin-api/Spacebar.AdminApi/Extensions/DbExtensions.cs
index 1220de91..d3344542 100644
--- a/extra/admin-api/Spacebar.AdminApi/Extensions/DbExtensions.cs
+++ b/extra/admin-api/Spacebar.AdminApi/Extensions/DbExtensions.cs
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
-using Spacebar.AdminApi.Models;
-using Spacebar.Db.Models;
+using Spacebar.Models.AdminApi;
+using Spacebar.Models.Db.Models;
namespace Spacebar.AdminApi.Extensions;
diff --git a/extra/admin-api/Spacebar.AdminApi/Middleware/AuthenticationMiddleware.cs b/extra/admin-api/Spacebar.AdminApi/Middleware/AuthenticationMiddleware.cs
index a5144add..c3f9a004 100644
--- a/extra/admin-api/Spacebar.AdminApi/Middleware/AuthenticationMiddleware.cs
+++ b/extra/admin-api/Spacebar.AdminApi/Middleware/AuthenticationMiddleware.cs
@@ -2,8 +2,8 @@ using System.IdentityModel.Tokens.Jwt;
using System.Security.Cryptography;
using Microsoft.IdentityModel.Tokens;
using Spacebar.AdminApi.Services;
-using Spacebar.Db.Contexts;
-using Spacebar.Db.Models;
+using Spacebar.Models.Db.Contexts;
+using Spacebar.Models.Db.Models;
namespace Spacebar.AdminApi.Middleware;
diff --git a/extra/admin-api/Spacebar.AdminApi/Program.cs b/extra/admin-api/Spacebar.AdminApi/Program.cs
index f3e977cb..c1c77f58 100644
--- a/extra/admin-api/Spacebar.AdminApi/Program.cs
+++ b/extra/admin-api/Spacebar.AdminApi/Program.cs
@@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Http.Timeouts;
using Microsoft.EntityFrameworkCore;
using Spacebar.AdminApi.Middleware;
using Spacebar.AdminApi.Services;
-using Spacebar.Db.Contexts;
+using Spacebar.Models.Db.Contexts;
using Spacebar.RabbitMqUtilities;
var builder = WebApplication.CreateBuilder(args);
diff --git a/extra/admin-api/Spacebar.AdminApi/Services/AuthenticationService.cs b/extra/admin-api/Spacebar.AdminApi/Services/AuthenticationService.cs
index 788c8eb9..4410bd79 100644
--- a/extra/admin-api/Spacebar.AdminApi/Services/AuthenticationService.cs
+++ b/extra/admin-api/Spacebar.AdminApi/Services/AuthenticationService.cs
@@ -1,8 +1,8 @@
using System.IdentityModel.Tokens.Jwt;
using System.Security.Cryptography;
using Microsoft.IdentityModel.Tokens;
-using Spacebar.Db.Contexts;
-using Spacebar.Db.Models;
+using Spacebar.Models.Db.Contexts;
+using Spacebar.Models.Db.Models;
namespace Spacebar.AdminApi.Services;
diff --git a/extra/admin-api/Spacebar.AdminApi/Spacebar.AdminApi.csproj b/extra/admin-api/Spacebar.AdminApi/Spacebar.AdminApi.csproj
index 4e0ba21a..fcb21fe5 100644
--- a/extra/admin-api/Spacebar.AdminApi/Spacebar.AdminApi.csproj
+++ b/extra/admin-api/Spacebar.AdminApi/Spacebar.AdminApi.csproj
@@ -15,9 +15,9 @@
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Spacebar.AdminApi.Models\Spacebar.AdminApi.Models.csproj" />
- <ProjectReference Include="..\Spacebar.ConfigModel\Spacebar.ConfigModel.csproj" />
- <ProjectReference Include="..\Spacebar.Db\Spacebar.Db.csproj" />
+ <ProjectReference Include="..\Models\Spacebar.Models.AdminApi\Spacebar.Models.AdminApi.csproj" />
+ <ProjectReference Include="..\Models\Spacebar.Models.Config\Spacebar.Models.Config.csproj" />
+ <ProjectReference Include="..\Models\Spacebar.Models.Db\Spacebar.Models.Db.csproj" />
<ProjectReference Include="..\Utilities\Spacebar.RabbitMqUtilities\Spacebar.RabbitMqUtilities.csproj" />
</ItemGroup>
diff --git a/extra/admin-api/Spacebar.Cdn/Controllers/GetImageController.cs b/extra/admin-api/Spacebar.Cdn/Controllers/GetImageController.cs
index 1de9f632..13b5da68 100644
--- a/extra/admin-api/Spacebar.Cdn/Controllers/GetImageController.cs
+++ b/extra/admin-api/Spacebar.Cdn/Controllers/GetImageController.cs
@@ -1,10 +1,5 @@
-using System.Configuration;
-using System.Net.Http.Headers;
using ArcaneLibs.Extensions.Streams;
-using ImageMagick;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.Build.Globbing;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.Internal;
using Spacebar.AdminApi.TestClient.Services.Services;
namespace Spacebar.AdminApi.TestClient.Services.Controllers;
diff --git a/extra/admin-api/Spacebar.Cdn/Controllers/Internal/GetImageController.cs b/extra/admin-api/Spacebar.Cdn/Controllers/Internal/GetImageController.cs
index 7d4ef087..4063e79c 100644
--- a/extra/admin-api/Spacebar.Cdn/Controllers/Internal/GetImageController.cs
+++ b/extra/admin-api/Spacebar.Cdn/Controllers/Internal/GetImageController.cs
@@ -1,9 +1,5 @@
-using System.Configuration;
-using System.Net.Http.Headers;
-using ArcaneLibs.Extensions.Streams;
using ImageMagick;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.Build.Globbing;
using Spacebar.AdminApi.TestClient.Services.Services;
namespace Spacebar.AdminApi.TestClient.Services.Controllers;
diff --git a/extra/admin-api/Spacebar.Cdn/Spacebar.Cdn.csproj b/extra/admin-api/Spacebar.Cdn/Spacebar.Cdn.csproj
index 3591a69a..cd53bbbf 100644
--- a/extra/admin-api/Spacebar.Cdn/Spacebar.Cdn.csproj
+++ b/extra/admin-api/Spacebar.Cdn/Spacebar.Cdn.csproj
@@ -14,7 +14,7 @@
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Spacebar.Db\Spacebar.Db.csproj" />
+ <ProjectReference Include="..\Models\Spacebar.Models.Db\Spacebar.Models.Db.csproj" />
</ItemGroup>
</Project>
diff --git a/extra/admin-api/SpacebarAdminAPI.sln b/extra/admin-api/SpacebarAdminAPI.sln
index 427084ad..1edb84d8 100644
--- a/extra/admin-api/SpacebarAdminAPI.sln
+++ b/extra/admin-api/SpacebarAdminAPI.sln
@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.Db", "Spacebar.Db\Spacebar.Db.csproj", "{524849DF-93BC-4632-B6C2-D05552C13887}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminApi", "Spacebar.AdminApi\Spacebar.AdminApi.csproj", "{00E58C53-0AC1-4113-8CCF-D299861EA8D3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utilities", "Utilities", "{04787943-EBB6-4DE4-96D5-4CFB4A2CEE99}"
@@ -15,76 +13,192 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminApiTest", "Ut
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminApi.TestClient", "Utilities\Spacebar.AdminApi.TestClient\Spacebar.AdminApi.TestClient.csproj", "{498DAD05-336E-4851-ABD8-4E7CCA8312B0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminApi.Models", "Spacebar.AdminApi.Models\Spacebar.AdminApi.Models.csproj", "{5F138C70-EAFA-4C7C-8B90-EFB9624B235C}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.AdminApi.PrepareTestData", "Utilities\Spacebar.AdminApi.PrepareTestData\Spacebar.AdminApi.PrepareTestData.csproj", "{BCC6501C-16A7-4787-BA47-52DAE06718A8}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.CleanSettingsRows", "Spacebar.CleanSettingsRows\Spacebar.CleanSettingsRows.csproj", "{9B41FAC1-4427-487C-BF3F-69554848DEBF}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.Cdn", "Spacebar.Cdn\Spacebar.Cdn.csproj", "{A2B0770E-D5E6-47BC-8595-4469F5C3E993}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.ConfigModel", "Spacebar.ConfigModel\Spacebar.ConfigModel.csproj", "{EC5C6A71-458A-4A1D-BE96-CCB84FF4AF1B}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Models", "Models", "{259D1A9B-2927-4571-A366-68C3BB30C2B2}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigTest", "ConfigTest\ConfigTest.csproj", "{3BB51E17-8D3E-42FE-AAE6-C33DA5D8D323}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.Models.Config", "Models\Spacebar.Models.Config\Spacebar.Models.Config.csproj", "{709BCD85-2E06-429B-A53E-95CCD286A94F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.Cdn", "Spacebar.Cdn\Spacebar.Cdn.csproj", "{A2B0770E-D5E6-47BC-8595-4469F5C3E993}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.Models.Db", "Models\Spacebar.Models.Db\Spacebar.Models.Db.csproj", "{753A55F0-A2CD-447B-8664-B06CB606CEAB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigTest", "Utilities\ConfigTest\ConfigTest.csproj", "{9B190B74-C7D0-4E60-9D73-008136A800FF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscordEmojiConverter", "Utilities\DiscordEmojiConverter\DiscordEmojiConverter.csproj", "{BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.CleanSettingsRows", "Utilities\Spacebar.CleanSettingsRows\Spacebar.CleanSettingsRows.csproj", "{9AABE503-5D27-4D7F-8A01-4430422C4284}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spacebar.Models.AdminApi", "Models\Spacebar.Models.AdminApi\Spacebar.Models.AdminApi.csproj", "{F13D96E4-9C85-4853-B812-7FD35620382C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {524849DF-93BC-4632-B6C2-D05552C13887}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {524849DF-93BC-4632-B6C2-D05552C13887}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {524849DF-93BC-4632-B6C2-D05552C13887}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {524849DF-93BC-4632-B6C2-D05552C13887}.Release|Any CPU.Build.0 = Release|Any CPU
{00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Debug|x64.Build.0 = Debug|Any CPU
+ {00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Debug|x86.Build.0 = Debug|Any CPU
{00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Release|x64.ActiveCfg = Release|Any CPU
+ {00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Release|x64.Build.0 = Release|Any CPU
+ {00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Release|x86.ActiveCfg = Release|Any CPU
+ {00E58C53-0AC1-4113-8CCF-D299861EA8D3}.Release|x86.Build.0 = Release|Any CPU
{F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Debug|x64.Build.0 = Debug|Any CPU
+ {F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Debug|x86.Build.0 = Debug|Any CPU
{F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Release|x64.ActiveCfg = Release|Any CPU
+ {F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Release|x64.Build.0 = Release|Any CPU
+ {F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Release|x86.ActiveCfg = Release|Any CPU
+ {F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2}.Release|x86.Build.0 = Release|Any CPU
{374314B2-7149-4316-8750-4E1E7BF6C3B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{374314B2-7149-4316-8750-4E1E7BF6C3B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {374314B2-7149-4316-8750-4E1E7BF6C3B4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {374314B2-7149-4316-8750-4E1E7BF6C3B4}.Debug|x64.Build.0 = Debug|Any CPU
+ {374314B2-7149-4316-8750-4E1E7BF6C3B4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {374314B2-7149-4316-8750-4E1E7BF6C3B4}.Debug|x86.Build.0 = Debug|Any CPU
{374314B2-7149-4316-8750-4E1E7BF6C3B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{374314B2-7149-4316-8750-4E1E7BF6C3B4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {374314B2-7149-4316-8750-4E1E7BF6C3B4}.Release|x64.ActiveCfg = Release|Any CPU
+ {374314B2-7149-4316-8750-4E1E7BF6C3B4}.Release|x64.Build.0 = Release|Any CPU
+ {374314B2-7149-4316-8750-4E1E7BF6C3B4}.Release|x86.ActiveCfg = Release|Any CPU
+ {374314B2-7149-4316-8750-4E1E7BF6C3B4}.Release|x86.Build.0 = Release|Any CPU
{498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Debug|x64.Build.0 = Debug|Any CPU
+ {498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Debug|x86.Build.0 = Debug|Any CPU
{498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Release|Any CPU.Build.0 = Release|Any CPU
- {5F138C70-EAFA-4C7C-8B90-EFB9624B235C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5F138C70-EAFA-4C7C-8B90-EFB9624B235C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5F138C70-EAFA-4C7C-8B90-EFB9624B235C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5F138C70-EAFA-4C7C-8B90-EFB9624B235C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Release|x64.ActiveCfg = Release|Any CPU
+ {498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Release|x64.Build.0 = Release|Any CPU
+ {498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Release|x86.ActiveCfg = Release|Any CPU
+ {498DAD05-336E-4851-ABD8-4E7CCA8312B0}.Release|x86.Build.0 = Release|Any CPU
{BCC6501C-16A7-4787-BA47-52DAE06718A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCC6501C-16A7-4787-BA47-52DAE06718A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BCC6501C-16A7-4787-BA47-52DAE06718A8}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BCC6501C-16A7-4787-BA47-52DAE06718A8}.Debug|x64.Build.0 = Debug|Any CPU
+ {BCC6501C-16A7-4787-BA47-52DAE06718A8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BCC6501C-16A7-4787-BA47-52DAE06718A8}.Debug|x86.Build.0 = Debug|Any CPU
{BCC6501C-16A7-4787-BA47-52DAE06718A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BCC6501C-16A7-4787-BA47-52DAE06718A8}.Release|Any CPU.Build.0 = Release|Any CPU
- {9B41FAC1-4427-487C-BF3F-69554848DEBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9B41FAC1-4427-487C-BF3F-69554848DEBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9B41FAC1-4427-487C-BF3F-69554848DEBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9B41FAC1-4427-487C-BF3F-69554848DEBF}.Release|Any CPU.Build.0 = Release|Any CPU
- {EC5C6A71-458A-4A1D-BE96-CCB84FF4AF1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EC5C6A71-458A-4A1D-BE96-CCB84FF4AF1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EC5C6A71-458A-4A1D-BE96-CCB84FF4AF1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EC5C6A71-458A-4A1D-BE96-CCB84FF4AF1B}.Release|Any CPU.Build.0 = Release|Any CPU
- {3BB51E17-8D3E-42FE-AAE6-C33DA5D8D323}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3BB51E17-8D3E-42FE-AAE6-C33DA5D8D323}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3BB51E17-8D3E-42FE-AAE6-C33DA5D8D323}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3BB51E17-8D3E-42FE-AAE6-C33DA5D8D323}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BCC6501C-16A7-4787-BA47-52DAE06718A8}.Release|x64.ActiveCfg = Release|Any CPU
+ {BCC6501C-16A7-4787-BA47-52DAE06718A8}.Release|x64.Build.0 = Release|Any CPU
+ {BCC6501C-16A7-4787-BA47-52DAE06718A8}.Release|x86.ActiveCfg = Release|Any CPU
+ {BCC6501C-16A7-4787-BA47-52DAE06718A8}.Release|x86.Build.0 = Release|Any CPU
{A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Debug|x64.Build.0 = Debug|Any CPU
+ {A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Debug|x86.Build.0 = Debug|Any CPU
{A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Release|x64.ActiveCfg = Release|Any CPU
+ {A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Release|x64.Build.0 = Release|Any CPU
+ {A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Release|x86.ActiveCfg = Release|Any CPU
+ {A2B0770E-D5E6-47BC-8595-4469F5C3E993}.Release|x86.Build.0 = Release|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Debug|x64.Build.0 = Debug|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Debug|x86.Build.0 = Debug|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Release|x64.ActiveCfg = Release|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Release|x64.Build.0 = Release|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Release|x86.ActiveCfg = Release|Any CPU
+ {709BCD85-2E06-429B-A53E-95CCD286A94F}.Release|x86.Build.0 = Release|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Debug|x64.Build.0 = Debug|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Debug|x86.Build.0 = Debug|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Release|x64.ActiveCfg = Release|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Release|x64.Build.0 = Release|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Release|x86.ActiveCfg = Release|Any CPU
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB}.Release|x86.Build.0 = Release|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Debug|x64.Build.0 = Debug|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Debug|x86.Build.0 = Debug|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Release|x64.ActiveCfg = Release|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Release|x64.Build.0 = Release|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Release|x86.ActiveCfg = Release|Any CPU
+ {9B190B74-C7D0-4E60-9D73-008136A800FF}.Release|x86.Build.0 = Release|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Debug|x64.Build.0 = Debug|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Debug|x86.Build.0 = Debug|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Release|x64.ActiveCfg = Release|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Release|x64.Build.0 = Release|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Release|x86.ActiveCfg = Release|Any CPU
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF}.Release|x86.Build.0 = Release|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Debug|x64.Build.0 = Debug|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Debug|x86.Build.0 = Debug|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Release|x64.ActiveCfg = Release|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Release|x64.Build.0 = Release|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Release|x86.ActiveCfg = Release|Any CPU
+ {9AABE503-5D27-4D7F-8A01-4430422C4284}.Release|x86.Build.0 = Release|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Debug|x64.Build.0 = Debug|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Debug|x86.Build.0 = Debug|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Release|x64.ActiveCfg = Release|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Release|x64.Build.0 = Release|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Release|x86.ActiveCfg = Release|Any CPU
+ {F13D96E4-9C85-4853-B812-7FD35620382C}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{F4E179D1-A3EB-4A1D-9C11-E7019F4B1EE2} = {04787943-EBB6-4DE4-96D5-4CFB4A2CEE99}
{374314B2-7149-4316-8750-4E1E7BF6C3B4} = {04787943-EBB6-4DE4-96D5-4CFB4A2CEE99}
{498DAD05-336E-4851-ABD8-4E7CCA8312B0} = {04787943-EBB6-4DE4-96D5-4CFB4A2CEE99}
{BCC6501C-16A7-4787-BA47-52DAE06718A8} = {04787943-EBB6-4DE4-96D5-4CFB4A2CEE99}
+ {709BCD85-2E06-429B-A53E-95CCD286A94F} = {259D1A9B-2927-4571-A366-68C3BB30C2B2}
+ {753A55F0-A2CD-447B-8664-B06CB606CEAB} = {259D1A9B-2927-4571-A366-68C3BB30C2B2}
+ {9B190B74-C7D0-4E60-9D73-008136A800FF} = {04787943-EBB6-4DE4-96D5-4CFB4A2CEE99}
+ {BCE9DADB-4274-4190-8EA7-54F3EF6D5ECF} = {04787943-EBB6-4DE4-96D5-4CFB4A2CEE99}
+ {9AABE503-5D27-4D7F-8A01-4430422C4284} = {04787943-EBB6-4DE4-96D5-4CFB4A2CEE99}
+ {F13D96E4-9C85-4853-B812-7FD35620382C} = {259D1A9B-2927-4571-A366-68C3BB30C2B2}
EndGlobalSection
EndGlobal
diff --git a/extra/admin-api/Utilities/ConfigTest/ConfigTest.csproj b/extra/admin-api/Utilities/ConfigTest/ConfigTest.csproj
new file mode 100644
index 00000000..fecd9f3e
--- /dev/null
+++ b/extra/admin-api/Utilities/ConfigTest/ConfigTest.csproj
@@ -0,0 +1,17 @@
+<Project Sdk="Microsoft.NET.Sdk.Worker">
+
+ <PropertyGroup>
+ <TargetFramework>net10.0</TargetFramework>
+ <Nullable>enable</Nullable>
+ <ImplicitUsings>enable</ImplicitUsings>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.1" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\Models\Spacebar.Models.Config\Spacebar.Models.Config.csproj" />
+ <ProjectReference Include="..\..\Models\Spacebar.Models.Db\Spacebar.Models.Db.csproj" />
+ </ItemGroup>
+</Project>
diff --git a/extra/admin-api/ConfigTest/Program.cs b/extra/admin-api/Utilities/ConfigTest/Program.cs
index 5945bcf6..162b1381 100644
--- a/extra/admin-api/ConfigTest/Program.cs
+++ b/extra/admin-api/Utilities/ConfigTest/Program.cs
@@ -1,6 +1,6 @@
using ConfigTest;
using Microsoft.EntityFrameworkCore;
-using Spacebar.Db.Contexts;
+using Spacebar.Models.Db.Contexts;
var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddHostedService<Worker>();
diff --git a/extra/admin-api/ConfigTest/Properties/launchSettings.json b/extra/admin-api/Utilities/ConfigTest/Properties/launchSettings.json
index c355f360..c355f360 100644
--- a/extra/admin-api/ConfigTest/Properties/launchSettings.json
+++ b/extra/admin-api/Utilities/ConfigTest/Properties/launchSettings.json
diff --git a/extra/admin-api/ConfigTest/Worker.cs b/extra/admin-api/Utilities/ConfigTest/Worker.cs
index dd3ef779..ec8988fa 100644
--- a/extra/admin-api/ConfigTest/Worker.cs
+++ b/extra/admin-api/Utilities/ConfigTest/Worker.cs
@@ -1,6 +1,6 @@
using System.Text.Json.Nodes;
using Spacebar.ConfigModel.Extensions;
-using Spacebar.Db.Contexts;
+using Spacebar.Models.Db.Contexts;
namespace ConfigTest;
diff --git a/extra/admin-api/ConfigTest/appsettings.Development.json b/extra/admin-api/Utilities/ConfigTest/appsettings.Development.json
index 03245773..03245773 100644
--- a/extra/admin-api/ConfigTest/appsettings.Development.json
+++ b/extra/admin-api/Utilities/ConfigTest/appsettings.Development.json
diff --git a/extra/admin-api/ConfigTest/appsettings.json b/extra/admin-api/Utilities/ConfigTest/appsettings.json
index 10f68b8c..10f68b8c 100644
--- a/extra/admin-api/ConfigTest/appsettings.json
+++ b/extra/admin-api/Utilities/ConfigTest/appsettings.json
diff --git a/extra/admin-api/DiscordEmojiConverter/DiscordEmojiConverter.csproj b/extra/admin-api/Utilities/DiscordEmojiConverter/DiscordEmojiConverter.csproj
index 72d306b3..72d306b3 100644
--- a/extra/admin-api/DiscordEmojiConverter/DiscordEmojiConverter.csproj
+++ b/extra/admin-api/Utilities/DiscordEmojiConverter/DiscordEmojiConverter.csproj
diff --git a/extra/admin-api/DiscordEmojiConverter/DiscordEmojiJson.cs b/extra/admin-api/Utilities/DiscordEmojiConverter/DiscordEmojiJson.cs
index 71c4a53f..71c4a53f 100644
--- a/extra/admin-api/DiscordEmojiConverter/DiscordEmojiJson.cs
+++ b/extra/admin-api/Utilities/DiscordEmojiConverter/DiscordEmojiJson.cs
diff --git a/extra/admin-api/DiscordEmojiConverter/Program.cs b/extra/admin-api/Utilities/DiscordEmojiConverter/Program.cs
index 96593958..96593958 100644
--- a/extra/admin-api/DiscordEmojiConverter/Program.cs
+++ b/extra/admin-api/Utilities/DiscordEmojiConverter/Program.cs
diff --git a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Classes/OpenAPI/OpenAPISchema.cs b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Classes/OpenAPI/OpenAPISchema.cs
index 8995dee5..1dfe8548 100644
--- a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Classes/OpenAPI/OpenAPISchema.cs
+++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Classes/OpenAPI/OpenAPISchema.cs
@@ -1,6 +1,8 @@
using System.Collections.Frozen;
using System.Text.Json;
using System.Text.Json.Serialization;
+using System.Text.RegularExpressions;
+using ArcaneLibs.Extensions;
namespace Spacebar.AdminApi.TestClient.Classes.OpenAPI;
@@ -187,6 +189,8 @@ public class OpenApiSchemaRef {
public List<OpenApiSchemaRef>? AnyOf { get; set; }
public List<object>? Enum { get; set; }
public string? Format { get; set; }
+ public List<OpenApiSchemaRef>? Items { get; set; }
+ public Regex? Pattern { get; set; }
public OpenApiSchemaRef? GetReferencedSchema(OpenApiSchema schema) {
if (Ref == null) return null;
@@ -271,7 +275,7 @@ public class OpenApiSchemaRefConverter : JsonConverter<OpenApiSchemaRef> {
else if (property.Value.ValueKind == JsonValueKind.Null)
schemaRef.Default = null;
else if (property.Value.ValueKind == JsonValueKind.Array)
- if (property.Value.GetArrayLength() > 0) throw new JsonException("Expected empty array in default");
+ if (property.Value.GetArrayLength() > 0) throw new JsonException($"Expected empty array in default, got: {property.Value.ToJson()}");
else schemaRef.Default = Array.Empty<object>();
else throw new JsonException($"Expected string|int|bool|null in default, got {property.Value.ValueKind}");
break;
@@ -303,8 +307,22 @@ public class OpenApiSchemaRefConverter : JsonConverter<OpenApiSchemaRef> {
case "additionalProperties": //TODO
case "patternProperties": // Side effect of using JsonValue in typescript
break;
+ case "items":
+ // Console.WriteLine($"Got 'items' property in OpenApiSchemaRef! NodeType: {property.Value.ValueKind}, Value: {property.Value.ToJson()}");
+ try {
+ schemaRef.Items = property.Value.ValueKind is JsonValueKind.Array ? property.Value.Deserialize<List<OpenApiSchemaRef>>(options) : [property.Value.Deserialize<OpenApiSchemaRef>(options)!];
+ } catch (Exception ex) {
+ throw new JsonException($"Error deserializing 'items' property: {ex.Message}\nValue: {property.Value.ToJson()}", ex);
+ }
+ break;
+ case "pattern":
+ var patternStr = property.Value.GetString();
+ if (patternStr != null) {
+ schemaRef.Pattern = new Regex(patternStr);
+ }
+ break;
default:
- Console.WriteLine($"Got unexpected prop {property.Name} in OpenApiSchemaRef!");
+ Console.WriteLine($"Got unexpected prop {property.Name} in OpenApiSchemaRef! Value: {property.Value.ToJson()}");
break;
}
}
diff --git a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Guilds.razor b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Guilds.razor
index 9a376d24..f8cc15dd 100644
--- a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Guilds.razor
+++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Guilds.razor
@@ -1,7 +1,7 @@
@page "/Guilds"
@using System.Net.Http.Headers
@using System.Reflection
-@using Spacebar.AdminApi.Models
+@using Spacebar.Models.AdminApi
@using Spacebar.AdminApi.TestClient.Services
@using ArcaneLibs.Blazor.Components
@using ArcaneLibs.Extensions
diff --git a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Media/StickerCdnTest.razor b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Media/StickerCdnTest.razor
index 3a82563f..16fed227 100644
--- a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Media/StickerCdnTest.razor
+++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Media/StickerCdnTest.razor
@@ -1,6 +1,6 @@
@page "/StickerCdnTest"
@using System.Net.Http.Headers
-@using Spacebar.AdminApi.Models
+@using Spacebar.Models.AdminApi
@using Spacebar.AdminApi.TestClient.Services
@inject Config Config
<h3>StickerCdnTest</h3>
diff --git a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Media/Users.razor b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Media/Users.razor
index f9b43942..68833e64 100644
--- a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Media/Users.razor
+++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Media/Users.razor
@@ -1,7 +1,7 @@
@page "/Media/ByUser"
@using System.Net.Http.Headers
@using System.Reflection
-@using Spacebar.AdminApi.Models
+@using Spacebar.Models.AdminApi
@using Spacebar.AdminApi.TestClient.Services
@using ArcaneLibs.Blazor.Components
@inject Config Config
diff --git a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Users.razor b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Users.razor
index b12a5c16..939c5dca 100644
--- a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Users.razor
+++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/Users.razor
@@ -1,7 +1,7 @@
@page "/Users"
@using System.Net.Http.Headers
@using System.Reflection
-@using Spacebar.AdminApi.Models
+@using Spacebar.Models.AdminApi
@using Spacebar.AdminApi.TestClient.Services
@using ArcaneLibs.Blazor.Components
@using ArcaneLibs.Extensions
diff --git a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/UsersDelete.razor b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/UsersDelete.razor
index 9d527621..b2116ebd 100644
--- a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/UsersDelete.razor
+++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Pages/UsersDelete.razor
@@ -3,7 +3,7 @@
@using System.Text.Json
@using System.Text.Json.Nodes
@using ArcaneLibs.Extensions
-@using Spacebar.AdminApi.Models
+@using Spacebar.Models.AdminApi
@using Spacebar.AdminApi.TestClient.Services
@inject Config Config
<h3>UsersDelete - @Id</h3>
diff --git a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Spacebar.AdminApi.TestClient.csproj b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Spacebar.AdminApi.TestClient.csproj
index b05ab868..5926a35e 100644
--- a/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Spacebar.AdminApi.TestClient.csproj
+++ b/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/Spacebar.AdminApi.TestClient.csproj
@@ -40,8 +40,8 @@
<ItemGroup>
- <ProjectReference Include="..\..\Spacebar.AdminApi.Models\Spacebar.AdminApi.Models.csproj" />
- <ProjectReference Include="..\..\Spacebar.ConfigModel\Spacebar.ConfigModel.csproj" />
+ <ProjectReference Include="..\..\Models\Spacebar.Models.AdminApi\Spacebar.Models.AdminApi.csproj" />
+ <ProjectReference Include="..\..\Models\Spacebar.Models.Config\Spacebar.Models.Config.csproj" />
</ItemGroup>
</Project>
diff --git a/extra/admin-api/Spacebar.CleanSettingsRows/Program.cs b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/Program.cs
index cb99a17a..0f573f55 100644
--- a/extra/admin-api/Spacebar.CleanSettingsRows/Program.cs
+++ b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/Program.cs
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using Spacebar.CleanSettingsRows;
-using Spacebar.Db.Contexts;
+using Spacebar.Models.Db.Contexts;
var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddHostedService<Worker>();
diff --git a/extra/admin-api/Spacebar.CleanSettingsRows/Properties/launchSettings.json b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/Properties/launchSettings.json
index 0e86192b..0e86192b 100644
--- a/extra/admin-api/Spacebar.CleanSettingsRows/Properties/launchSettings.json
+++ b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/Properties/launchSettings.json
diff --git a/extra/admin-api/Spacebar.CleanSettingsRows/Spacebar.CleanSettingsRows.csproj b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/Spacebar.CleanSettingsRows.csproj
index f69453d6..aa33dc2a 100644
--- a/extra/admin-api/Spacebar.CleanSettingsRows/Spacebar.CleanSettingsRows.csproj
+++ b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/Spacebar.CleanSettingsRows.csproj
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
- <UserSecretsId>dotnet-Spacebar.CleanSettingsRows-18acacc0-bc7c-411f-ba03-05f1645e86ec</UserSecretsId>
</PropertyGroup>
<ItemGroup>
@@ -12,6 +11,6 @@
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Spacebar.Db\Spacebar.Db.csproj" />
+ <ProjectReference Include="..\..\Models\Spacebar.Models.Db\Spacebar.Models.Db.csproj" />
</ItemGroup>
</Project>
diff --git a/extra/admin-api/Spacebar.CleanSettingsRows/Worker.cs b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/Worker.cs
index fd977d6e..0be9cd89 100644
--- a/extra/admin-api/Spacebar.CleanSettingsRows/Worker.cs
+++ b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/Worker.cs
@@ -1,7 +1,7 @@
using System.Runtime.CompilerServices;
using Microsoft.EntityFrameworkCore;
-using Spacebar.Db.Contexts;
-using Spacebar.Db.Models;
+using Spacebar.Models.Db.Contexts;
+using Spacebar.Models.Db.Models;
namespace Spacebar.CleanSettingsRows;
diff --git a/extra/admin-api/Spacebar.CleanSettingsRows/appsettings.Development.json b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/appsettings.Development.json
index e8136888..e8136888 100644
--- a/extra/admin-api/Spacebar.CleanSettingsRows/appsettings.Development.json
+++ b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/appsettings.Development.json
diff --git a/extra/admin-api/Spacebar.CleanSettingsRows/appsettings.json b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/appsettings.json
index b2dcdb67..b2dcdb67 100644
--- a/extra/admin-api/Spacebar.CleanSettingsRows/appsettings.json
+++ b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/appsettings.json
diff --git a/extra/admin-api/Spacebar.CleanSettingsRows/deps.json b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/deps.json
index e8ea72ef..e8ea72ef 100644
--- a/extra/admin-api/Spacebar.CleanSettingsRows/deps.json
+++ b/extra/admin-api/Utilities/Spacebar.CleanSettingsRows/deps.json
diff --git a/extra/admin-api/flake.lock b/extra/admin-api/flake.lock
index 10a74143..5a9df819 100644
--- a/extra/admin-api/flake.lock
+++ b/extra/admin-api/flake.lock
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1765472234,
- "narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
+ "lastModified": 1768564909,
+ "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
+ "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github"
},
"original": {
diff --git a/extra/admin-api/outputs.nix b/extra/admin-api/outputs.nix
index 38f8d8a4..e39739e9 100644
--- a/extra/admin-api/outputs.nix
+++ b/extra/admin-api/outputs.nix
@@ -64,29 +64,33 @@ flake-utils.lib.eachSystem flake-utils.lib.allSystems (
proj = self.packages.${system};
in
{
- Spacebar-Db = makeNupkg {
- name = "Spacebar.Db";
- nugetDeps = Spacebar.Db/deps.json;
+ Spacebar-Models-Db = makeNupkg {
+ name = "Spacebar.Models.Db";
+ projectFile = "Models/Spacebar.Models.Db/Spacebar.Models.Db.csproj";
+ nugetDeps = Models/Spacebar.Models.Db/deps.json;
};
- Spacebar-AdminApi-Models = makeNupkg {
- name = "Spacebar.AdminApi.Models";
+ Spacebar-Models-AdminApi = makeNupkg {
+ name = "Spacebar.Models.AdminApi";
+ projectFile = "Models/Spacebar.Models.AdminApi/Spacebar.Models.AdminApi.csproj";
};
- Spacebar-ConfigModel = makeNupkg {
- name = "Spacebar.ConfigModel";
+ Spacebar-Models-Config = makeNupkg {
+ name = "Spacebar.Models.Config";
+ projectFile = "Models/Spacebar.Models.Config/Spacebar.Models.Config.csproj";
};
Spacebar-CleanSettingsRows = makeNupkg {
name = "Spacebar.CleanSettingsRows";
- nugetDeps = Spacebar.CleanSettingsRows/deps.json;
+ projectFile = "Utilities/Spacebar.CleanSettingsRows/Spacebar.CleanSettingsRows.csproj";
+ nugetDeps = Utilities/Spacebar.CleanSettingsRows/deps.json;
packNupkg = false;
- projectReferences = [ proj.Spacebar-Db ];
+ projectReferences = [ proj.Spacebar-Models-Db ];
};
Spacebar-AdminApi = makeNupkg {
name = "Spacebar.AdminApi";
nugetDeps = Spacebar.AdminApi/deps.json;
packNupkg = false;
projectReferences = [
- proj.Spacebar-AdminApi-Models
- proj.Spacebar-Db
+ proj.Spacebar-Models-AdminApi
+ proj.Spacebar-Models-Db
];
};
# Spacebar-AdminApi-TestClient = makeNupkg {
|