public record class GuildRowOne guild, as the database holds it.
Remarks
⚠ The roster is rows and not a blob, which is the whole reason this is a repository rather than grain storage. Doc 27 § Persistence: grain state is coordination, and gameplay data kept in Orleans's serializer "cannot be queried by anything else — including the support tool, the economy dashboard and the analytics job". "Which guilds is this account in" is a query, so the members are a table.
Deliberately not Vixen.Live.Cluster's GuildRecord. This assembly must not reference the grain contract: the gate and Vixen.Live.Gameplay both link persistence, and neither should acquire Orleans for the sake of a storage shape. The orchestrator references both and maps between them, which is one function with a test — the same arrangement EconomyIntent and LedgerIntent already have.
⚠ The fence is Revision rather than a lease epoch, and the difference is IGuildGrain's: a character is fenced by ADR-021 because two realms can each believe they hold it, and a guild has no lease because its single writer is the grain's own turn. What the revision guards against is a stale writer after a reactivation, which is optimistic concurrency rather than a lease.
Fields and properties (7)
public Guid IdThe guild's own id.
public string CharterWhich charter it was founded under, by address.
public string NameWhat it is called.
public ImmutableArray<GuildMemberRow> MembersWho is in it.
public ImmutableDictionary<int, string> RankNamesWhat a leader renamed a rank to, by rank index.
public DateTimeOffset FoundedWhen.
public uint RevisionHow many times it has changed. The optimistic-concurrency check.
Methods (3)
public GuildRow(Guid Id, string Charter, string Name, ImmutableArray<GuildMemberRow> Members, ImmutableDictionary<int, string> RankNames, DateTimeOffset Founded, uint Revision)One guild, as the database holds it.
public bool Equals(GuildRow? other)Whether two rows say the same thing.
public override int GetHashCode()Serves as the default hash function.
Used by (7)
- GuildRepositoryTestsVixen.Live.Persistence.Tests
- IGuildRepositoryVixen.Live.Persistence
- MemoryPersistenceVixen.Live.Persistence
- SocialBridgeVixen.Live.Gameplay
- SocialBridgeTestsVixen.Live.Gameplay.Tests
- SqlPersistenceVixen.Live.Persistence
- SqlPersistenceTestsVixen.Live.Persistence.Tests