Start typed state rebuild
This commit is contained in:
parent
ab2c294464
commit
89e91ff4d7
16 changed files with 476 additions and 0 deletions
20
Aetheria.State/Documents/AetheriaCorporation.cs
Normal file
20
Aetheria.State/Documents/AetheriaCorporation.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using GameCult.Caching;
|
||||
using MessagePack;
|
||||
|
||||
namespace Aetheria.State.Documents;
|
||||
|
||||
[CultDocument("aetheria.corporation", "aetheria.corporation.v1")]
|
||||
[MessagePackObject]
|
||||
public sealed class AetheriaCorporation
|
||||
{
|
||||
[Key(0)]
|
||||
[CultName]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
[Key(1)]
|
||||
[CultIndex("legacyId")]
|
||||
public string LegacyId { get; set; } = "";
|
||||
|
||||
[Key(2)]
|
||||
public string Description { get; set; } = "";
|
||||
}
|
||||
33
Aetheria.State/Documents/AetheriaItemDefinition.cs
Normal file
33
Aetheria.State/Documents/AetheriaItemDefinition.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using GameCult.Caching;
|
||||
using MessagePack;
|
||||
|
||||
namespace Aetheria.State.Documents;
|
||||
|
||||
[CultDocument("aetheria.item_definition", "aetheria.item_definition.v1")]
|
||||
[MessagePackObject]
|
||||
public sealed class AetheriaItemDefinition
|
||||
{
|
||||
[Key(0)]
|
||||
[CultName]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
[Key(1)]
|
||||
[CultIndex("category")]
|
||||
public string Category { get; set; } = "uncategorized";
|
||||
|
||||
[Key(2)]
|
||||
[CultIndex("legacyId")]
|
||||
public string LegacyId { get; set; } = "";
|
||||
|
||||
[Key(3)]
|
||||
public string Description { get; set; } = "";
|
||||
|
||||
[Key(4)]
|
||||
public double Mass { get; set; }
|
||||
|
||||
[Key(5)]
|
||||
public double Volume { get; set; }
|
||||
|
||||
[Key(6)]
|
||||
public string[] Tags { get; set; } = [];
|
||||
}
|
||||
39
Aetheria.State/Documents/AetheriaMigrationLedger.cs
Normal file
39
Aetheria.State/Documents/AetheriaMigrationLedger.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using GameCult.Caching;
|
||||
using MessagePack;
|
||||
|
||||
namespace Aetheria.State.Documents;
|
||||
|
||||
[CultDocument("aetheria.migration_ledger", "aetheria.migration_ledger.v1")]
|
||||
[CultGlobal]
|
||||
[MessagePackObject]
|
||||
public sealed class AetheriaMigrationLedger
|
||||
{
|
||||
[Key(0)]
|
||||
[CultName]
|
||||
public string Name { get; set; } = "Aetheria legacy migration ledger";
|
||||
|
||||
[Key(1)]
|
||||
public string Source { get; set; } = "";
|
||||
|
||||
[Key(2)]
|
||||
public string SourceFingerprint { get; set; } = "";
|
||||
|
||||
[Key(3)]
|
||||
public string LastMigrationAtUtc { get; set; } = "";
|
||||
|
||||
[Key(4)]
|
||||
public AetheriaMigrationCount[] Counts { get; set; } = [];
|
||||
|
||||
[Key(5)]
|
||||
public string[] Notes { get; set; } = [];
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
public sealed class AetheriaMigrationCount
|
||||
{
|
||||
[Key(0)]
|
||||
public string DocumentType { get; set; } = "";
|
||||
|
||||
[Key(1)]
|
||||
public int Count { get; set; }
|
||||
}
|
||||
25
Aetheria.State/Documents/AetheriaPlayerProfile.cs
Normal file
25
Aetheria.State/Documents/AetheriaPlayerProfile.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using GameCult.Caching;
|
||||
using MessagePack;
|
||||
|
||||
namespace Aetheria.State.Documents;
|
||||
|
||||
[CultDocument("aetheria.player_profile", "aetheria.player_profile.v1")]
|
||||
[MessagePackObject]
|
||||
public sealed class AetheriaPlayerProfile
|
||||
{
|
||||
[Key(0)]
|
||||
[CultName]
|
||||
public string Username { get; set; } = "";
|
||||
|
||||
[Key(1)]
|
||||
[CultIndex("legacyId")]
|
||||
public string LegacyId { get; set; } = "";
|
||||
|
||||
[Key(2)]
|
||||
[CultIndex("email")]
|
||||
public string Email { get; set; } = "";
|
||||
|
||||
[Key(3)]
|
||||
[CultReference(typeof(AetheriaCorporation))]
|
||||
public string CorporationKey { get; set; } = "";
|
||||
}
|
||||
23
Aetheria.State/Documents/AetheriaRuntimeSession.cs
Normal file
23
Aetheria.State/Documents/AetheriaRuntimeSession.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using GameCult.Caching;
|
||||
using MessagePack;
|
||||
|
||||
namespace Aetheria.State.Documents;
|
||||
|
||||
[CultDocument("aetheria.runtime_session", "aetheria.runtime_session.v1")]
|
||||
[MessagePackObject]
|
||||
public sealed class AetheriaRuntimeSession
|
||||
{
|
||||
[Key(0)]
|
||||
[CultName]
|
||||
public string RuntimeId { get; set; } = "";
|
||||
|
||||
[Key(1)]
|
||||
[CultIndex("role")]
|
||||
public string Role { get; set; } = "local";
|
||||
|
||||
[Key(2)]
|
||||
public string StartedAtUtc { get; set; } = "";
|
||||
|
||||
[Key(3)]
|
||||
public string LastSeenAtUtc { get; set; } = "";
|
||||
}
|
||||
27
Aetheria.State/Documents/AetheriaWorldState.cs
Normal file
27
Aetheria.State/Documents/AetheriaWorldState.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using GameCult.Caching;
|
||||
using MessagePack;
|
||||
|
||||
namespace Aetheria.State.Documents;
|
||||
|
||||
[CultDocument("aetheria.world_state", "aetheria.world_state.v1")]
|
||||
[CultGlobal]
|
||||
[MessagePackObject]
|
||||
public sealed class AetheriaWorldState
|
||||
{
|
||||
[Key(0)]
|
||||
[CultName]
|
||||
public string Name { get; set; } = "Aetheria";
|
||||
|
||||
[Key(1)]
|
||||
[CultIndex("worldId")]
|
||||
public string WorldId { get; set; } = "aetheria";
|
||||
|
||||
[Key(2)]
|
||||
public int SchemaEpoch { get; set; } = 1;
|
||||
|
||||
[Key(3)]
|
||||
public string CreatedAtUtc { get; set; } = "";
|
||||
|
||||
[Key(4)]
|
||||
public string UpdatedAtUtc { get; set; } = "";
|
||||
}
|
||||
Loading…
Reference in a new issue