Struct CharacterGuildData
Character guild membership data transfer object.
public struct CharacterGuildData : IVersioned<CharacterGuildData>
- Implements
- Inherited Members
- Extension Methods
Remarks
RaceID and LastOnlineUtc are joined in from the character row rather than stored on the membership row. The roster needs them to render a member the reader can actually place — a name and a rank alone do not tell a leader who has stopped logging in — and duplicating them onto the membership row would mean two copies of a fact the character table already owns, drifting apart on every login.
They default so the many callers that CONSTRUCT a membership to persist it (create, accept, connect, disconnect) do not have to supply values the write path ignores; only the read path populates them.
Constructors
CharacterGuildData(long, long, long, byte, string)
public CharacterGuildData(long id, long characterID, long guildID, byte rank, string location)
Parameters
CharacterGuildData(long, long, long, long, byte, string, int, DateTime, int, string, string)
public CharacterGuildData(long id, long version, long characterID, long guildID, byte rank, string location, int raceID = 0, DateTime lastOnlineUtc = default, int level = 0, string publicNote = "", string officerNote = "")
Parameters
idlongversionlongcharacterIDlongguildIDlongrankbytelocationstringraceIDintlastOnlineUtcDateTimelevelintpublicNotestringofficerNotestring
Fields
CharacterID
public readonly long CharacterID
Field Value
GuildID
public readonly long GuildID
Field Value
ID
public readonly long ID
Field Value
LastOnlineUtc
When the member's character row was last written (UTC), joined in from the character row. Used as a last-seen figure for members who are not connected.
public readonly DateTime LastOnlineUtc
Field Value
Level
The member's level, joined in from the character row.
public readonly int Level
Field Value
Location
public readonly string Location
Field Value
OfficerNote
Note about this member visible only to ranks holding ViewOfficerNotes.
public readonly string OfficerNote
Field Value
Remarks
Populated on every read. The permission filter is applied where the roster is put on the wire, not here — a service that silently blanked a column depending on who was asking would need to know who is asking, and this one deliberately does not.
PublicNote
Note about this member visible to every member of the guild.
public readonly string PublicNote
Field Value
RaceID
The member's race identifier, joined in from the character row.
public readonly int RaceID
Field Value
Rank
public readonly byte Rank
Field Value
Version
public readonly long Version
Field Value
Methods
WithVersion(long)
Returns a new instance of this DTO with the specified version. Used by extension methods to create incremented copies.
public CharacterGuildData WithVersion(long newVersion)
Parameters
newVersionlongThe new version value.
Returns
- CharacterGuildData
A new instance with the updated version.