feat: massive AI generation
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class CreatePlayerOrganizationHandler(WorldService worldService) : Endpoint<PlayerOrganizationCommandRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/player-faction/organizations");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(PlayerOrganizationCommandRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
var snapshot = worldService.CreatePlayerOrganization(request);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
AddError(ex.Message);
|
||||
await SendErrorsAsync(cancellation: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class DeletePlayerDirectiveRequest
|
||||
{
|
||||
public string DirectiveId { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class DeletePlayerDirectiveHandler(WorldService worldService) : Endpoint<DeletePlayerDirectiveRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Delete("/api/player-faction/directives/{directiveId}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(DeletePlayerDirectiveRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
var snapshot = worldService.DeletePlayerDirective(request.DirectiveId);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class DeletePlayerOrganizationRequest
|
||||
{
|
||||
public string OrganizationId { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class DeletePlayerOrganizationHandler(WorldService worldService) : Endpoint<DeletePlayerOrganizationRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Delete("/api/player-faction/organizations/{organizationId}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(DeletePlayerOrganizationRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
var snapshot = worldService.DeletePlayerOrganization(request.OrganizationId);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
AddError(ex.Message);
|
||||
await SendErrorsAsync(cancellation: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
24
apps/backend/PlayerFaction/Api/GetPlayerFactionHandler.cs
Normal file
24
apps/backend/PlayerFaction/Api/GetPlayerFactionHandler.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class GetPlayerFactionHandler(WorldService worldService) : EndpointWithoutRequest<PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Get("/api/player-faction");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var snapshot = worldService.GetPlayerFaction();
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class UpdatePlayerOrganizationMembershipHandler(WorldService worldService) : Endpoint<PlayerOrganizationMembershipCommandRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Put("/api/player-faction/organizations/{organizationId}/membership");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(PlayerOrganizationMembershipCommandRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
var organizationId = Route<string>("organizationId");
|
||||
if (string.IsNullOrWhiteSpace(organizationId))
|
||||
{
|
||||
AddError("organizationId route parameter is required.");
|
||||
await SendErrorsAsync(cancellation: cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
var snapshot = worldService.UpdatePlayerOrganizationMembership(organizationId, request);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
AddError(ex.Message);
|
||||
await SendErrorsAsync(cancellation: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class UpdatePlayerStrategicIntentHandler(WorldService worldService) : Endpoint<PlayerStrategicIntentCommandRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Put("/api/player-faction/strategic-intent");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(PlayerStrategicIntentCommandRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
var snapshot = worldService.UpdatePlayerStrategicIntent(request);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class UpsertPlayerAssignmentHandler(WorldService worldService) : Endpoint<PlayerAssetAssignmentCommandRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Put("/api/player-faction/assets/{assetId}/assignment");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(PlayerAssetAssignmentCommandRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
var assetId = Route<string>("assetId");
|
||||
if (string.IsNullOrWhiteSpace(assetId))
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
var snapshot = worldService.UpsertPlayerAssignment(assetId, request);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class UpsertPlayerAutomationPolicyHandler(WorldService worldService) : Endpoint<PlayerAutomationPolicyCommandRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/player-faction/automation-policies");
|
||||
Put("/api/player-faction/automation-policies/{automationPolicyId}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(PlayerAutomationPolicyCommandRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
var automationPolicyId = Route<string?>("automationPolicyId");
|
||||
var snapshot = worldService.UpsertPlayerAutomationPolicy(string.IsNullOrWhiteSpace(automationPolicyId) ? null : automationPolicyId, request);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class UpsertPlayerDirectiveHandler(WorldService worldService) : Endpoint<PlayerDirectiveCommandRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/player-faction/directives");
|
||||
Put("/api/player-faction/directives/{directiveId}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(PlayerDirectiveCommandRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
var directiveId = Route<string?>("directiveId");
|
||||
var snapshot = worldService.UpsertPlayerDirective(string.IsNullOrWhiteSpace(directiveId) ? null : directiveId, request);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
}
|
||||
26
apps/backend/PlayerFaction/Api/UpsertPlayerPolicyHandler.cs
Normal file
26
apps/backend/PlayerFaction/Api/UpsertPlayerPolicyHandler.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class UpsertPlayerPolicyHandler(WorldService worldService) : Endpoint<PlayerPolicyCommandRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/player-faction/policies");
|
||||
Put("/api/player-faction/policies/{policyId}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(PlayerPolicyCommandRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
var policyId = Route<string?>("policyId");
|
||||
var snapshot = worldService.UpsertPlayerPolicy(string.IsNullOrWhiteSpace(policyId) ? null : policyId, request);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class UpsertPlayerProductionProgramHandler(WorldService worldService) : Endpoint<PlayerProductionProgramCommandRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/player-faction/production-programs");
|
||||
Put("/api/player-faction/production-programs/{productionProgramId}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(PlayerProductionProgramCommandRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
var productionProgramId = Route<string?>("productionProgramId");
|
||||
var snapshot = worldService.UpsertPlayerProductionProgram(string.IsNullOrWhiteSpace(productionProgramId) ? null : productionProgramId, request);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.PlayerFaction.Api;
|
||||
|
||||
public sealed class UpsertPlayerReinforcementPolicyHandler(WorldService worldService) : Endpoint<PlayerReinforcementPolicyCommandRequest, PlayerFactionSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/player-faction/reinforcement-policies");
|
||||
Put("/api/player-faction/reinforcement-policies/{reinforcementPolicyId}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(PlayerReinforcementPolicyCommandRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
var reinforcementPolicyId = Route<string?>("reinforcementPolicyId");
|
||||
var snapshot = worldService.UpsertPlayerReinforcementPolicy(string.IsNullOrWhiteSpace(reinforcementPolicyId) ? null : reinforcementPolicyId, request);
|
||||
if (snapshot is null)
|
||||
{
|
||||
await SendNotFoundAsync(cancellationToken);
|
||||
return;
|
||||
}
|
||||
|
||||
await SendOkAsync(snapshot, cancellationToken);
|
||||
}
|
||||
}
|
||||
271
apps/backend/PlayerFaction/Contracts/PlayerFaction.cs
Normal file
271
apps/backend/PlayerFaction/Contracts/PlayerFaction.cs
Normal file
@@ -0,0 +1,271 @@
|
||||
namespace SpaceGame.Api.PlayerFaction.Contracts;
|
||||
|
||||
public sealed record PlayerAssetRegistrySnapshot(
|
||||
IReadOnlyList<string> ShipIds,
|
||||
IReadOnlyList<string> StationIds,
|
||||
IReadOnlyList<string> CommanderIds,
|
||||
IReadOnlyList<string> ClaimIds,
|
||||
IReadOnlyList<string> ConstructionSiteIds,
|
||||
IReadOnlyList<string> PolicySetIds,
|
||||
IReadOnlyList<string> MarketOrderIds,
|
||||
IReadOnlyList<string> FleetIds,
|
||||
IReadOnlyList<string> TaskForceIds,
|
||||
IReadOnlyList<string> StationGroupIds,
|
||||
IReadOnlyList<string> EconomicRegionIds,
|
||||
IReadOnlyList<string> FrontIds,
|
||||
IReadOnlyList<string> ReserveIds);
|
||||
|
||||
public sealed record PlayerStrategicIntentSnapshot(
|
||||
string StrategicPosture,
|
||||
string EconomicPosture,
|
||||
string MilitaryPosture,
|
||||
string LogisticsPosture,
|
||||
float DesiredReserveRatio,
|
||||
bool AllowDelegatedCombatAutomation,
|
||||
bool AllowDelegatedEconomicAutomation,
|
||||
string? Notes);
|
||||
|
||||
public sealed record PlayerFleetSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Status,
|
||||
string Role,
|
||||
string? CommanderId,
|
||||
string? FrontId,
|
||||
string? HomeSystemId,
|
||||
string? HomeStationId,
|
||||
string? PolicyId,
|
||||
string? AutomationPolicyId,
|
||||
string? ReinforcementPolicyId,
|
||||
IReadOnlyList<string> AssetIds,
|
||||
IReadOnlyList<string> TaskForceIds,
|
||||
IReadOnlyList<string> DirectiveIds,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerTaskForceSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Status,
|
||||
string Role,
|
||||
string? FleetId,
|
||||
string? CommanderId,
|
||||
string? FrontId,
|
||||
string? PolicyId,
|
||||
string? AutomationPolicyId,
|
||||
IReadOnlyList<string> AssetIds,
|
||||
IReadOnlyList<string> DirectiveIds,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerStationGroupSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Status,
|
||||
string Role,
|
||||
string? EconomicRegionId,
|
||||
string? PolicyId,
|
||||
string? AutomationPolicyId,
|
||||
IReadOnlyList<string> StationIds,
|
||||
IReadOnlyList<string> DirectiveIds,
|
||||
IReadOnlyList<string> FocusItemIds,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerEconomicRegionSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Status,
|
||||
string Role,
|
||||
string? SharedEconomicRegionId,
|
||||
string? PolicyId,
|
||||
string? AutomationPolicyId,
|
||||
IReadOnlyList<string> SystemIds,
|
||||
IReadOnlyList<string> StationGroupIds,
|
||||
IReadOnlyList<string> DirectiveIds,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerFrontSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Status,
|
||||
float Priority,
|
||||
string Posture,
|
||||
string? SharedFrontLineId,
|
||||
string? TargetFactionId,
|
||||
IReadOnlyList<string> SystemIds,
|
||||
IReadOnlyList<string> FleetIds,
|
||||
IReadOnlyList<string> ReserveIds,
|
||||
IReadOnlyList<string> DirectiveIds,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerReserveGroupSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Status,
|
||||
string ReserveKind,
|
||||
string? HomeSystemId,
|
||||
string? PolicyId,
|
||||
IReadOnlyList<string> AssetIds,
|
||||
IReadOnlyList<string> FrontIds,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerFactionPolicySnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string ScopeKind,
|
||||
string? ScopeId,
|
||||
string? PolicySetId,
|
||||
bool AllowDelegatedCombat,
|
||||
bool AllowDelegatedTrade,
|
||||
float ReserveCreditsRatio,
|
||||
float ReserveMilitaryRatio,
|
||||
string TradeAccessPolicy,
|
||||
string DockingAccessPolicy,
|
||||
string ConstructionAccessPolicy,
|
||||
string OperationalRangePolicy,
|
||||
string CombatEngagementPolicy,
|
||||
bool AvoidHostileSystems,
|
||||
float FleeHullRatio,
|
||||
IReadOnlyList<string> BlacklistedSystemIds,
|
||||
string? Notes,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerAutomationPolicySnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string ScopeKind,
|
||||
string? ScopeId,
|
||||
bool Enabled,
|
||||
string BehaviorKind,
|
||||
bool UseOrders,
|
||||
string? StagingOrderKind,
|
||||
int MaxSystemRange,
|
||||
bool KnownStationsOnly,
|
||||
float Radius,
|
||||
float WaitSeconds,
|
||||
string? PreferredItemId,
|
||||
string? Notes,
|
||||
IReadOnlyList<ShipOrderTemplateSnapshot> RepeatOrders,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerReinforcementPolicySnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string ScopeKind,
|
||||
string? ScopeId,
|
||||
string ShipKind,
|
||||
int DesiredAssetCount,
|
||||
int MinimumReserveCount,
|
||||
bool AutoTransferReserves,
|
||||
bool AutoQueueProduction,
|
||||
string? SourceReserveId,
|
||||
string? TargetFrontId,
|
||||
string? Notes,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerProductionProgramSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Status,
|
||||
string Kind,
|
||||
string? TargetShipKind,
|
||||
string? TargetModuleId,
|
||||
string? TargetItemId,
|
||||
int TargetCount,
|
||||
int CurrentCount,
|
||||
string? StationGroupId,
|
||||
string? ReinforcementPolicyId,
|
||||
string? Notes,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerDirectiveSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string Status,
|
||||
string Kind,
|
||||
string ScopeKind,
|
||||
string ScopeId,
|
||||
string? TargetEntityId,
|
||||
string? TargetSystemId,
|
||||
Vector3Dto? TargetPosition,
|
||||
string? HomeSystemId,
|
||||
string? HomeStationId,
|
||||
string? SourceStationId,
|
||||
string? DestinationStationId,
|
||||
string BehaviorKind,
|
||||
bool UseOrders,
|
||||
string? StagingOrderKind,
|
||||
string? ItemId,
|
||||
string? PreferredNodeId,
|
||||
string? PreferredConstructionSiteId,
|
||||
string? PreferredModuleId,
|
||||
int Priority,
|
||||
float Radius,
|
||||
float WaitSeconds,
|
||||
int MaxSystemRange,
|
||||
bool KnownStationsOnly,
|
||||
IReadOnlyList<Vector3Dto> PatrolPoints,
|
||||
IReadOnlyList<ShipOrderTemplateSnapshot> RepeatOrders,
|
||||
string? PolicyId,
|
||||
string? AutomationPolicyId,
|
||||
string? Notes,
|
||||
DateTimeOffset CreatedAtUtc,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerAssignmentSnapshot(
|
||||
string Id,
|
||||
string AssetKind,
|
||||
string AssetId,
|
||||
string? FleetId,
|
||||
string? TaskForceId,
|
||||
string? StationGroupId,
|
||||
string? EconomicRegionId,
|
||||
string? FrontId,
|
||||
string? ReserveId,
|
||||
string? DirectiveId,
|
||||
string? PolicyId,
|
||||
string? AutomationPolicyId,
|
||||
string Role,
|
||||
string Status,
|
||||
DateTimeOffset UpdatedAtUtc);
|
||||
|
||||
public sealed record PlayerDecisionLogEntrySnapshot(
|
||||
string Id,
|
||||
string Kind,
|
||||
string Summary,
|
||||
string? RelatedEntityKind,
|
||||
string? RelatedEntityId,
|
||||
DateTimeOffset OccurredAtUtc);
|
||||
|
||||
public sealed record PlayerAlertSnapshot(
|
||||
string Id,
|
||||
string Kind,
|
||||
string Severity,
|
||||
string Summary,
|
||||
string? AssetKind,
|
||||
string? AssetId,
|
||||
string? RelatedDirectiveId,
|
||||
string Status,
|
||||
DateTimeOffset CreatedAtUtc);
|
||||
|
||||
public sealed record PlayerFactionSnapshot(
|
||||
string Id,
|
||||
string Label,
|
||||
string SovereignFactionId,
|
||||
string Status,
|
||||
DateTimeOffset CreatedAtUtc,
|
||||
DateTimeOffset UpdatedAtUtc,
|
||||
PlayerAssetRegistrySnapshot AssetRegistry,
|
||||
PlayerStrategicIntentSnapshot StrategicIntent,
|
||||
IReadOnlyList<PlayerFleetSnapshot> Fleets,
|
||||
IReadOnlyList<PlayerTaskForceSnapshot> TaskForces,
|
||||
IReadOnlyList<PlayerStationGroupSnapshot> StationGroups,
|
||||
IReadOnlyList<PlayerEconomicRegionSnapshot> EconomicRegions,
|
||||
IReadOnlyList<PlayerFrontSnapshot> Fronts,
|
||||
IReadOnlyList<PlayerReserveGroupSnapshot> Reserves,
|
||||
IReadOnlyList<PlayerFactionPolicySnapshot> Policies,
|
||||
IReadOnlyList<PlayerAutomationPolicySnapshot> AutomationPolicies,
|
||||
IReadOnlyList<PlayerReinforcementPolicySnapshot> ReinforcementPolicies,
|
||||
IReadOnlyList<PlayerProductionProgramSnapshot> ProductionPrograms,
|
||||
IReadOnlyList<PlayerDirectiveSnapshot> Directives,
|
||||
IReadOnlyList<PlayerAssignmentSnapshot> Assignments,
|
||||
IReadOnlyList<PlayerDecisionLogEntrySnapshot> DecisionLog,
|
||||
IReadOnlyList<PlayerAlertSnapshot> Alerts);
|
||||
140
apps/backend/PlayerFaction/Contracts/PlayerFactionCommands.cs
Normal file
140
apps/backend/PlayerFaction/Contracts/PlayerFactionCommands.cs
Normal file
@@ -0,0 +1,140 @@
|
||||
namespace SpaceGame.Api.PlayerFaction.Contracts;
|
||||
|
||||
public sealed record PlayerOrganizationCommandRequest(
|
||||
string Kind,
|
||||
string Label,
|
||||
string? ParentOrganizationId,
|
||||
string? FrontId,
|
||||
string? HomeSystemId,
|
||||
string? HomeStationId,
|
||||
string? PolicyId,
|
||||
string? AutomationPolicyId,
|
||||
string? ReinforcementPolicyId,
|
||||
string? TargetFactionId,
|
||||
float? Priority,
|
||||
string? Role,
|
||||
string? ReserveKind,
|
||||
IReadOnlyList<string>? SystemIds,
|
||||
IReadOnlyList<string>? FocusItemIds,
|
||||
string? Notes);
|
||||
|
||||
public sealed record PlayerOrganizationMembershipCommandRequest(
|
||||
IReadOnlyList<string>? AssetIds,
|
||||
IReadOnlyList<string>? ChildOrganizationIds,
|
||||
IReadOnlyList<string>? SystemIds,
|
||||
IReadOnlyList<string>? FrontIds,
|
||||
bool Replace = false);
|
||||
|
||||
public sealed record PlayerDirectiveCommandRequest(
|
||||
string Label,
|
||||
string Kind,
|
||||
string ScopeKind,
|
||||
string ScopeId,
|
||||
string BehaviorKind,
|
||||
bool UseOrders,
|
||||
string? StagingOrderKind,
|
||||
string? TargetEntityId,
|
||||
string? TargetSystemId,
|
||||
Vector3Dto? TargetPosition,
|
||||
string? HomeSystemId,
|
||||
string? HomeStationId,
|
||||
string? SourceStationId,
|
||||
string? DestinationStationId,
|
||||
string? ItemId,
|
||||
string? PreferredNodeId,
|
||||
string? PreferredConstructionSiteId,
|
||||
string? PreferredModuleId,
|
||||
int Priority,
|
||||
float? Radius,
|
||||
float? WaitSeconds,
|
||||
int? MaxSystemRange,
|
||||
bool? KnownStationsOnly,
|
||||
IReadOnlyList<Vector3Dto>? PatrolPoints,
|
||||
IReadOnlyList<ShipOrderTemplateCommandRequest>? RepeatOrders,
|
||||
string? PolicyId,
|
||||
string? AutomationPolicyId,
|
||||
string? Notes);
|
||||
|
||||
public sealed record PlayerPolicyCommandRequest(
|
||||
string Label,
|
||||
string ScopeKind,
|
||||
string? ScopeId,
|
||||
string? PolicySetId,
|
||||
bool AllowDelegatedCombat,
|
||||
bool AllowDelegatedTrade,
|
||||
float ReserveCreditsRatio,
|
||||
float ReserveMilitaryRatio,
|
||||
string? Notes,
|
||||
string? TradeAccessPolicy,
|
||||
string? DockingAccessPolicy,
|
||||
string? ConstructionAccessPolicy,
|
||||
string? OperationalRangePolicy,
|
||||
string? CombatEngagementPolicy,
|
||||
bool? AvoidHostileSystems,
|
||||
float? FleeHullRatio,
|
||||
IReadOnlyList<string>? BlacklistedSystemIds);
|
||||
|
||||
public sealed record PlayerAutomationPolicyCommandRequest(
|
||||
string Label,
|
||||
string ScopeKind,
|
||||
string? ScopeId,
|
||||
bool Enabled,
|
||||
string BehaviorKind,
|
||||
bool UseOrders,
|
||||
string? StagingOrderKind,
|
||||
int MaxSystemRange,
|
||||
bool KnownStationsOnly,
|
||||
float Radius,
|
||||
float WaitSeconds,
|
||||
string? PreferredItemId,
|
||||
string? Notes,
|
||||
IReadOnlyList<ShipOrderTemplateCommandRequest>? RepeatOrders);
|
||||
|
||||
public sealed record PlayerReinforcementPolicyCommandRequest(
|
||||
string Label,
|
||||
string ScopeKind,
|
||||
string? ScopeId,
|
||||
string ShipKind,
|
||||
int DesiredAssetCount,
|
||||
int MinimumReserveCount,
|
||||
bool AutoTransferReserves,
|
||||
bool AutoQueueProduction,
|
||||
string? SourceReserveId,
|
||||
string? TargetFrontId,
|
||||
string? Notes);
|
||||
|
||||
public sealed record PlayerProductionProgramCommandRequest(
|
||||
string Label,
|
||||
string Kind,
|
||||
string? TargetShipKind,
|
||||
string? TargetModuleId,
|
||||
string? TargetItemId,
|
||||
int TargetCount,
|
||||
string? StationGroupId,
|
||||
string? ReinforcementPolicyId,
|
||||
string? Notes);
|
||||
|
||||
public sealed record PlayerAssetAssignmentCommandRequest(
|
||||
string AssetKind,
|
||||
string AssetId,
|
||||
string? FleetId,
|
||||
string? TaskForceId,
|
||||
string? StationGroupId,
|
||||
string? EconomicRegionId,
|
||||
string? FrontId,
|
||||
string? ReserveId,
|
||||
string? DirectiveId,
|
||||
string? PolicyId,
|
||||
string? AutomationPolicyId,
|
||||
string Role,
|
||||
bool ClearConflicts = true);
|
||||
|
||||
public sealed record PlayerStrategicIntentCommandRequest(
|
||||
string StrategicPosture,
|
||||
string EconomicPosture,
|
||||
string MilitaryPosture,
|
||||
string LogisticsPosture,
|
||||
float DesiredReserveRatio,
|
||||
bool AllowDelegatedCombatAutomation,
|
||||
bool AllowDelegatedEconomicAutomation,
|
||||
string? Notes);
|
||||
306
apps/backend/PlayerFaction/Runtime/PlayerFactionRuntimeModels.cs
Normal file
306
apps/backend/PlayerFaction/Runtime/PlayerFactionRuntimeModels.cs
Normal file
@@ -0,0 +1,306 @@
|
||||
namespace SpaceGame.Api.PlayerFaction.Runtime;
|
||||
|
||||
public sealed class PlayerFactionRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public required string SovereignFactionId { get; set; }
|
||||
public string Status { get; set; } = "active";
|
||||
public DateTimeOffset CreatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
public PlayerAssetRegistryRuntime AssetRegistry { get; set; } = new();
|
||||
public PlayerStrategicIntentRuntime StrategicIntent { get; set; } = new();
|
||||
public List<PlayerFleetRuntime> Fleets { get; } = [];
|
||||
public List<PlayerTaskForceRuntime> TaskForces { get; } = [];
|
||||
public List<PlayerStationGroupRuntime> StationGroups { get; } = [];
|
||||
public List<PlayerEconomicRegionRuntime> EconomicRegions { get; } = [];
|
||||
public List<PlayerFrontRuntime> Fronts { get; } = [];
|
||||
public List<PlayerReserveGroupRuntime> Reserves { get; } = [];
|
||||
public List<PlayerFactionPolicyRuntime> Policies { get; } = [];
|
||||
public List<PlayerAutomationPolicyRuntime> AutomationPolicies { get; } = [];
|
||||
public List<PlayerReinforcementPolicyRuntime> ReinforcementPolicies { get; } = [];
|
||||
public List<PlayerProductionProgramRuntime> ProductionPrograms { get; } = [];
|
||||
public List<PlayerDirectiveRuntime> Directives { get; } = [];
|
||||
public List<PlayerAssignmentRuntime> Assignments { get; } = [];
|
||||
public List<PlayerDecisionLogEntryRuntime> DecisionLog { get; } = [];
|
||||
public List<PlayerAlertRuntime> Alerts { get; } = [];
|
||||
public string LastDeltaSignature { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class PlayerAssetRegistryRuntime
|
||||
{
|
||||
public HashSet<string> ShipIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> StationIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> CommanderIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> ClaimIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> ConstructionSiteIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> PolicySetIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> MarketOrderIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> FleetIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> TaskForceIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> StationGroupIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> EconomicRegionIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> FrontIds { get; } = new(StringComparer.Ordinal);
|
||||
public HashSet<string> ReserveIds { get; } = new(StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
public sealed class PlayerStrategicIntentRuntime
|
||||
{
|
||||
public string StrategicPosture { get; set; } = "balanced";
|
||||
public string EconomicPosture { get; set; } = "delegated";
|
||||
public string MilitaryPosture { get; set; } = "layered-defense";
|
||||
public string LogisticsPosture { get; set; } = "stable";
|
||||
public float DesiredReserveRatio { get; set; } = 0.2f;
|
||||
public bool AllowDelegatedCombatAutomation { get; set; } = true;
|
||||
public bool AllowDelegatedEconomicAutomation { get; set; } = true;
|
||||
public string? Notes { get; set; }
|
||||
}
|
||||
|
||||
public sealed class PlayerFleetRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string Status { get; set; } = "active";
|
||||
public string Role { get; set; } = "general-purpose";
|
||||
public string? CommanderId { get; set; }
|
||||
public string? FrontId { get; set; }
|
||||
public string? HomeSystemId { get; set; }
|
||||
public string? HomeStationId { get; set; }
|
||||
public string? PolicyId { get; set; }
|
||||
public string? AutomationPolicyId { get; set; }
|
||||
public string? ReinforcementPolicyId { get; set; }
|
||||
public List<string> AssetIds { get; } = [];
|
||||
public List<string> TaskForceIds { get; } = [];
|
||||
public List<string> DirectiveIds { get; } = [];
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerTaskForceRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string Status { get; set; } = "active";
|
||||
public string Role { get; set; } = "task-force";
|
||||
public string? FleetId { get; set; }
|
||||
public string? CommanderId { get; set; }
|
||||
public string? FrontId { get; set; }
|
||||
public string? PolicyId { get; set; }
|
||||
public string? AutomationPolicyId { get; set; }
|
||||
public List<string> AssetIds { get; } = [];
|
||||
public List<string> DirectiveIds { get; } = [];
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerStationGroupRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string Status { get; set; } = "active";
|
||||
public string Role { get; set; } = "industrial-group";
|
||||
public string? EconomicRegionId { get; set; }
|
||||
public string? PolicyId { get; set; }
|
||||
public string? AutomationPolicyId { get; set; }
|
||||
public List<string> StationIds { get; } = [];
|
||||
public List<string> DirectiveIds { get; } = [];
|
||||
public List<string> FocusItemIds { get; } = [];
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerEconomicRegionRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string Status { get; set; } = "active";
|
||||
public string Role { get; set; } = "balanced-region";
|
||||
public string? SharedEconomicRegionId { get; set; }
|
||||
public string? PolicyId { get; set; }
|
||||
public string? AutomationPolicyId { get; set; }
|
||||
public List<string> SystemIds { get; } = [];
|
||||
public List<string> StationGroupIds { get; } = [];
|
||||
public List<string> DirectiveIds { get; } = [];
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerFrontRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string Status { get; set; } = "active";
|
||||
public float Priority { get; set; } = 50f;
|
||||
public string Posture { get; set; } = "hold";
|
||||
public string? SharedFrontLineId { get; set; }
|
||||
public string? TargetFactionId { get; set; }
|
||||
public List<string> SystemIds { get; } = [];
|
||||
public List<string> FleetIds { get; } = [];
|
||||
public List<string> ReserveIds { get; } = [];
|
||||
public List<string> DirectiveIds { get; } = [];
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerReserveGroupRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string Status { get; set; } = "ready";
|
||||
public string ReserveKind { get; set; } = "military";
|
||||
public string? HomeSystemId { get; set; }
|
||||
public string? PolicyId { get; set; }
|
||||
public List<string> AssetIds { get; } = [];
|
||||
public List<string> FrontIds { get; } = [];
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerFactionPolicyRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string ScopeKind { get; set; } = "player-faction";
|
||||
public string? ScopeId { get; set; }
|
||||
public string? PolicySetId { get; set; }
|
||||
public bool AllowDelegatedCombat { get; set; } = true;
|
||||
public bool AllowDelegatedTrade { get; set; } = true;
|
||||
public float ReserveCreditsRatio { get; set; } = 0.2f;
|
||||
public float ReserveMilitaryRatio { get; set; } = 0.2f;
|
||||
public string TradeAccessPolicy { get; set; } = "owner-and-allies";
|
||||
public string DockingAccessPolicy { get; set; } = "owner-and-allies";
|
||||
public string ConstructionAccessPolicy { get; set; } = "owner-only";
|
||||
public string OperationalRangePolicy { get; set; } = "unrestricted";
|
||||
public string CombatEngagementPolicy { get; set; } = "defensive";
|
||||
public bool AvoidHostileSystems { get; set; } = true;
|
||||
public float FleeHullRatio { get; set; } = 0.35f;
|
||||
public HashSet<string> BlacklistedSystemIds { get; } = new(StringComparer.Ordinal);
|
||||
public string? Notes { get; set; }
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerAutomationPolicyRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string ScopeKind { get; set; } = "player-faction";
|
||||
public string? ScopeId { get; set; }
|
||||
public bool Enabled { get; set; } = true;
|
||||
public string BehaviorKind { get; set; } = "idle";
|
||||
public bool UseOrders { get; set; }
|
||||
public string? StagingOrderKind { get; set; }
|
||||
public int MaxSystemRange { get; set; }
|
||||
public bool KnownStationsOnly { get; set; }
|
||||
public float Radius { get; set; } = 24f;
|
||||
public float WaitSeconds { get; set; } = 3f;
|
||||
public string? PreferredItemId { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public List<ShipOrderTemplateRuntime> RepeatOrders { get; } = [];
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerReinforcementPolicyRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string ScopeKind { get; set; } = "player-faction";
|
||||
public string? ScopeId { get; set; }
|
||||
public string ShipKind { get; set; } = "military";
|
||||
public int DesiredAssetCount { get; set; }
|
||||
public int MinimumReserveCount { get; set; }
|
||||
public bool AutoTransferReserves { get; set; } = true;
|
||||
public bool AutoQueueProduction { get; set; } = true;
|
||||
public string? SourceReserveId { get; set; }
|
||||
public string? TargetFrontId { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerProductionProgramRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string Status { get; set; } = "active";
|
||||
public string Kind { get; set; } = "ship-production";
|
||||
public string? TargetShipKind { get; set; }
|
||||
public string? TargetModuleId { get; set; }
|
||||
public string? TargetItemId { get; set; }
|
||||
public int TargetCount { get; set; }
|
||||
public int CurrentCount { get; set; }
|
||||
public string? StationGroupId { get; set; }
|
||||
public string? ReinforcementPolicyId { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerDirectiveRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Label { get; set; }
|
||||
public string Status { get; set; } = "active";
|
||||
public string Kind { get; set; } = "hold";
|
||||
public string ScopeKind { get; set; } = "asset";
|
||||
public string ScopeId { get; set; } = string.Empty;
|
||||
public string? TargetEntityId { get; set; }
|
||||
public string? TargetSystemId { get; set; }
|
||||
public Vector3? TargetPosition { get; set; }
|
||||
public string? HomeSystemId { get; set; }
|
||||
public string? HomeStationId { get; set; }
|
||||
public string? SourceStationId { get; set; }
|
||||
public string? DestinationStationId { get; set; }
|
||||
public string BehaviorKind { get; set; } = "idle";
|
||||
public bool UseOrders { get; set; }
|
||||
public string? StagingOrderKind { get; set; }
|
||||
public string? ItemId { get; set; }
|
||||
public string? PreferredNodeId { get; set; }
|
||||
public string? PreferredConstructionSiteId { get; set; }
|
||||
public string? PreferredModuleId { get; set; }
|
||||
public int Priority { get; set; } = 50;
|
||||
public float Radius { get; set; } = 24f;
|
||||
public float WaitSeconds { get; set; } = 3f;
|
||||
public int MaxSystemRange { get; set; }
|
||||
public bool KnownStationsOnly { get; set; }
|
||||
public List<Vector3> PatrolPoints { get; } = [];
|
||||
public List<ShipOrderTemplateRuntime> RepeatOrders { get; } = [];
|
||||
public string? PolicyId { get; set; }
|
||||
public string? AutomationPolicyId { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public DateTimeOffset CreatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerAssignmentRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string AssetKind { get; set; }
|
||||
public required string AssetId { get; set; }
|
||||
public string? FleetId { get; set; }
|
||||
public string? TaskForceId { get; set; }
|
||||
public string? StationGroupId { get; set; }
|
||||
public string? EconomicRegionId { get; set; }
|
||||
public string? FrontId { get; set; }
|
||||
public string? ReserveId { get; set; }
|
||||
public string? DirectiveId { get; set; }
|
||||
public string? PolicyId { get; set; }
|
||||
public string? AutomationPolicyId { get; set; }
|
||||
public string Role { get; set; } = "line";
|
||||
public string Status { get; set; } = "active";
|
||||
public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerDecisionLogEntryRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Kind { get; set; }
|
||||
public required string Summary { get; set; }
|
||||
public string? RelatedEntityKind { get; set; }
|
||||
public string? RelatedEntityId { get; set; }
|
||||
public DateTimeOffset OccurredAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class PlayerAlertRuntime
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string Kind { get; set; }
|
||||
public required string Severity { get; set; }
|
||||
public required string Summary { get; set; }
|
||||
public string? AssetKind { get; set; }
|
||||
public string? AssetId { get; set; }
|
||||
public string? RelatedDirectiveId { get; set; }
|
||||
public string Status { get; set; } = "open";
|
||||
public DateTimeOffset CreatedAtUtc { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
2441
apps/backend/PlayerFaction/Simulation/PlayerFactionService.cs
Normal file
2441
apps/backend/PlayerFaction/Simulation/PlayerFactionService.cs
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user