refactor(backend): align api namespaces and project name
This commit is contained in:
58
apps/backend/Contracts/World.cs
Normal file
58
apps/backend/Contracts/World.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
namespace SpaceGame.Api.Contracts;
|
||||
|
||||
public sealed record WorldSnapshot(
|
||||
string Label,
|
||||
int Seed,
|
||||
long Sequence,
|
||||
int TickIntervalMs,
|
||||
double OrbitalTimeSeconds,
|
||||
OrbitalSimulationSnapshot OrbitalSimulation,
|
||||
DateTimeOffset GeneratedAtUtc,
|
||||
IReadOnlyList<SystemSnapshot> Systems,
|
||||
IReadOnlyList<CelestialSnapshot> Celestials,
|
||||
IReadOnlyList<ResourceNodeSnapshot> Nodes,
|
||||
IReadOnlyList<StationSnapshot> Stations,
|
||||
IReadOnlyList<ClaimSnapshot> Claims,
|
||||
IReadOnlyList<ConstructionSiteSnapshot> ConstructionSites,
|
||||
IReadOnlyList<MarketOrderSnapshot> MarketOrders,
|
||||
IReadOnlyList<PolicySetSnapshot> Policies,
|
||||
IReadOnlyList<ShipSnapshot> Ships,
|
||||
IReadOnlyList<FactionSnapshot> Factions);
|
||||
|
||||
public sealed record WorldDelta(
|
||||
long Sequence,
|
||||
int TickIntervalMs,
|
||||
double OrbitalTimeSeconds,
|
||||
OrbitalSimulationSnapshot OrbitalSimulation,
|
||||
DateTimeOffset GeneratedAtUtc,
|
||||
bool RequiresSnapshotRefresh,
|
||||
IReadOnlyList<SimulationEventRecord> Events,
|
||||
IReadOnlyList<CelestialDelta> Celestials,
|
||||
IReadOnlyList<ResourceNodeDelta> Nodes,
|
||||
IReadOnlyList<StationDelta> Stations,
|
||||
IReadOnlyList<ClaimDelta> Claims,
|
||||
IReadOnlyList<ConstructionSiteDelta> ConstructionSites,
|
||||
IReadOnlyList<MarketOrderDelta> MarketOrders,
|
||||
IReadOnlyList<PolicySetDelta> Policies,
|
||||
IReadOnlyList<ShipDelta> Ships,
|
||||
IReadOnlyList<FactionDelta> Factions,
|
||||
ObserverScope? Scope = null);
|
||||
|
||||
public sealed record SimulationEventRecord(
|
||||
string EntityKind,
|
||||
string EntityId,
|
||||
string Kind,
|
||||
string Message,
|
||||
DateTimeOffset OccurredAtUtc,
|
||||
string Family = "simulation",
|
||||
string ScopeKind = "universe",
|
||||
string? ScopeEntityId = null,
|
||||
string Visibility = "public");
|
||||
|
||||
public sealed record ObserverScope(
|
||||
string ScopeKind,
|
||||
string? SystemId = null,
|
||||
string? CelestialId = null);
|
||||
|
||||
public sealed record OrbitalSimulationSnapshot(
|
||||
double SimulatedSecondsPerRealSecond);
|
||||
Reference in New Issue
Block a user