Class AccountEntity
Database entity representing a player account.
public class AccountEntity
- Inheritance
-
AccountEntity
- Inherited Members
Properties
AccessLevel
Account access level.
public byte AccessLevel { get; set; }
Property Value
Address
Postal address, as they gave it, or null.
public string? Address { get; set; }
Property Value
Age
Account holder age. Zero if not provided.
public int Age { get; set; }
Property Value
BanReason
What the operator gave as the reason for the ban.
public string? BanReason { get; set; }
Property Value
BannedBy
Account of the operator who applied the ban. Not a foreign key, deliberately.
public string? BannedBy { get; set; }
Property Value
BannedUntil
When a temporary ban lifts (UTC), or null for a permanent ban or no ban.
public DateTime? BannedUntil { get; set; }
Property Value
Remarks
Meaningful only while AccessLevel is Banned. The login fetch restores
Player the first time it reads a banned account whose instant has passed, so a
temporary ban needs no scheduler to end — and an account nobody tries to sign in to stays
banned on the row, harmlessly, until somebody does.
Country
Country or region, as they gave it, or null.
public string? Country { get; set; }
Property Value
DiscordDmAttempts
Sends Discord refused. Waiting for the player to join the server is not counted.
public int DiscordDmAttempts { get; set; }
Property Value
DiscordDmClaimedAt
When the bot took the DM to send it, or null. Never reclaimed automatically.
public DateTime? DiscordDmClaimedAt { get; set; }
Property Value
DiscordDmLastError
Why the DM has not gone out yet, as the bot last recorded it, or null.
public string? DiscordDmLastError { get; set; }
Property Value
DiscordDmSentAt
When the DM was delivered, or null. Once set, no further DM is sent for this account.
public DateTime? DiscordDmSentAt { get; set; }
Property Value
DiscordDmUserId
The Discord user the DM was delivered to, or null.
public long? DiscordDmUserId { get; set; }
Property Value
- long?
DiscordLinkedAt
When DiscordUserId was set, or null.
public DateTime? DiscordLinkedAt { get; set; }
Property Value
DiscordUserId
The Discord user this account is linked to, or null. Unique: one Discord account links one game account.
public long? DiscordUserId { get; set; }
Property Value
- long?
Remarks
A snowflake is an unsigned 64-bit number; it is stored signed, which holds every snowflake until 2084.
DiscordUsername
The Discord username the player gave, lowercase, or null: fishfan, or fishfan#1234
for a name that still carries its discriminator. See AccountProfileRules.NormalizeDiscordUsername.
public string? DiscordUsername { get; set; }
Property Value
DiscordVerified
Whether the Discord channel has been proven: the DM's code redeemed, or the bot's link made.
public bool DiscordVerified { get; set; }
Property Value
DiscordVerifyCode
The code the one DM carries, or 0 when none has been issued or it has been used.
public int DiscordVerifyCode { get; set; }
Property Value
Contact email address. Null if not provided.
public string? Email { get; set; }
Property Value
EmailVerified
Whether the email address has been proven by its code.
public bool EmailVerified { get; set; }
Property Value
Remarks
Per channel. Verified remains the one flag sign-in reads, and is true once every channel in VerificationChannels is satisfied.
FailedLoginCount
Failed password proofs in the current window.
public int FailedLoginCount { get; set; }
Property Value
FailedLoginSinceUtc
When the current password-failure window began, or null.
public DateTime? FailedLoginSinceUtc { get; set; }
Property Value
FailedTwoFactorCount
Failed authenticator or recovery codes in the current window.
public int FailedTwoFactorCount { get; set; }
Property Value
FailedTwoFactorSinceUtc
When the current code-failure window began, or null.
public DateTime? FailedTwoFactorSinceUtc { get; set; }
Property Value
LastLogin
Last successful login timestamp (UTC).
public DateTime LastLogin { get; set; }
Property Value
LastTotpWindow
The last TOTP time-step window that was successfully used, for replay attack prevention. Zero when no TOTP code has been verified yet.
public long LastTotpWindow { get; set; }
Property Value
LoginLockedUntilUtc
Until when password sign-in is refused, or null.
public DateTime? LoginLockedUntilUtc { get; set; }
Property Value
MuteReason
What the operator gave as the reason for the mute.
public string? MuteReason { get; set; }
Property Value
Muted
Whether the account is muted in chat.
public bool Muted { get; set; }
Property Value
Remarks
An account mute silences every character on the account, which is what makes it the answer to a player who simply switches character. MutedUntil null with this set is a mute with no end; a past MutedUntil is an expired one, and nothing has to clear the row for it to stop applying.
MutedBy
Account of the operator who applied the mute. Not a foreign key, deliberately.
public string? MutedBy { get; set; }
Property Value
MutedUntil
When the account's mute lifts (UTC), or null for a mute with no end.
public DateTime? MutedUntil { get; set; }
Property Value
Name
Unique account name, and the primary key.
public string Name { get; set; }
Property Value
Remarks
Stored lowercase. It used to be documented as preserving the casing the user
registered with, and it does not: AccountService.PersistAsync inserts
ToLowerInvariant(). Anything that displays this back to a player shows
lowercase, and any code written on the belief that the original casing survives is
wrong. NameLowercase is a generated column that exists so the unique
index is case-insensitive regardless of what is inserted here.
NameLowercase
Case-insensitive lookup column for Name. Computed as LOWER(name) in the database
and bound by a UNIQUE index so that two accounts cannot differ only in case.
Application code must filter on this column (lowercased input) for all account-name lookups.
public string NameLowercase { get; set; }
Property Value
PendingTotpSecret
A re-enrolment's new secret, encrypted like TotpSecret, waiting for a code from the new authenticator. Sign-in never reads it: until it is confirmed and promoted, the live secret keeps working, so an abandoned re-enrolment changes nothing. Null when no re-enrolment is in progress.
public string? PendingTotpSecret { get; set; }
Property Value
Phone
Phone number in E.164 form (+ and up to 15 digits), or null.
public string? Phone { get; set; }
Property Value
PhoneVerified
Whether Phone has been proven by an SMS code. Cleared when the number changes.
public bool PhoneVerified { get; set; }
Property Value
PhoneVerifyCode
The outstanding SMS verification code, or 0 when none is pending.
public int PhoneVerifyCode { get; set; }
Property Value
PhoneVerifyCodeExpiresUtc
When PhoneVerifyCode stops being accepted.
public DateTime? PhoneVerifyCodeExpiresUtc { get; set; }
Property Value
RealName
The account holder's real name, as they gave it, or null.
public string? RealName { get; set; }
Property Value
ReferralAccount
The account that referred this one, as typed at registration, or null. No foreign key.
public string? ReferralAccount { get; set; }
Property Value
Salt
SRP password salt.
public string Salt { get; set; }
Property Value
TimeCreated
Account creation timestamp (UTC).
public DateTime TimeCreated { get; set; }
Property Value
TotpEnabled
Whether TOTP two-factor authentication is enabled for this account.
public bool TotpEnabled { get; set; }
Property Value
TotpSecret
Base32-encoded TOTP secret key, encrypted at rest by the server layer. Null when TOTP has not been set up.
public string? TotpSecret { get; set; }
Property Value
TotpVerifiedAt
Timestamp (UTC) of the first successful TOTP verification, confirming setup completion. Null when TOTP setup has not been confirmed.
public DateTime? TotpVerifiedAt { get; set; }
Property Value
TwoFactorLockedUntilUtc
Until when the second step is refused, or null.
public DateTime? TwoFactorLockedUntilUtc { get; set; }
Property Value
VerificationChannels
Which channels the player chose to verify with, as AccountVerificationChannels flags:
1 email, 2 SMS.
public byte VerificationChannels { get; set; }
Property Value
VerificationEmailSentAt
UTC timestamp when the verification email was successfully sent via SMTP. Null while the email is still pending in the outbound queue. When non-null and Verified is false, login is blocked until the user verifies.
public DateTime? VerificationEmailSentAt { get; set; }
Property Value
Verified
Whether the account is verified: the one flag sign-in reads.
public bool Verified { get; set; }
Property Value
Remarks
Set by the first correct code on any channel the player chose, or by a server that verifies
nothing. See AccountVerificationRules.
Verifier
SRP password verifier.
public string Verifier { get; set; }
Property Value
VerifyCode
Random verification code sent to the account email during registration. The user must provide this code to toggle Verified to true. Zero when no verification is pending.
public int VerifyCode { get; set; }
Property Value
VerifyCodeExpiresUtc
UTC expiry timestamp for VerifyCode. Once exceeded, the code is considered invalid and must be regenerated. Null while no verification is pending.
public DateTime? VerifyCodeExpiresUtc { get; set; }
Property Value
VerifyFailedCount
Incorrect verification codes since the last correct one. A support ticket is opened when it
reaches AccountVerificationRules.FailedCodesBeforeTicket.
public int VerifyFailedCount { get; set; }
Property Value
Version
PostgreSQL xmin system column exposed as an EF Core concurrency token to detect
concurrent modifications. Updated automatically by the database on every row change.
public uint Version { get; set; }