models

Database models for Bedrock Server Manager.

This module defines the SQLAlchemy ORM models representing the application’s database schema. It includes models for users, settings, servers, plugins, registration tokens, players, and audit logs.

class bedrock_server_manager.db.models.User(**kwargs)

Represent a user in the system.

class bedrock_server_manager.db.models.Setting(**kwargs)

Represent a configuration setting.

Settings are global configurations for the application.

Variables:
  • id – The primary key.

  • key – The configuration key (dot-notation).

  • value – The configuration value, stored as JSON.

class bedrock_server_manager.db.models.PluginSetting(**kwargs)

Plugin-owned configuration, retained independently of plugin registration.

class bedrock_server_manager.db.models.Server(**kwargs)

Represent a registered Bedrock server.

class bedrock_server_manager.db.models.ServerBan(**kwargs)

Represent a player banned from a specific Bedrock server.

class bedrock_server_manager.db.models.Plugin(**kwargs)

Represent a registered plugin.

class bedrock_server_manager.db.models.RegistrationToken(**kwargs)

Represent a token used for user registration.

Variables:
  • id – The primary key.

  • token_digest – SHA-256 hex digest of the unique registration token.

  • role – The role that will be assigned to the user who registers with this token.

  • expires – Timestamp (unix epoch) indicating when the token expires.

class bedrock_server_manager.db.models.Player(**kwargs)

Represent a known player.

Variables:
  • id – The primary key.

  • player_name – The player’s gamertag/name.

  • xuid – The player’s unique Xbox User ID.

class bedrock_server_manager.db.models.DiagnosticHistoryRow(**kwargs)

Bounded sanitized diagnostic history, separate from domain and audit records.

class bedrock_server_manager.db.models.AuditLog(**kwargs)

Represent an entry in the audit log.

class bedrock_server_manager.db.models.Schedule(**kwargs)

Task definitions and durable coalescing/retry cursor.

class bedrock_server_manager.db.models.ScheduleRun(**kwargs)

Bounded per-attempt outcomes, independent of archive catalogs.

class bedrock_server_manager.db.models.AccessRevision(**kwargs)

Monotonic revision for committed authorization mutations.

class bedrock_server_manager.db.models.AccountServerAccess(**kwargs)

Absent accounts keep existing unrestricted role access.

class bedrock_server_manager.db.models.ServerAccessGrant(**kwargs)

Grants refer to immutable identities, never reusable names or row IDs.

class bedrock_server_manager.db.models.IntegrationToken(**kwargs)

Only a digest is stored. Opaque credentials are shown once on creation.

class bedrock_server_manager.db.models.LoginSession(**kwargs)

Revocable login family; JWT renewal never extends its absolute expiry.

class bedrock_server_manager.db.models.AccountSecurity(**kwargs)

Encrypted TOTP material and one-use recovery digests, never raw codes.

class bedrock_server_manager.db.models.AuthThrottle(**kwargs)

Persistent fixed-window budgets shared across workers and restarts.

class bedrock_server_manager.db.models.AuthSecurityEvent(**kwargs)
class bedrock_server_manager.db.models.TrustedDevice(**kwargs)

Revocable remembered second factor; never a substitute for a password.

class bedrock_server_manager.db.models.PasskeyCredential(**kwargs)

WebAuthn public-key credential bound to an account’s immutable owner_id.

class bedrock_server_manager.db.models.PasskeyChallenge(**kwargs)

Single-use, short-lived WebAuthn ceremony challenge shared across workers.