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 Fleets { get; } = []; public List TaskForces { get; } = []; public List StationGroups { get; } = []; public List EconomicRegions { get; } = []; public List Fronts { get; } = []; public List Reserves { get; } = []; public List Policies { get; } = []; public List AutomationPolicies { get; } = []; public List ReinforcementPolicies { get; } = []; public List ProductionPrograms { get; } = []; public List Directives { get; } = []; public List Assignments { get; } = []; public List DecisionLog { get; } = []; public List Alerts { get; } = []; public string LastDeltaSignature { get; set; } = string.Empty; } public sealed class PlayerAssetRegistryRuntime { public HashSet ShipIds { get; } = new(StringComparer.Ordinal); public HashSet StationIds { get; } = new(StringComparer.Ordinal); public HashSet CommanderIds { get; } = new(StringComparer.Ordinal); public HashSet ClaimIds { get; } = new(StringComparer.Ordinal); public HashSet ConstructionSiteIds { get; } = new(StringComparer.Ordinal); public HashSet PolicySetIds { get; } = new(StringComparer.Ordinal); public HashSet MarketOrderIds { get; } = new(StringComparer.Ordinal); public HashSet FleetIds { get; } = new(StringComparer.Ordinal); public HashSet TaskForceIds { get; } = new(StringComparer.Ordinal); public HashSet StationGroupIds { get; } = new(StringComparer.Ordinal); public HashSet EconomicRegionIds { get; } = new(StringComparer.Ordinal); public HashSet FrontIds { get; } = new(StringComparer.Ordinal); public HashSet 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 AssetIds { get; } = []; public List TaskForceIds { get; } = []; public List 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 AssetIds { get; } = []; public List 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 StationIds { get; } = []; public List DirectiveIds { get; } = []; public List 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 SystemIds { get; } = []; public List StationGroupIds { get; } = []; public List 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 SystemIds { get; } = []; public List FleetIds { get; } = []; public List ReserveIds { get; } = []; public List 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 AssetIds { get; } = []; public List 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 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 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 PatrolPoints { get; } = []; public List 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; }