namespace SpaceGame.Api.Geopolitics.Runtime; public sealed class GeopoliticalStateRuntime { public int Cycle { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List Routes { get; } = []; public DiplomaticStateRuntime Diplomacy { get; set; } = new(); public TerritoryStateRuntime Territory { get; set; } = new(); public EconomyRegionStateRuntime EconomyRegions { get; set; } = new(); public string LastDeltaSignature { get; set; } = string.Empty; } public sealed class SystemRouteLinkRuntime { public required string Id { get; init; } public required string SourceSystemId { get; set; } public required string DestinationSystemId { get; set; } public float Distance { get; set; } public bool IsPrimaryLane { get; set; } = true; } public sealed class DiplomaticStateRuntime { public List Relations { get; } = []; public List Treaties { get; } = []; public List Incidents { get; } = []; public List BorderTensions { get; } = []; public List Wars { get; } = []; } public sealed class DiplomaticRelationRuntime { public required string Id { get; init; } public required string FactionAId { get; set; } public required string FactionBId { get; set; } public string Status { get; set; } = "active"; public string Posture { get; set; } = "neutral"; public float TrustScore { get; set; } public float TensionScore { get; set; } public float GrievanceScore { get; set; } public string TradeAccessPolicy { get; set; } = "restricted"; public string MilitaryAccessPolicy { get; set; } = "restricted"; public string? WarStateId { get; set; } public DateTimeOffset? CeasefireUntilUtc { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List ActiveTreatyIds { get; } = []; public List ActiveIncidentIds { get; } = []; } public sealed class TreatyRuntime { public required string Id { get; init; } public required string Kind { get; set; } public string Status { get; set; } = "active"; public string TradeAccessPolicy { get; set; } = "restricted"; public string MilitaryAccessPolicy { get; set; } = "restricted"; public string? Summary { get; set; } public DateTimeOffset CreatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List FactionIds { get; } = []; } public sealed class DiplomaticIncidentRuntime { public required string Id { get; init; } public required string Kind { get; set; } public string Status { get; set; } = "active"; public required string SourceFactionId { get; set; } public required string TargetFactionId { get; set; } public string? SystemId { get; set; } public string? BorderEdgeId { get; set; } public required string Summary { get; set; } public float Severity { get; set; } public float EscalationScore { get; set; } public DateTimeOffset CreatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public DateTimeOffset LastObservedAtUtc { get; set; } = DateTimeOffset.UtcNow; } public sealed class BorderTensionRuntime { public required string Id { get; init; } public required string RelationId { get; set; } public required string BorderEdgeId { get; set; } public required string FactionAId { get; set; } public required string FactionBId { get; set; } public string Status { get; set; } = "active"; public float TensionScore { get; set; } public float IncidentScore { get; set; } public float MilitaryPressure { get; set; } public float AccessFriction { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List SystemIds { get; } = []; } public sealed class WarStateRuntime { public required string Id { get; init; } public required string RelationId { get; set; } public required string FactionAId { get; set; } public required string FactionBId { get; set; } public string Status { get; set; } = "active"; public string WarGoal { get; set; } = "territorial-pressure"; public float EscalationScore { get; set; } public DateTimeOffset StartedAtUtc { get; set; } = DateTimeOffset.UtcNow; public DateTimeOffset? CeasefireUntilUtc { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List ActiveFrontLineIds { get; } = []; } public sealed class TerritoryStateRuntime { public List Claims { get; } = []; public List Influences { get; } = []; public List ControlStates { get; } = []; public List StrategicProfiles { get; } = []; public List BorderEdges { get; } = []; public List FrontLines { get; } = []; public List Zones { get; } = []; public List Pressures { get; } = []; } public sealed class TerritoryClaimRuntime { public required string Id { get; init; } public string? SourceClaimId { get; set; } public required string FactionId { get; set; } public required string SystemId { get; set; } public required string CelestialId { get; set; } public string Status { get; set; } = "active"; public string ClaimKind { get; set; } = "infrastructure"; public float ClaimStrength { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; } public sealed class TerritoryInfluenceRuntime { public required string Id { get; init; } public required string SystemId { get; set; } public required string FactionId { get; set; } public float ClaimStrength { get; set; } public float AssetStrength { get; set; } public float LogisticsStrength { get; set; } public float TotalInfluence { get; set; } public bool IsContesting { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; } public sealed class TerritoryControlStateRuntime { public required string SystemId { get; init; } public string? ControllerFactionId { get; set; } public string? PrimaryClaimantFactionId { get; set; } public string ControlKind { get; set; } = "unclaimed"; public bool IsContested { get; set; } public float ControlScore { get; set; } public float StrategicValue { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List ClaimantFactionIds { get; } = []; public List InfluencingFactionIds { get; } = []; } public sealed class SectorStrategicProfileRuntime { public required string SystemId { get; init; } public string? ControllerFactionId { get; set; } public string ZoneKind { get; set; } = "unclaimed"; public bool IsContested { get; set; } public float StrategicValue { get; set; } public float SecurityRating { get; set; } public float TerritorialPressure { get; set; } public float LogisticsValue { get; set; } public string? EconomicRegionId { get; set; } public string? FrontLineId { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; } public sealed class BorderEdgeRuntime { public required string Id { get; init; } public required string SourceSystemId { get; set; } public required string DestinationSystemId { get; set; } public string? SourceFactionId { get; set; } public string? DestinationFactionId { get; set; } public bool IsContested { get; set; } public string? RelationId { get; set; } public float TensionScore { get; set; } public float CorridorImportance { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; } public sealed class FrontLineRuntime { public required string Id { get; init; } public string Kind { get; set; } = "border-front"; public string Status { get; set; } = "active"; public string? AnchorSystemId { get; set; } public float PressureScore { get; set; } public float SupplyRisk { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List FactionIds { get; } = []; public List SystemIds { get; } = []; public List BorderEdgeIds { get; } = []; } public sealed class TerritoryZoneRuntime { public required string Id { get; init; } public required string SystemId { get; set; } public string? FactionId { get; set; } public string Kind { get; set; } = "unclaimed"; public string Status { get; set; } = "active"; public string? Reason { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; } public sealed class TerritoryPressureRuntime { public required string Id { get; init; } public required string SystemId { get; set; } public string? FactionId { get; set; } public string Kind { get; set; } = "border-pressure"; public float PressureScore { get; set; } public float SecurityScore { get; set; } public float HostileInfluence { get; set; } public float CorridorRisk { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; } public sealed class EconomyRegionStateRuntime { public List Regions { get; } = []; public List SupplyNetworks { get; } = []; public List Corridors { get; } = []; public List ProductionProfiles { get; } = []; public List TradeBalances { get; } = []; public List Bottlenecks { get; } = []; public List SecurityAssessments { get; } = []; public List EconomicAssessments { get; } = []; } public sealed class EconomicRegionRuntime { public required string Id { get; init; } public string? FactionId { get; set; } public required string Label { get; set; } public string Kind { get; set; } = "balanced-region"; public string Status { get; set; } = "active"; public required string CoreSystemId { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List SystemIds { get; } = []; public List StationIds { get; } = []; public List FrontLineIds { get; } = []; public List CorridorIds { get; } = []; } public sealed class SupplyNetworkRuntime { public required string Id { get; init; } public required string RegionId { get; set; } public float ThroughputScore { get; set; } public float RiskScore { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List StationIds { get; } = []; public List ProducerItemIds { get; } = []; public List ConsumerItemIds { get; } = []; public List ConstructionItemIds { get; } = []; } public sealed class LogisticsCorridorRuntime { public required string Id { get; init; } public string? FactionId { get; set; } public string Kind { get; set; } = "supply-corridor"; public string Status { get; set; } = "active"; public float RiskScore { get; set; } public float ThroughputScore { get; set; } public string AccessState { get; set; } = "restricted"; public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List SystemPathIds { get; } = []; public List RegionIds { get; } = []; public List BorderEdgeIds { get; } = []; } public sealed class RegionalProductionProfileRuntime { public required string RegionId { get; set; } public string PrimaryIndustry { get; set; } = "mixed"; public int ShipyardCount { get; set; } public int StationCount { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; public List ProducedItemIds { get; } = []; public List ScarceItemIds { get; } = []; } public sealed class RegionalTradeBalanceRuntime { public required string RegionId { get; set; } public int ImportsRequiredCount { get; set; } public int ExportsSurplusCount { get; set; } public int CriticalShortageCount { get; set; } public float NetTradeScore { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; } public sealed class RegionalBottleneckRuntime { public required string Id { get; init; } public required string RegionId { get; set; } public required string ItemId { get; set; } public string Cause { get; set; } = "regional-shortage"; public string Status { get; set; } = "active"; public float Severity { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; } public sealed class RegionalSecurityAssessmentRuntime { public required string RegionId { get; set; } public float SupplyRisk { get; set; } public float BorderPressure { get; set; } public int ActiveWarCount { get; set; } public int HostileRelationCount { get; set; } public float AccessFriction { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; } public sealed class RegionalEconomicAssessmentRuntime { public required string RegionId { get; set; } public float SustainmentScore { get; set; } public float ProductionDepth { get; set; } public float ConstructionPressure { get; set; } public float CorridorDependency { get; set; } public DateTimeOffset UpdatedAtUtc { get; set; } = DateTimeOffset.UtcNow; }