mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2025-05-30 13:34:05 +02:00
Update namespaces in Controller and Web projects
This commit is contained in:
parent
2c623cbd9a
commit
3a17eee8d0
Controller
Phantom.Controller.Database.Postgres
ApplicationDbContextDesignFactory.cs
Migrations
20221007033307_Agents.Designer.cs20221007033307_Agents.cs20221007095438_Instances.Designer.cs20221007095438_Instances.cs20221008163849_Identity.Designer.cs20221008163849_Identity.cs20221010193220_InstanceJvmArguments.Designer.cs20221010193220_InstanceJvmArguments.cs20221016035515_AuditLog.Designer.cs20221016035515_AuditLog.cs20221018231328_AgentVersion.Designer.cs20221018231328_AgentVersion.cs20221021125232_Permissions.Designer.cs20221021125232_Permissions.cs20230213040522_AuditLogRename.Designer.cs20230213040522_AuditLogRename.cs20230215101444_EventLog.Designer.cs20230215101444_EventLog.cs20231008122637_ReplaceIdentity.Designer.cs20231008122637_ReplaceIdentity.cs20231008123315_ReplaceIdentity2.Designer.cs20231008123315_ReplaceIdentity2.csApplicationDbContextModelSnapshot.cs
Phantom.Controller.Database.Postgres.csprojPhantom.Controller.Database
ApplicationDbContext.cs
Converters
DatabaseProvider.csEntities
AgentEntity.csAuditLogEntity.csEventLogEntity.csInstanceEntity.csPermissionEntity.csRoleEntity.csRolePermissionEntity.csUserEntity.csUserPermissionEntity.csUserRoleEntity.cs
Enums
Factories
Phantom.Controller.Database.csprojPhantom.Controller.Minecraft
Phantom.Controller.Rpc
Phantom.Controller.Rpc.csprojRpcClientConnection.csRpcClientConnectionClosedEventArgs.csRpcLauncher.cs
Phantom.Controller.Services
Agents
Audit
Events
Instances
AddOrEditInstanceResult.csInstance.csInstanceLogHtmlFilters.csInstanceLogManager.csInstanceManager.cs
Phantom.Controller.Services.csprojRpc
ServiceConfiguration.csUsers
Phantom.Controller
Web/Phantom.Web.Components
Dialogs
Forms
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Design;
|
using Microsoft.EntityFrameworkCore.Design;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres;
|
namespace Phantom.Controller.Database.Postgres;
|
||||||
|
|
||||||
public sealed class ApplicationDbContextDesignFactory : IDesignTimeDbContextFactory<ApplicationDbContext> {
|
public sealed class ApplicationDbContextDesignFactory : IDesignTimeDbContextFactory<ApplicationDbContext> {
|
||||||
public ApplicationDbContext CreateDbContext(string[] args) {
|
public ApplicationDbContext CreateDbContext(string[] args) {
|
||||||
|
@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20221007033307_Agents")]
|
[Migration("20221007033307_Agents")]
|
||||||
@ -25,7 +25,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class Agents : Migration
|
public partial class Agents : Migration
|
||||||
|
@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20221007095438_Instances")]
|
[Migration("20221007095438_Instances")]
|
||||||
@ -25,7 +25,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -49,7 +49,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class Instances : Migration
|
public partial class Instances : Migration
|
||||||
|
@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20221008163849_Identity")]
|
[Migration("20221008163849_Identity")]
|
||||||
@ -221,7 +221,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserTokens", "identity");
|
b.ToTable("UserTokens", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -245,7 +245,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
@ -4,7 +4,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class Identity : Migration
|
public partial class Identity : Migration
|
||||||
|
@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20221010193220_InstanceJvmArguments")]
|
[Migration("20221010193220_InstanceJvmArguments")]
|
||||||
@ -221,7 +221,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserTokens", "identity");
|
b.ToTable("UserTokens", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -245,7 +245,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class InstanceJvmArguments : Migration
|
public partial class InstanceJvmArguments : Migration
|
||||||
|
@ -6,11 +6,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20221016035515_AuditLog")]
|
[Migration("20221016035515_AuditLog")]
|
||||||
@ -222,7 +222,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserTokens", "identity");
|
b.ToTable("UserTokens", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -246,7 +246,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditEventEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditEventEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<long>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -282,7 +282,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("AuditEvents", "system");
|
b.ToTable("AuditEvents", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -378,7 +378,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditEventEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditEventEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
|
@ -5,7 +5,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class AuditLog : Migration
|
public partial class AuditLog : Migration
|
||||||
|
@ -6,11 +6,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20221018231328_AgentVersion")]
|
[Migration("20221018231328_AgentVersion")]
|
||||||
@ -222,7 +222,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserTokens", "identity");
|
b.ToTable("UserTokens", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -250,7 +250,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditEventEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditEventEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<long>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -286,7 +286,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("AuditEvents", "system");
|
b.ToTable("AuditEvents", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -382,7 +382,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditEventEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditEventEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class AgentVersion : Migration
|
public partial class AgentVersion : Migration
|
||||||
|
@ -6,11 +6,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20221021125232_Permissions")]
|
[Migration("20221021125232_Permissions")]
|
||||||
@ -222,7 +222,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserTokens", "identity");
|
b.ToTable("UserTokens", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -250,7 +250,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditEventEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditEventEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<long>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -286,7 +286,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("AuditEvents", "system");
|
b.ToTable("AuditEvents", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -331,7 +331,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Instances", "agents");
|
b.ToTable("Instances", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.PermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.PermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -341,7 +341,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Permissions", "identity");
|
b.ToTable("Permissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RolePermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RolePermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -356,7 +356,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("RolePermissions", "identity");
|
b.ToTable("RolePermissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserPermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserPermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -422,7 +422,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditEventEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditEventEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
@ -431,9 +431,9 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.Navigation("User");
|
b.Navigation("User");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RolePermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RolePermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.PermissionEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.PermissionEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PermissionId")
|
.HasForeignKey("PermissionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
@ -446,9 +446,9 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserPermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserPermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.PermissionEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.PermissionEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PermissionId")
|
.HasForeignKey("PermissionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class Permissions : Migration
|
public partial class Permissions : Migration
|
||||||
|
@ -6,11 +6,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20230213040522_AuditLogRename")]
|
[Migration("20230213040522_AuditLogRename")]
|
||||||
@ -222,7 +222,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserTokens", "identity");
|
b.ToTable("UserTokens", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -250,7 +250,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditEventEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditEventEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<long>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -286,7 +286,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("AuditLog", "system");
|
b.ToTable("AuditLog", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -331,7 +331,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Instances", "agents");
|
b.ToTable("Instances", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.PermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.PermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -341,7 +341,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Permissions", "identity");
|
b.ToTable("Permissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RolePermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RolePermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -356,7 +356,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("RolePermissions", "identity");
|
b.ToTable("RolePermissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserPermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserPermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -422,7 +422,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditEventEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditEventEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
@ -431,9 +431,9 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.Navigation("User");
|
b.Navigation("User");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RolePermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RolePermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.PermissionEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.PermissionEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PermissionId")
|
.HasForeignKey("PermissionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
@ -446,9 +446,9 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserPermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserPermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.PermissionEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.PermissionEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PermissionId")
|
.HasForeignKey("PermissionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class AuditLogRename : Migration
|
public partial class AuditLogRename : Migration
|
||||||
|
@ -6,11 +6,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20230215101444_EventLog")]
|
[Migration("20230215101444_EventLog")]
|
||||||
@ -222,7 +222,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserTokens", "identity");
|
b.ToTable("UserTokens", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -250,7 +250,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<long>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -286,7 +286,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("AuditLog", "system");
|
b.ToTable("AuditLog", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.EventLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.EventLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("EventGuid")
|
b.Property<Guid>("EventGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -318,7 +318,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("EventLog", "system");
|
b.ToTable("EventLog", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -363,7 +363,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Instances", "agents");
|
b.ToTable("Instances", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.PermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.PermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -373,7 +373,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Permissions", "identity");
|
b.ToTable("Permissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RolePermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RolePermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("RoleId")
|
b.Property<string>("RoleId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -388,7 +388,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("RolePermissions", "identity");
|
b.ToTable("RolePermissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserPermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserPermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -454,7 +454,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
@ -463,9 +463,9 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.Navigation("User");
|
b.Navigation("User");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RolePermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RolePermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.PermissionEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.PermissionEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PermissionId")
|
.HasForeignKey("PermissionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
@ -478,9 +478,9 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserPermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserPermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.PermissionEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.PermissionEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PermissionId")
|
.HasForeignKey("PermissionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class EventLog : Migration
|
public partial class EventLog : Migration
|
||||||
|
@ -6,11 +6,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20231008122637_ReplaceIdentity")]
|
[Migration("20231008122637_ReplaceIdentity")]
|
||||||
@ -26,7 +26,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -54,7 +54,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<long>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -88,7 +88,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("AuditLog", "system");
|
b.ToTable("AuditLog", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.EventLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.EventLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("EventGuid")
|
b.Property<Guid>("EventGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -120,7 +120,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("EventLog", "system");
|
b.ToTable("EventLog", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -165,7 +165,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Instances", "agents");
|
b.ToTable("Instances", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.PermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.PermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
@ -4,7 +4,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class ReplaceIdentity : Migration
|
public partial class ReplaceIdentity : Migration
|
||||||
|
@ -6,11 +6,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
[Migration("20231008123315_ReplaceIdentity2")]
|
[Migration("20231008123315_ReplaceIdentity2")]
|
||||||
@ -26,7 +26,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -54,7 +54,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<long>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -90,7 +90,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("AuditLog", "system");
|
b.ToTable("AuditLog", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.EventLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.EventLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("EventGuid")
|
b.Property<Guid>("EventGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -122,7 +122,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("EventLog", "system");
|
b.ToTable("EventLog", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -167,7 +167,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Instances", "agents");
|
b.ToTable("Instances", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.PermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.PermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -177,7 +177,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Permissions", "identity");
|
b.ToTable("Permissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RoleEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RoleEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("RoleGuid")
|
b.Property<Guid>("RoleGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -192,7 +192,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Roles", "identity");
|
b.ToTable("Roles", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RolePermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RolePermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("RoleGuid")
|
b.Property<Guid>("RoleGuid")
|
||||||
.HasColumnType("uuid");
|
.HasColumnType("uuid");
|
||||||
@ -207,7 +207,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("RolePermissions", "identity");
|
b.ToTable("RolePermissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("UserGuid")
|
b.Property<Guid>("UserGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -229,7 +229,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Users", "identity");
|
b.ToTable("Users", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserPermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserPermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("UserGuid")
|
b.Property<Guid>("UserGuid")
|
||||||
.HasColumnType("uuid");
|
.HasColumnType("uuid");
|
||||||
@ -244,7 +244,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserPermissions", "identity");
|
b.ToTable("UserPermissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserRoleEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserRoleEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("UserGuid")
|
b.Property<Guid>("UserGuid")
|
||||||
.HasColumnType("uuid");
|
.HasColumnType("uuid");
|
||||||
@ -259,9 +259,9 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserRoles", "identity");
|
b.ToTable("UserRoles", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.UserEntity", "User")
|
b.HasOne("Phantom.Controller.Database.Entities.UserEntity", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("UserGuid")
|
.HasForeignKey("UserGuid")
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
.OnDelete(DeleteBehavior.SetNull);
|
||||||
@ -269,45 +269,45 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.Navigation("User");
|
b.Navigation("User");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RolePermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RolePermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.PermissionEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.PermissionEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PermissionId")
|
.HasForeignKey("PermissionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("Phantom.Server.Database.Entities.RoleEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.RoleEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("RoleGuid")
|
.HasForeignKey("RoleGuid")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserPermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserPermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.PermissionEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.PermissionEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PermissionId")
|
.HasForeignKey("PermissionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("Phantom.Server.Database.Entities.UserEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.UserEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("UserGuid")
|
.HasForeignKey("UserGuid")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserRoleEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserRoleEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.RoleEntity", "Role")
|
b.HasOne("Phantom.Controller.Database.Entities.RoleEntity", "Role")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("RoleGuid")
|
.HasForeignKey("RoleGuid")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("Phantom.Server.Database.Entities.UserEntity", "User")
|
b.HasOne("Phantom.Controller.Database.Entities.UserEntity", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("UserGuid")
|
.HasForeignKey("UserGuid")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class ReplaceIdentity2 : Migration
|
public partial class ReplaceIdentity2 : Migration
|
||||||
|
@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Postgres.Migrations
|
namespace Phantom.Controller.Database.Postgres.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(ApplicationDbContext))]
|
[DbContext(typeof(ApplicationDbContext))]
|
||||||
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
|
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
|
||||||
@ -23,7 +23,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AgentEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("AgentGuid")
|
b.Property<Guid>("AgentGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -51,7 +51,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Agents", "agents");
|
b.ToTable("Agents", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("Id")
|
b.Property<long>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -87,7 +87,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("AuditLog", "system");
|
b.ToTable("AuditLog", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.EventLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.EventLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("EventGuid")
|
b.Property<Guid>("EventGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -119,7 +119,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("EventLog", "system");
|
b.ToTable("EventLog", "system");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.InstanceEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("InstanceGuid")
|
b.Property<Guid>("InstanceGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -164,7 +164,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Instances", "agents");
|
b.ToTable("Instances", "agents");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.PermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.PermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@ -174,7 +174,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Permissions", "identity");
|
b.ToTable("Permissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RoleEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RoleEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("RoleGuid")
|
b.Property<Guid>("RoleGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -189,7 +189,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Roles", "identity");
|
b.ToTable("Roles", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RolePermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RolePermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("RoleGuid")
|
b.Property<Guid>("RoleGuid")
|
||||||
.HasColumnType("uuid");
|
.HasColumnType("uuid");
|
||||||
@ -204,7 +204,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("RolePermissions", "identity");
|
b.ToTable("RolePermissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("UserGuid")
|
b.Property<Guid>("UserGuid")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -226,7 +226,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("Users", "identity");
|
b.ToTable("Users", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserPermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserPermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("UserGuid")
|
b.Property<Guid>("UserGuid")
|
||||||
.HasColumnType("uuid");
|
.HasColumnType("uuid");
|
||||||
@ -241,7 +241,7 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserPermissions", "identity");
|
b.ToTable("UserPermissions", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserRoleEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserRoleEntity", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("UserGuid")
|
b.Property<Guid>("UserGuid")
|
||||||
.HasColumnType("uuid");
|
.HasColumnType("uuid");
|
||||||
@ -256,9 +256,9 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.ToTable("UserRoles", "identity");
|
b.ToTable("UserRoles", "identity");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditLogEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.AuditLogEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.UserEntity", "User")
|
b.HasOne("Phantom.Controller.Database.Entities.UserEntity", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("UserGuid")
|
.HasForeignKey("UserGuid")
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
.OnDelete(DeleteBehavior.SetNull);
|
||||||
@ -266,45 +266,45 @@ namespace Phantom.Server.Database.Postgres.Migrations
|
|||||||
b.Navigation("User");
|
b.Navigation("User");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.RolePermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.RolePermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.PermissionEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.PermissionEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PermissionId")
|
.HasForeignKey("PermissionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("Phantom.Server.Database.Entities.RoleEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.RoleEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("RoleGuid")
|
.HasForeignKey("RoleGuid")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserPermissionEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserPermissionEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.PermissionEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.PermissionEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PermissionId")
|
.HasForeignKey("PermissionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("Phantom.Server.Database.Entities.UserEntity", null)
|
b.HasOne("Phantom.Controller.Database.Entities.UserEntity", null)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("UserGuid")
|
.HasForeignKey("UserGuid")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Phantom.Server.Database.Entities.UserRoleEntity", b =>
|
modelBuilder.Entity("Phantom.Controller.Database.Entities.UserRoleEntity", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Phantom.Server.Database.Entities.RoleEntity", "Role")
|
b.HasOne("Phantom.Controller.Database.Entities.RoleEntity", "Role")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("RoleGuid")
|
.HasForeignKey("RoleGuid")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("Phantom.Server.Database.Entities.UserEntity", "User")
|
b.HasOne("Phantom.Controller.Database.Entities.UserEntity", "User")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("UserGuid")
|
.HasForeignKey("UserGuid")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<RootNamespace>Phantom.Server.Database.Postgres</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
@ -3,12 +3,12 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Phantom.Common.Data;
|
using Phantom.Common.Data;
|
||||||
using Phantom.Common.Data.Minecraft;
|
using Phantom.Common.Data.Minecraft;
|
||||||
using Phantom.Server.Database.Converters;
|
using Phantom.Controller.Database.Converters;
|
||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
using Phantom.Server.Database.Enums;
|
using Phantom.Controller.Database.Enums;
|
||||||
using Phantom.Server.Database.Factories;
|
using Phantom.Controller.Database.Factories;
|
||||||
|
|
||||||
namespace Phantom.Server.Database;
|
namespace Phantom.Controller.Database;
|
||||||
|
|
||||||
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]
|
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]
|
||||||
public class ApplicationDbContext : DbContext {
|
public class ApplicationDbContext : DbContext {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Phantom.Common.Data;
|
using Phantom.Common.Data;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Converters;
|
namespace Phantom.Controller.Database.Converters;
|
||||||
|
|
||||||
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
|
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
|
||||||
sealed class RamAllocationUnitsConverter : ValueConverter<RamAllocationUnits, ushort> {
|
sealed class RamAllocationUnitsConverter : ValueConverter<RamAllocationUnits, ushort> {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace Phantom.Server.Database;
|
namespace Phantom.Controller.Database;
|
||||||
|
|
||||||
public sealed class DatabaseProvider {
|
public sealed class DatabaseProvider {
|
||||||
private readonly IServiceScopeFactory serviceScopeFactory;
|
private readonly IServiceScopeFactory serviceScopeFactory;
|
||||||
|
@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using Phantom.Common.Data;
|
using Phantom.Common.Data;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Entities;
|
namespace Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
[Table("Agents", Schema = "agents")]
|
[Table("Agents", Schema = "agents")]
|
||||||
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]
|
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Phantom.Server.Database.Enums;
|
using Phantom.Controller.Database.Enums;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Entities;
|
namespace Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
[Table("AuditLog", Schema = "system")]
|
[Table("AuditLog", Schema = "system")]
|
||||||
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]
|
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Phantom.Server.Database.Enums;
|
using Phantom.Controller.Database.Enums;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Entities;
|
namespace Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
[Table("EventLog", Schema = "system")]
|
[Table("EventLog", Schema = "system")]
|
||||||
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]
|
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]
|
||||||
|
@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis;
|
|||||||
using Phantom.Common.Data;
|
using Phantom.Common.Data;
|
||||||
using Phantom.Common.Data.Minecraft;
|
using Phantom.Common.Data.Minecraft;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Entities;
|
namespace Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
[Table("Instances", Schema = "agents")]
|
[Table("Instances", Schema = "agents")]
|
||||||
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]
|
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global")]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Entities;
|
namespace Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
[Table("Permissions", Schema = "identity")]
|
[Table("Permissions", Schema = "identity")]
|
||||||
public sealed class PermissionEntity {
|
public sealed class PermissionEntity {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Entities;
|
namespace Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
[Table("Roles", Schema = "identity")]
|
[Table("Roles", Schema = "identity")]
|
||||||
public sealed class RoleEntity {
|
public sealed class RoleEntity {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Entities;
|
namespace Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
[Table("RolePermissions", Schema = "identity")]
|
[Table("RolePermissions", Schema = "identity")]
|
||||||
public sealed class RolePermissionEntity {
|
public sealed class RolePermissionEntity {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Entities;
|
namespace Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
[Table("Users", Schema = "identity")]
|
[Table("Users", Schema = "identity")]
|
||||||
public sealed class UserEntity {
|
public sealed class UserEntity {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Entities;
|
namespace Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
[Table("UserPermissions", Schema = "identity")]
|
[Table("UserPermissions", Schema = "identity")]
|
||||||
public sealed class UserPermissionEntity {
|
public sealed class UserPermissionEntity {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Entities;
|
namespace Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
[Table("UserRoles", Schema = "identity")]
|
[Table("UserRoles", Schema = "identity")]
|
||||||
public sealed class UserRoleEntity {
|
public sealed class UserRoleEntity {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Database.Enums;
|
namespace Phantom.Controller.Database.Enums;
|
||||||
|
|
||||||
public enum AuditLogEventType {
|
public enum AuditLogEventType {
|
||||||
AdministratorUserCreated,
|
AdministratorUserCreated,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Database.Enums;
|
namespace Phantom.Controller.Database.Enums;
|
||||||
|
|
||||||
public enum AuditLogSubjectType {
|
public enum AuditLogSubjectType {
|
||||||
User,
|
User,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Database.Enums;
|
namespace Phantom.Controller.Database.Enums;
|
||||||
|
|
||||||
public enum EventLogEventType {
|
public enum EventLogEventType {
|
||||||
InstanceLaunchSucceded,
|
InstanceLaunchSucceded,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Database.Enums;
|
namespace Phantom.Controller.Database.Enums;
|
||||||
|
|
||||||
public enum EventLogSubjectType {
|
public enum EventLogSubjectType {
|
||||||
Instance
|
Instance
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Factories;
|
namespace Phantom.Controller.Database.Factories;
|
||||||
|
|
||||||
public abstract class AbstractUpsertHelper<T> where T : class {
|
public abstract class AbstractUpsertHelper<T> where T : class {
|
||||||
private protected readonly ApplicationDbContext Ctx;
|
private protected readonly ApplicationDbContext Ctx;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Factories;
|
namespace Phantom.Controller.Database.Factories;
|
||||||
|
|
||||||
public sealed class AgentEntityUpsert : AbstractUpsertHelper<AgentEntity> {
|
public sealed class AgentEntityUpsert : AbstractUpsertHelper<AgentEntity> {
|
||||||
internal AgentEntityUpsert(ApplicationDbContext ctx) : base(ctx) {}
|
internal AgentEntityUpsert(ApplicationDbContext ctx) : base(ctx) {}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
namespace Phantom.Server.Database.Factories;
|
namespace Phantom.Controller.Database.Factories;
|
||||||
|
|
||||||
public sealed class InstanceEntityUpsert : AbstractUpsertHelper<InstanceEntity> {
|
public sealed class InstanceEntityUpsert : AbstractUpsertHelper<InstanceEntity> {
|
||||||
internal InstanceEntityUpsert(ApplicationDbContext ctx) : base(ctx) {}
|
internal InstanceEntityUpsert(ApplicationDbContext ctx) : base(ctx) {}
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<RootNamespace>Phantom.Server.Database</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
|
|
||||||
namespace Phantom.Server.Minecraft;
|
namespace Phantom.Controller.Minecraft;
|
||||||
|
|
||||||
public static class JvmArgumentsHelper {
|
public static class JvmArgumentsHelper {
|
||||||
public static ImmutableArray<string> Split(string arguments) {
|
public static ImmutableArray<string> Split(string arguments) {
|
||||||
|
@ -8,7 +8,7 @@ using Phantom.Utils.IO;
|
|||||||
using Phantom.Utils.Runtime;
|
using Phantom.Utils.Runtime;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace Phantom.Server.Minecraft;
|
namespace Phantom.Controller.Minecraft;
|
||||||
|
|
||||||
sealed class MinecraftVersionApi : IDisposable {
|
sealed class MinecraftVersionApi : IDisposable {
|
||||||
private static readonly ILogger Logger = PhantomLogger.Create<MinecraftVersionApi>();
|
private static readonly ILogger Logger = PhantomLogger.Create<MinecraftVersionApi>();
|
||||||
|
@ -4,7 +4,7 @@ using Phantom.Common.Data.Minecraft;
|
|||||||
using Phantom.Common.Logging;
|
using Phantom.Common.Logging;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace Phantom.Server.Minecraft;
|
namespace Phantom.Controller.Minecraft;
|
||||||
|
|
||||||
public sealed class MinecraftVersions : IDisposable {
|
public sealed class MinecraftVersions : IDisposable {
|
||||||
private static readonly ILogger Logger = PhantomLogger.Create<MinecraftVersions>();
|
private static readonly ILogger Logger = PhantomLogger.Create<MinecraftVersions>();
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<RootNamespace>Phantom.Server.Minecraft</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Common\Phantom.Common.Data\Phantom.Common.Data.csproj" />
|
<ProjectReference Include="..\..\Common\Phantom.Common.Data\Phantom.Common.Data.csproj" />
|
||||||
<ProjectReference Include="..\..\Common\Phantom.Common.Logging\Phantom.Common.Logging.csproj" />
|
<ProjectReference Include="..\..\Common\Phantom.Common.Logging\Phantom.Common.Logging.csproj" />
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<RootNamespace>Phantom.Server.Rpc</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Common\Phantom.Common.Messages\Phantom.Common.Messages.csproj" />
|
<ProjectReference Include="..\..\Common\Phantom.Common.Messages\Phantom.Common.Messages.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -4,7 +4,7 @@ using Phantom.Common.Messages;
|
|||||||
using Phantom.Common.Messages.BiDirectional;
|
using Phantom.Common.Messages.BiDirectional;
|
||||||
using Phantom.Utils.Rpc.Message;
|
using Phantom.Utils.Rpc.Message;
|
||||||
|
|
||||||
namespace Phantom.Server.Rpc;
|
namespace Phantom.Controller.Rpc;
|
||||||
|
|
||||||
public sealed class RpcClientConnection {
|
public sealed class RpcClientConnection {
|
||||||
private readonly ServerSocket socket;
|
private readonly ServerSocket socket;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Rpc;
|
namespace Phantom.Controller.Rpc;
|
||||||
|
|
||||||
sealed class RpcClientConnectionClosedEventArgs : EventArgs {
|
sealed class RpcClientConnectionClosedEventArgs : EventArgs {
|
||||||
public uint RoutingId { get; }
|
public uint RoutingId { get; }
|
||||||
|
@ -8,7 +8,7 @@ using Phantom.Utils.Tasks;
|
|||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
|
||||||
namespace Phantom.Server.Rpc;
|
namespace Phantom.Controller.Rpc;
|
||||||
|
|
||||||
public sealed class RpcLauncher : RpcRuntime<ServerSocket> {
|
public sealed class RpcLauncher : RpcRuntime<ServerSocket> {
|
||||||
public static Task Launch(RpcConfiguration config, Func<RpcClientConnection, IMessageToServerListener> listenerFactory, CancellationToken cancellationToken) {
|
public static Task Launch(RpcConfiguration config, Func<RpcClientConnection, IMessageToServerListener> listenerFactory, CancellationToken cancellationToken) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Phantom.Common.Data;
|
using Phantom.Common.Data;
|
||||||
using Phantom.Common.Data.Agent;
|
using Phantom.Common.Data.Agent;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Agents;
|
namespace Phantom.Controller.Services.Agents;
|
||||||
|
|
||||||
public sealed record Agent(
|
public sealed record Agent(
|
||||||
Guid Guid,
|
Guid Guid,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Phantom.Common.Messages;
|
using Phantom.Common.Messages;
|
||||||
using Phantom.Server.Rpc;
|
using Phantom.Controller.Rpc;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Agents;
|
namespace Phantom.Controller.Services.Agents;
|
||||||
|
|
||||||
sealed class AgentConnection {
|
sealed class AgentConnection {
|
||||||
private readonly RpcClientConnection connection;
|
private readonly RpcClientConnection connection;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using Phantom.Common.Data.Java;
|
using Phantom.Common.Data.Java;
|
||||||
using Phantom.Utils.Collections;
|
using Phantom.Utils.Collections;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Agents;
|
namespace Phantom.Controller.Services.Agents;
|
||||||
|
|
||||||
public sealed class AgentJavaRuntimesManager {
|
public sealed class AgentJavaRuntimesManager {
|
||||||
private readonly RwLockedDictionary<Guid, ImmutableArray<TaggedJavaRuntime>> runtimes = new (LockRecursionPolicy.NoRecursion);
|
private readonly RwLockedDictionary<Guid, ImmutableArray<TaggedJavaRuntime>> runtimes = new (LockRecursionPolicy.NoRecursion);
|
||||||
|
@ -5,15 +5,15 @@ using Phantom.Common.Data.Replies;
|
|||||||
using Phantom.Common.Logging;
|
using Phantom.Common.Logging;
|
||||||
using Phantom.Common.Messages;
|
using Phantom.Common.Messages;
|
||||||
using Phantom.Common.Messages.ToAgent;
|
using Phantom.Common.Messages.ToAgent;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
using Phantom.Server.Rpc;
|
using Phantom.Controller.Rpc;
|
||||||
using Phantom.Server.Services.Instances;
|
using Phantom.Controller.Services.Instances;
|
||||||
using Phantom.Utils.Collections;
|
using Phantom.Utils.Collections;
|
||||||
using Phantom.Utils.Events;
|
using Phantom.Utils.Events;
|
||||||
using Phantom.Utils.Tasks;
|
using Phantom.Utils.Tasks;
|
||||||
using ILogger = Serilog.ILogger;
|
using ILogger = Serilog.ILogger;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Agents;
|
namespace Phantom.Controller.Services.Agents;
|
||||||
|
|
||||||
public sealed class AgentManager {
|
public sealed class AgentManager {
|
||||||
private static readonly ILogger Logger = PhantomLogger.Create<AgentManager>();
|
private static readonly ILogger Logger = PhantomLogger.Create<AgentManager>();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Phantom.Common.Data;
|
using Phantom.Common.Data;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Agents;
|
namespace Phantom.Controller.Services.Agents;
|
||||||
|
|
||||||
public sealed record AgentStats(
|
public sealed record AgentStats(
|
||||||
int RunningInstanceCount,
|
int RunningInstanceCount,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
using Phantom.Server.Database.Enums;
|
using Phantom.Controller.Database.Enums;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Audit;
|
namespace Phantom.Controller.Services.Audit;
|
||||||
|
|
||||||
public sealed partial class AuditLog {
|
public sealed partial class AuditLog {
|
||||||
public Task AddAdministratorUserCreatedEvent(UserEntity administratorUser) {
|
public Task AddAdministratorUserCreatedEvent(UserEntity administratorUser) {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
using Microsoft.AspNetCore.Components.Authorization;
|
using Microsoft.AspNetCore.Components.Authorization;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
using Phantom.Server.Database.Enums;
|
using Phantom.Controller.Database.Enums;
|
||||||
using Phantom.Server.Services.Users;
|
using Phantom.Controller.Services.Users;
|
||||||
using Phantom.Utils.Tasks;
|
using Phantom.Utils.Tasks;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Audit;
|
namespace Phantom.Controller.Services.Audit;
|
||||||
|
|
||||||
public sealed partial class AuditLog {
|
public sealed partial class AuditLog {
|
||||||
private readonly CancellationToken cancellationToken;
|
private readonly CancellationToken cancellationToken;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Phantom.Server.Database.Enums;
|
using Phantom.Controller.Database.Enums;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Audit;
|
namespace Phantom.Controller.Services.Audit;
|
||||||
|
|
||||||
public sealed record AuditLogItem(DateTime UtcTime, Guid? UserGuid, string? UserName, AuditLogEventType EventType, AuditLogSubjectType SubjectType, string? SubjectId, JsonDocument? Data);
|
public sealed record AuditLogItem(DateTime UtcTime, Guid? UserGuid, string? UserName, AuditLogEventType EventType, AuditLogSubjectType SubjectType, string? SubjectId, JsonDocument? Data);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using Phantom.Common.Data.Backups;
|
using Phantom.Common.Data.Backups;
|
||||||
using Phantom.Common.Data.Instance;
|
using Phantom.Common.Data.Instance;
|
||||||
using Phantom.Server.Database.Enums;
|
using Phantom.Controller.Database.Enums;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Events;
|
namespace Phantom.Controller.Services.Events;
|
||||||
|
|
||||||
public sealed partial class EventLog {
|
public sealed partial class EventLog {
|
||||||
internal IInstanceEventVisitor CreateInstanceEventVisitor(Guid eventGuid, DateTime utcTime, Guid agentGuid, Guid instanceGuid) {
|
internal IInstanceEventVisitor CreateInstanceEventVisitor(Guid eventGuid, DateTime utcTime, Guid agentGuid, Guid instanceGuid) {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
using Phantom.Server.Database.Enums;
|
using Phantom.Controller.Database.Enums;
|
||||||
using Phantom.Utils.Tasks;
|
using Phantom.Utils.Tasks;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Events;
|
namespace Phantom.Controller.Services.Events;
|
||||||
|
|
||||||
public sealed partial class EventLog {
|
public sealed partial class EventLog {
|
||||||
private readonly CancellationToken cancellationToken;
|
private readonly CancellationToken cancellationToken;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Phantom.Server.Database.Enums;
|
using Phantom.Controller.Database.Enums;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Events;
|
namespace Phantom.Controller.Services.Events;
|
||||||
|
|
||||||
public sealed record EventLogItem(DateTime UtcTime, Guid? AgentGuid, EventLogEventType EventType, EventLogSubjectType SubjectType, string SubjectId, JsonDocument? Data);
|
public sealed record EventLogItem(DateTime UtcTime, Guid? AgentGuid, EventLogEventType EventType, EventLogSubjectType SubjectType, string SubjectId, JsonDocument? Data);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Services.Instances;
|
namespace Phantom.Controller.Services.Instances;
|
||||||
|
|
||||||
public enum AddOrEditInstanceResult : byte {
|
public enum AddOrEditInstanceResult : byte {
|
||||||
UnknownError,
|
UnknownError,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Phantom.Common.Data.Instance;
|
using Phantom.Common.Data.Instance;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Instances;
|
namespace Phantom.Controller.Services.Instances;
|
||||||
|
|
||||||
public sealed record Instance(
|
public sealed record Instance(
|
||||||
InstanceConfiguration Configuration,
|
InstanceConfiguration Configuration,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Instances;
|
namespace Phantom.Controller.Services.Instances;
|
||||||
|
|
||||||
static partial class InstanceLogHtmlFilters {
|
static partial class InstanceLogHtmlFilters {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5,7 +5,7 @@ using Phantom.Utils.Collections;
|
|||||||
using Phantom.Utils.Events;
|
using Phantom.Utils.Events;
|
||||||
using ILogger = Serilog.ILogger;
|
using ILogger = Serilog.ILogger;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Instances;
|
namespace Phantom.Controller.Services.Instances;
|
||||||
|
|
||||||
public sealed class InstanceLogManager {
|
public sealed class InstanceLogManager {
|
||||||
private const int RetainedLines = 1000;
|
private const int RetainedLines = 1000;
|
||||||
|
@ -2,21 +2,20 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using Phantom.Common.Data;
|
using Phantom.Common.Data;
|
||||||
using Phantom.Common.Data.Instance;
|
using Phantom.Common.Data.Instance;
|
||||||
using Phantom.Common.Data.Java;
|
|
||||||
using Phantom.Common.Data.Minecraft;
|
using Phantom.Common.Data.Minecraft;
|
||||||
using Phantom.Common.Data.Replies;
|
using Phantom.Common.Data.Replies;
|
||||||
using Phantom.Common.Logging;
|
using Phantom.Common.Logging;
|
||||||
using Phantom.Common.Messages;
|
using Phantom.Common.Messages;
|
||||||
using Phantom.Common.Messages.ToAgent;
|
using Phantom.Common.Messages.ToAgent;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
using Phantom.Server.Minecraft;
|
using Phantom.Controller.Minecraft;
|
||||||
using Phantom.Server.Services.Agents;
|
using Phantom.Controller.Services.Agents;
|
||||||
using Phantom.Utils.Collections;
|
using Phantom.Utils.Collections;
|
||||||
using Phantom.Utils.Events;
|
using Phantom.Utils.Events;
|
||||||
using ILogger = Serilog.ILogger;
|
using ILogger = Serilog.ILogger;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Instances;
|
namespace Phantom.Controller.Services.Instances;
|
||||||
|
|
||||||
public sealed class InstanceManager {
|
public sealed class InstanceManager {
|
||||||
private static readonly ILogger Logger = PhantomLogger.Create<InstanceManager>();
|
private static readonly ILogger Logger = PhantomLogger.Create<InstanceManager>();
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<RootNamespace>Phantom.Server.Services</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -4,14 +4,14 @@ using Phantom.Common.Messages;
|
|||||||
using Phantom.Common.Messages.BiDirectional;
|
using Phantom.Common.Messages.BiDirectional;
|
||||||
using Phantom.Common.Messages.ToAgent;
|
using Phantom.Common.Messages.ToAgent;
|
||||||
using Phantom.Common.Messages.ToServer;
|
using Phantom.Common.Messages.ToServer;
|
||||||
using Phantom.Server.Rpc;
|
using Phantom.Controller.Rpc;
|
||||||
using Phantom.Server.Services.Agents;
|
using Phantom.Controller.Services.Agents;
|
||||||
using Phantom.Server.Services.Events;
|
using Phantom.Controller.Services.Events;
|
||||||
using Phantom.Server.Services.Instances;
|
using Phantom.Controller.Services.Instances;
|
||||||
using Phantom.Utils.Rpc.Message;
|
using Phantom.Utils.Rpc.Message;
|
||||||
using Phantom.Utils.Tasks;
|
using Phantom.Utils.Tasks;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Rpc;
|
namespace Phantom.Controller.Services.Rpc;
|
||||||
|
|
||||||
public sealed class MessageToServerListener : IMessageToServerListener {
|
public sealed class MessageToServerListener : IMessageToServerListener {
|
||||||
private readonly RpcClientConnection connection;
|
private readonly RpcClientConnection connection;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using Phantom.Server.Rpc;
|
using Phantom.Controller.Rpc;
|
||||||
using Phantom.Server.Services.Agents;
|
using Phantom.Controller.Services.Agents;
|
||||||
using Phantom.Server.Services.Events;
|
using Phantom.Controller.Services.Events;
|
||||||
using Phantom.Server.Services.Instances;
|
using Phantom.Controller.Services.Instances;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Rpc;
|
namespace Phantom.Controller.Services.Rpc;
|
||||||
|
|
||||||
public sealed class MessageToServerListenerFactory {
|
public sealed class MessageToServerListenerFactory {
|
||||||
private readonly ServiceConfiguration configuration;
|
private readonly ServiceConfiguration configuration;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Services;
|
namespace Phantom.Controller.Services;
|
||||||
|
|
||||||
public sealed record ServiceConfiguration(
|
public sealed record ServiceConfiguration(
|
||||||
string Version,
|
string Version,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Services.Users;
|
namespace Phantom.Controller.Services.Users;
|
||||||
|
|
||||||
public enum AddRoleError : byte {
|
public enum AddRoleError : byte {
|
||||||
NameIsEmpty,
|
NameIsEmpty,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Users;
|
namespace Phantom.Controller.Services.Users;
|
||||||
|
|
||||||
public abstract record AddUserError {
|
public abstract record AddUserError {
|
||||||
private AddUserError() {}
|
private AddUserError() {}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Services.Users;
|
namespace Phantom.Controller.Services.Users;
|
||||||
|
|
||||||
public enum DeleteUserResult : byte {
|
public enum DeleteUserResult : byte {
|
||||||
Deleted,
|
Deleted,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Services.Users;
|
namespace Phantom.Controller.Services.Users;
|
||||||
|
|
||||||
public abstract record PasswordRequirementViolation {
|
public abstract record PasswordRequirementViolation {
|
||||||
private PasswordRequirementViolation() {}
|
private PasswordRequirementViolation() {}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Phantom.Common.Logging;
|
using Phantom.Common.Logging;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
using Phantom.Utils.Collections;
|
using Phantom.Utils.Collections;
|
||||||
using Phantom.Utils.Tasks;
|
using Phantom.Utils.Tasks;
|
||||||
using ILogger = Serilog.ILogger;
|
using ILogger = Serilog.ILogger;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Users;
|
namespace Phantom.Controller.Services.Users;
|
||||||
|
|
||||||
public sealed class RoleManager {
|
public sealed class RoleManager {
|
||||||
private static readonly ILogger Logger = PhantomLogger.Create<RoleManager>();
|
private static readonly ILogger Logger = PhantomLogger.Create<RoleManager>();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Users;
|
namespace Phantom.Controller.Services.Users;
|
||||||
|
|
||||||
public abstract record SetUserPasswordError {
|
public abstract record SetUserPasswordError {
|
||||||
private SetUserPasswordError() {}
|
private SetUserPasswordError() {}
|
||||||
|
@ -3,13 +3,13 @@ using System.Security.Claims;
|
|||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Phantom.Common.Logging;
|
using Phantom.Common.Logging;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
using Phantom.Utils.Collections;
|
using Phantom.Utils.Collections;
|
||||||
using Phantom.Utils.Tasks;
|
using Phantom.Utils.Tasks;
|
||||||
using ILogger = Serilog.ILogger;
|
using ILogger = Serilog.ILogger;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Users;
|
namespace Phantom.Controller.Services.Users;
|
||||||
|
|
||||||
public sealed class UserManager {
|
public sealed class UserManager {
|
||||||
private static readonly ILogger Logger = PhantomLogger.Create<UserManager>();
|
private static readonly ILogger Logger = PhantomLogger.Create<UserManager>();
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Users;
|
namespace Phantom.Controller.Services.Users;
|
||||||
|
|
||||||
internal static class UserPasswords {
|
internal static class UserPasswords {
|
||||||
private static PasswordHasher<UserEntity> Hasher { get; } = new ();
|
private static PasswordHasher<UserEntity> Hasher { get; } = new ();
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Phantom.Common.Logging;
|
using Phantom.Common.Logging;
|
||||||
using Phantom.Server.Database;
|
using Phantom.Controller.Database;
|
||||||
using Phantom.Server.Database.Entities;
|
using Phantom.Controller.Database.Entities;
|
||||||
using Phantom.Utils.Collections;
|
using Phantom.Utils.Collections;
|
||||||
using ILogger = Serilog.ILogger;
|
using ILogger = Serilog.ILogger;
|
||||||
|
|
||||||
namespace Phantom.Server.Services.Users;
|
namespace Phantom.Controller.Services.Users;
|
||||||
|
|
||||||
public sealed class UserRoleManager {
|
public sealed class UserRoleManager {
|
||||||
private static readonly ILogger Logger = PhantomLogger.Create<UserRoleManager>();
|
private static readonly ILogger Logger = PhantomLogger.Create<UserRoleManager>();
|
||||||
|
@ -5,7 +5,7 @@ using Phantom.Utils.Cryptography;
|
|||||||
using Phantom.Utils.IO;
|
using Phantom.Utils.IO;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace Phantom.Server;
|
namespace Phantom.Controller;
|
||||||
|
|
||||||
static class CertificateFiles {
|
static class CertificateFiles {
|
||||||
private static ILogger Logger { get; } = PhantomLogger.Create(nameof(CertificateFiles));
|
private static ILogger Logger { get; } = PhantomLogger.Create(nameof(CertificateFiles));
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<RootNamespace>Phantom.Server</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||||
|
@ -2,18 +2,18 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Phantom.Common.Logging;
|
using Phantom.Common.Logging;
|
||||||
using Phantom.Server;
|
using Phantom.Controller;
|
||||||
using Phantom.Server.Database.Postgres;
|
using Phantom.Controller.Database.Postgres;
|
||||||
using Phantom.Server.Rpc;
|
using Phantom.Controller.Rpc;
|
||||||
using Phantom.Server.Services;
|
using Phantom.Controller.Services;
|
||||||
using Phantom.Server.Services.Rpc;
|
using Phantom.Controller.Services.Rpc;
|
||||||
using Phantom.Utils.Cryptography;
|
using Phantom.Utils.Cryptography;
|
||||||
using Phantom.Utils.IO;
|
using Phantom.Utils.IO;
|
||||||
using Phantom.Utils.Rpc;
|
using Phantom.Utils.Rpc;
|
||||||
using Phantom.Utils.Runtime;
|
using Phantom.Utils.Runtime;
|
||||||
using Phantom.Utils.Tasks;
|
using Phantom.Utils.Tasks;
|
||||||
using WebConfiguration = Phantom.Server.Web.Configuration;
|
using WebConfiguration = Phantom.Web.Configuration;
|
||||||
using WebLauncher = Phantom.Server.Web.Launcher;
|
using WebLauncher = Phantom.Web.Launcher;
|
||||||
|
|
||||||
var cancellationTokenSource = new CancellationTokenSource();
|
var cancellationTokenSource = new CancellationTokenSource();
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using Phantom.Common.Logging;
|
using Phantom.Common.Logging;
|
||||||
using Phantom.Utils.Runtime;
|
using Phantom.Utils.Runtime;
|
||||||
|
|
||||||
namespace Phantom.Server;
|
namespace Phantom.Controller;
|
||||||
|
|
||||||
sealed record Variables(
|
sealed record Variables(
|
||||||
string WebServerHost,
|
string WebServerHost,
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Phantom.Common.Data.Agent;
|
using Phantom.Common.Data.Agent;
|
||||||
using Phantom.Server.Minecraft;
|
using Phantom.Controller.Minecraft;
|
||||||
using Phantom.Server.Services;
|
using Phantom.Controller.Services;
|
||||||
using Phantom.Server.Services.Agents;
|
using Phantom.Controller.Services.Agents;
|
||||||
using Phantom.Server.Services.Audit;
|
using Phantom.Controller.Services.Audit;
|
||||||
using Phantom.Server.Services.Events;
|
using Phantom.Controller.Services.Events;
|
||||||
using Phantom.Server.Services.Instances;
|
using Phantom.Controller.Services.Instances;
|
||||||
using Phantom.Server.Services.Rpc;
|
using Phantom.Controller.Services.Rpc;
|
||||||
using Phantom.Utils.Tasks;
|
using Phantom.Utils.Tasks;
|
||||||
using WebLauncher = Phantom.Server.Web.Launcher;
|
using WebLauncher = Phantom.Web.Launcher;
|
||||||
|
|
||||||
namespace Phantom.Server;
|
namespace Phantom.Controller;
|
||||||
|
|
||||||
sealed class WebConfigurator : WebLauncher.IConfigurator {
|
sealed class WebConfigurator : WebLauncher.IConfigurator {
|
||||||
private readonly ServiceConfiguration serviceConfiguration;
|
private readonly ServiceConfiguration serviceConfiguration;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@using Phantom.Server.Web.Components.Utils
|
@using Phantom.Web.Components.Utils
|
||||||
<div id="@Id" class="modal fade" tabindex="-1">
|
<div id="@Id" class="modal fade" tabindex="-1">
|
||||||
<div class="modal-dialog modal-dialog-centered">
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
namespace Phantom.Server.Web.Components.Forms.Base;
|
namespace Phantom.Web.Components.Forms.Base;
|
||||||
|
|
||||||
public abstract class FormInputBase<TValue> : ComponentBase {
|
public abstract class FormInputBase<TValue> : ComponentBase {
|
||||||
[Parameter, EditorRequired]
|
[Parameter, EditorRequired]
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components.Forms;
|
using Microsoft.AspNetCore.Components.Forms;
|
||||||
using Microsoft.AspNetCore.Components.Web;
|
using Microsoft.AspNetCore.Components.Web;
|
||||||
using Phantom.Server.Web.Components.Utils;
|
using Phantom.Web.Components.Utils;
|
||||||
|
|
||||||
namespace Phantom.Server.Web.Components.Forms.Base;
|
namespace Phantom.Web.Components.Forms.Base;
|
||||||
|
|
||||||
public abstract class FormInputBaseDebounced<TValue> : FormInputBase<TValue>, IDisposable {
|
public abstract class FormInputBaseDebounced<TValue> : FormInputBase<TValue>, IDisposable {
|
||||||
private const uint DefaultDebounceMillis = 700;
|
private const uint DefaultDebounceMillis = 700;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Web.Components.Forms.Base;
|
namespace Phantom.Web.Components.Forms.Base;
|
||||||
|
|
||||||
public interface ICustomFormField {
|
public interface ICustomFormField {
|
||||||
bool TwoWayValueBinding { get; set; }
|
bool TwoWayValueBinding { get; set; }
|
||||||
|
@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Components;
|
|||||||
using Microsoft.AspNetCore.Components.Forms;
|
using Microsoft.AspNetCore.Components.Forms;
|
||||||
using Microsoft.AspNetCore.Components.Rendering;
|
using Microsoft.AspNetCore.Components.Rendering;
|
||||||
using Microsoft.AspNetCore.Components.Web;
|
using Microsoft.AspNetCore.Components.Web;
|
||||||
using Phantom.Server.Web.Components.Forms.Base;
|
using Phantom.Web.Components.Forms.Base;
|
||||||
|
|
||||||
namespace Phantom.Server.Web.Components.Forms.Fields;
|
namespace Phantom.Web.Components.Forms.Fields;
|
||||||
|
|
||||||
public sealed class InputFieldNumeric<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TValue> : InputBase<TValue>, ICustomFormField {
|
public sealed class InputFieldNumeric<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TValue> : InputBase<TValue>, ICustomFormField {
|
||||||
[Parameter]
|
[Parameter]
|
||||||
|
@ -3,9 +3,9 @@ using Microsoft.AspNetCore.Components;
|
|||||||
using Microsoft.AspNetCore.Components.Forms;
|
using Microsoft.AspNetCore.Components.Forms;
|
||||||
using Microsoft.AspNetCore.Components.Rendering;
|
using Microsoft.AspNetCore.Components.Rendering;
|
||||||
using Microsoft.AspNetCore.Components.Web;
|
using Microsoft.AspNetCore.Components.Web;
|
||||||
using Phantom.Server.Web.Components.Forms.Base;
|
using Phantom.Web.Components.Forms.Base;
|
||||||
|
|
||||||
namespace Phantom.Server.Web.Components.Forms.Fields;
|
namespace Phantom.Web.Components.Forms.Fields;
|
||||||
|
|
||||||
public sealed class InputFieldText : InputBase<string?>, ICustomFormField {
|
public sealed class InputFieldText : InputBase<string?>, ICustomFormField {
|
||||||
[Parameter]
|
[Parameter]
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components.Rendering;
|
using Microsoft.AspNetCore.Components.Rendering;
|
||||||
using Phantom.Server.Web.Components.Utils;
|
using Phantom.Web.Components.Utils;
|
||||||
|
|
||||||
namespace Phantom.Server.Web.Components.Forms;
|
namespace Phantom.Web.Components.Forms;
|
||||||
|
|
||||||
public sealed class FormButtonSubmit : ComponentBase {
|
public sealed class FormButtonSubmit : ComponentBase {
|
||||||
[Parameter]
|
[Parameter]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@using Phantom.Server.Web.Components.Utils
|
@using Phantom.Web.Components.Utils
|
||||||
@if (Label != null) {
|
@if (Label != null) {
|
||||||
<label for="@Id" class="form-label">@Label</label>
|
<label for="@Id" class="form-label">@Label</label>
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Components.Forms;
|
using Microsoft.AspNetCore.Components.Forms;
|
||||||
using Phantom.Server.Web.Components.Utils;
|
using Phantom.Web.Components.Utils;
|
||||||
|
|
||||||
namespace Phantom.Server.Web.Components.Forms;
|
namespace Phantom.Web.Components.Forms;
|
||||||
|
|
||||||
public abstract class FormModel {
|
public abstract class FormModel {
|
||||||
public EditContext EditContext { get; }
|
public EditContext EditContext { get; }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Web.Components.Forms;
|
namespace Phantom.Web.Components.Forms;
|
||||||
|
|
||||||
public enum FormNumberInputType {
|
public enum FormNumberInputType {
|
||||||
Number,
|
Number,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@using Phantom.Server.Web.Components.Utils
|
@using Phantom.Web.Components.Utils
|
||||||
@if (messageLines.Length > 0) {
|
@if (messageLines.Length > 0) {
|
||||||
<div class="form-submit-errors text-danger">
|
<div class="form-submit-errors text-danger">
|
||||||
@for (int i = 0; i < messageLines.Length; i++) {
|
@for (int i = 0; i < messageLines.Length; i++) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Phantom.Server.Web.Components.Forms;
|
namespace Phantom.Web.Components.Forms;
|
||||||
|
|
||||||
public enum FormTextInputType {
|
public enum FormTextInputType {
|
||||||
Text,
|
Text,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user