Table of Contents

Class PlotAccessEntity

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

One player's standing permission on somebody else's plot.

public class PlotAccessEntity : IVersionedEntity
Inheritance
PlotAccessEntity
Implements
Inherited Members

Remarks

The owner never appears here. Ownership is not a grant: it cannot be revoked by deleting a row, and a house whose owner's key lived in the same table as their friends' would be one bad delete away from being a house its owner could not enter. Who owns a plot is on the plot row; this table is only about the people they have let in.

Rows are per plot, not per owner. A player who loses a plot and buys another does not bring their old guest list with them — the grants were made about a particular house, and carrying them over would silently re-admit people to somewhere they were never invited.

Properties

CharacterID

The character being granted access.

public long CharacterID { get; set; }

Property Value

long

GrantedByCharacterID

Who granted it.

public long GrantedByCharacterID { get; set; }

Property Value

long

Remarks

Kept for the owner's benefit rather than the system's: a plot with InviteFriends handed out is a plot whose guest list the owner did not write all of, and "who let this person in" is the first thing they will ask.

ID

Primary key.

public long ID { get; set; }

Property Value

long

Permissions

What they may do, as a FishMMO.Shared.PlotPermission bitmask.

public int Permissions { get; set; }

Property Value

int

Remarks

An integer rather than a set of boolean columns, because permissions are read as a unit — every question asked of this table is "what may this person do here", never "who may place items" — and because adding one should not be a migration.

Unknown bits are meaningless and are masked off on read by PlotAccess.Sanitize. A permission retired in a later version therefore stops meaning anything rather than quietly becoming whichever permission is given its bit next.

PlotID

The plot this grant is about.

public long PlotID { get; set; }

Property Value

long

TimeGranted

When the grant was made or last changed (UTC).

public DateTime TimeGranted { get; set; }

Property Value

DateTime

Version

Application-level concurrency token. Incremented on every write to detect stale updates.

public long Version { get; set; }

Property Value

long