PlayerData, CultMeshSimulationFact, the Networking interop peer's CultNetInteropNote, the cultnet-py benchmark item and the Caching test documents lacked [MessagePackObject]. Only the generated codec could serialize them; MessagePackSerializer refuses such types. Non-public test documents take [MessagePackObject(AllowPrivate = true)], as consumer internal documents already do, and ConditionalCommitTests.Slow marks its private backing fields [IgnoreMember]. Same [Key]s, so payloads are unchanged: a pre/post probe over the Networking assembly and both interop peers showed identical schema id, content hash and payload bytes for all 9 documents, PlayerData equal once its Guid.NewGuid() default id is masked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
using System;
|
|
using GameCult.Caching;
|
|
using MessagePack;
|
|
|
|
namespace GameCult.Networking
|
|
{
|
|
/// <summary>
|
|
/// Basic player account document used by the sample networking stack.
|
|
/// </summary>
|
|
[CultDocument("gamecult.player_data", "gamecult.player_data.v2")]
|
|
[MessagePackObject]
|
|
public class PlayerData
|
|
{
|
|
/// <summary>
|
|
/// Unique player identifier.
|
|
/// </summary>
|
|
[Key(0)]
|
|
[CultIndex]
|
|
public Guid PlayerId = Guid.NewGuid();
|
|
|
|
/// <summary>
|
|
/// Player email address.
|
|
/// </summary>
|
|
[Key(1)]
|
|
[CultIndex]
|
|
public string Email = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Stored password hash.
|
|
/// </summary>
|
|
[Key(2)]
|
|
public string PasswordHash = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Player display name.
|
|
/// </summary>
|
|
[Key(3)]
|
|
[CultName]
|
|
public string Username = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Monotonic session version used to supersede older issued tokens.
|
|
/// </summary>
|
|
[Key(4)]
|
|
public long SessionVersion;
|
|
}
|
|
}
|