Table of Contents

Class GuildRankEntity

Namespace
FishMMO.Database.Npgsql.Entities
Assembly
FishMMO-DB.dll

Database entity for one editable guild rank.

public class GuildRankEntity : IVersionedEntity
Inheritance
GuildRankEntity
Implements
Inherited Members

Remarks

Replaces the hard-coded GuildRank enum as the source of a member's powers, without replacing the value a membership row stores: RankOrder IS character_guild.rank. A guild's ladder is the set of rows it owns; the leader is the member holding the highest RankOrder present.

Properties

Guild

Navigation to the owning guild.

public GuildEntity Guild { get; set; }

Property Value

GuildEntity

GuildID

Foreign key to the owning guild.

public long GuildID { get; set; }

Property Value

long

ID

Primary key.

public long ID { get; set; }

Property Value

long

Name

Display name.

public string Name { get; set; }

Property Value

string

Permissions

Permission bit mask, matching the shared GuildPermissions flags enum.

public long Permissions { get; set; }

Property Value

long

Remarks

bigint, not integer. Widening the column every permission check reads is not a migration worth running twice, and fourteen flags already fill a third of 32 bits.

RankOrder

Ordering position. Higher is more senior. Unique within a guild.

public byte RankOrder { get; set; }

Property Value

byte

TimeCreated

Row creation timestamp (UTC).

public DateTime TimeCreated { get; set; }

Property Value

DateTime

Version

Application-level concurrency token. Incremented on every write.

public long Version { get; set; }

Property Value

long