Class CharacterDialogueChoiceEntity
Database entity holding one character's "already chosen" bitmask for one dialogue template.
public class CharacterDialogueChoiceEntity
- Inheritance
-
CharacterDialogueChoiceEntity
- Inherited Members
Remarks
Deliberately carries no Version column, unlike the character tables beside it.
The optimistic-concurrency machinery exists to decide which of two competing writes to the
same row wins, and for this row the answer is always "both": the mask only ever gains bits,
so the write merges with choices | EXCLUDED.choices rather than overwriting. That is
idempotent under the execution strategy's retries and safe when a character's old and new
scene servers overlap during a transfer — and, critically, it can never lose a bit, which is
the only direction that matters: a lost bit is a one-time dialogue reward the player can
take again.
Also carries no soft-delete columns. There is nothing to tombstone — a mask is either
there or the character has taken no tracked choice in that template, which reads the same.
Clearing one is an authoring operation (see ResetTemplateAsync) and is a real delete.
Properties
Character
Navigation to the owning character.
public CharacterEntity Character { get; set; }
Property Value
CharacterID
Foreign key to the owning character. Part of the composite primary key.
public long CharacterID { get; set; }
Property Value
Choices
Bitmask of choices already taken in this template, at most
DialogueTemplate.MaxTrackedChoices (16) bits wide.
public short Choices { get; set; }
Property Value
TemplateID
Dialogue template identifier. Part of the composite primary key.
public int TemplateID { get; set; }
Property Value
TimeCreated
Row creation timestamp (UTC).
public DateTime TimeCreated { get; set; }
Property Value
TimeUpdated
Timestamp of the most recent merge into this row (UTC).
public DateTime TimeUpdated { get; set; }