bookclerk_library::entities

Development These docs follow the development version and change with every merge.

Last updated View as Markdown

SeaORM entities mirroring the greenfield schema in crate::migrations.

One DeriveEntityModel per table. Column Rust types match the proxy/native backends: integer columns are i64, reals f64, blobs Vec<u8>, and text (including RFC 3339 timestamps) String. Timestamps stay as String to match the TEXT columns without relying on SeaORM's proxy chrono decoding; LibraryStore parses them into chrono::DateTime<Utc> at the record boundary and uses these entities (Entity::find, ActiveModel) for the majority of CRUD.

Modules

  • account_credential_revisions: SeaORM entity for the account_credential_revisions table: the newest sign-in of a single-keeper account that crossed each share (control_plane::keeper).
  • account_downloads: SeaORM entity for account_downloads: each download that reached a store, counted against the account's rolling daily budget.
  • account_links: SeaORM entity for the account_links table.
  • account_pace: SeaORM entity for account_pace: the operator's override of a storefront's download pace for one store account, and the store's cool-down.
  • account_scan_state: SeaORM entity for account_scan_state: where each account's storefront scan stands between passes and between pages.
  • account_shares: SeaORM entity for the account_shares table: where a store account travelled with its person (control_plane::carried_accounts).
  • accounts: SeaORM entity for the accounts table.
  • admin_controls: SeaORM entity for the admin_controls table: one Administrator's overrides of the library's default Administrator switches, set by an Owner or the operator.
  • bookclerk_receipts: SeaORM entity for durable atomic result receipts.
  • bookmarks: SeaORM entity for bookmarks: places one person marked in one edition. Written by crate::LibraryStore's playback methods (store::playback).
  • catalog_listing_optouts: SeaORM entity for catalog_listing_optouts: on a branch, the members whose books it does not list to the libraries it joined.
  • catalog_lookups: SeaORM entity for catalog_lookups: on a library, the catalog questions waiting for (or answered by) each branch (control_plane::catalog_lookup).
  • chapter_list_entries: SeaORM entity for chapter_list_entries: one chapter of a stored chapter list (chapter_lists), in pre-order.
  • chapter_lists: SeaORM entity for chapter_lists: one stored chapter list, named by its digest. Written by crate::LibraryStore's chapter methods (store::chapters) after every entry of the list.
  • claim_tickets: SeaORM entity for the claim_tickets table.
  • clerk_links: SeaORM entity for clerk_links: on a clerk, the libraries this install holds a library card for (written by control_plane::record_clerk_link).
  • configuration_audit: SeaORM entity for successful configuration commits.
  • configuration_changes: SeaORM entity for the configuration change notice written with each commit.
  • configuration_documents: SeaORM entity for one typed configuration document.
  • contributors: SeaORM entity for the contributors table (text primary key).
  • copy_grants: SeaORM entity for copy_grants: one reader's leave to download the copy this library holds of one edition. Written by control_plane::copies.
  • credits: SeaORM entity for the credits table (composite primary key).
  • destination_feeds: SeaORM entity for destination_feeds: how each output destination's outside changes are followed, and how healthy that is (storage destinations ADR, docs/adr/storage-destinations.md, decision 5).
  • destination_objects: SeaORM entity for destination_objects: the last known state of every object at each output destination (storage destinations ADR, docs/adr/storage-destinations.md, decision 5).
  • discover_candidates: SeaORM entity for the discover_candidates table.
  • discover_feeds: SeaORM entity for the discover_feeds table.
  • discover_fetches: SeaORM entity for the discover_fetches table.
  • discover_request_queue: SeaORM entity for the discover_request_queue table.
  • discover_store_call_hits: SeaORM entity for the discover_store_call_hits table (composite primary key).
  • discover_store_calls: SeaORM entity for the discover_store_calls table.
  • discover_tastes: SeaORM entity for the discover_tastes table.
  • domain_events: SeaORM entity for the durable domain_events outbox.
  • edition_acquisitions: SeaORM entity for edition_acquisitions: each edition's acquire state.
  • edition_chapters: SeaORM entity for edition_chapters: the chapter list an edition's claims resolved to (store::chapters).
  • edition_copies: SeaORM entity for edition_copies: each edition's copy at each output destination and where it stands (storage destinations ADR, docs/adr/storage-destinations.md, decision 3).
  • edition_files: SeaORM entity for edition_files: every file key an acquire or a host upload wrote, per output destination, and the edition it belongs to (library data model ADR, docs/adr/library-data-model.md, section 3). Written by the acquire pipeline (crate::LibraryStore::record_edition_file) and by control_plane::uploads, which refuses an upload a key another edition holds and deletes an aborted upload's copy only while the key is still its own.
  • edition_identifiers: SeaORM entity for the edition_identifiers table (composite primary key).
  • editions: SeaORM entity for the editions table (text primary key).
  • embeddings: SeaORM entity for the embeddings table.
  • encrypted_secrets: SeaORM entity for the encrypted_secrets table.
  • event_deliveries: SeaORM entity for per-subscriber event_deliveries.
  • event_outbox_stats: SeaORM entity for the singleton durable event-outbox counters.
  • event_subscriber_nodes: SeaORM entity for live per-node event_subscriber_nodes registrations.
  • expressions: SeaORM entity for the expressions table (text primary key).
  • holdings: SeaORM entity for the holdings table: who holds a store listing.
  • ignored_titles: SeaORM entity for the ignored_titles table entity (composite primary key).
  • ingest_batches: SeaORM entity for ingest_batches: one batch of uploaded files or intake references, held by one patron. Written by control_plane::ingest.
  • ingest_members: SeaORM entity for ingest_members: one file of an ingest batch and what became of it. Written by control_plane::ingest.
  • intake_items: SeaORM entity for intake_items: one item seen in a drop folder and how far its ingest has come.
  • job_secret_handoffs: SeaORM entity for job_secret_handoffs: which store-account secrets a Host was handed with a job, per lease generation.
  • job_temp_paths: SeaORM entity for scratch directories associated with a durable job.
  • jobs: SeaORM entity for the durable daemon jobs table.
  • library_identity: SeaORM entity for the singleton library identity and secret-root fingerprint.
  • library_index_builds: SeaORM entity for library_index_builds: finished page index builds.
  • library_leases: SeaORM entity for library_leases: singleton maintenance leases.
  • library_links: SeaORM entity for library_links: on a branch node, the libraries it enrolled into (written by control_plane::record_library_link).
  • library_work_facets: SeaORM entity for library_work_facets: the page index's filter values.
  • library_work_rows: SeaORM entity for library_work_rows: the library's page index.
  • link_imports: SeaORM entity for link_imports: on a branch, the branch owner's books acquired for a library it joined and imported into this library as well (written by control_plane::link_imports). The catalog sync never sends a library a book recorded here for it.
  • link_requests: SeaORM entity for link_requests: on a branch, the books a library it joined asked for through an interlibrary request (written by control_plane::branch_requests). The catalog sync sends that library a book recorded here for it, although the book is a member's.
  • listening_progress: SeaORM entity for the listening_progress table.
  • listing_offers: SeaORM entity for the listing_offers table (composite primary key).
  • metadata_claims: SeaORM entity for metadata_claims: one source's value for one field of one subject (docs/adr/metadata-claims-and-file-sync.md). Chapters of an edition are the only field so far (store::chapters).
  • node_credentials: SeaORM entity for node_credentials: the public keys an enrolled branch node proves itself with.
  • node_enrollment_links: SeaORM entity for node_enrollment_links: single-use links that enroll a branch node into this library. Only the hash of each link's secret is stored.
  • node_status: SeaORM entity for node_status: each node's latest daemon heartbeat.
  • node_upload_sessions: SeaORM entity for node_upload_sessions: one title's streamed upload from a branch node to a shared node (H-4 design, section 6). Written by control_plane::uploads.
  • nodes: SeaORM entity for durable node identity and liveness observations.
  • notifications: SeaORM entity for notifications: one notification the router accepted, rendered once for every destination and the inbox.
  • notify_deliveries: SeaORM entity for notify_deliveries: the delivery log, one row per notification and destination.
  • notify_destinations: SeaORM entity for notify_destinations: where one notifier instance sends, either a library channel or one patron's personal address.
  • notify_inbox: SeaORM entity for notify_inbox: a patron-audience notification in its patron's in-app inbox.
  • notify_inbox_routes: SeaORM entity for notify_inbox_routes: administrators' routing of one operational notification type to the built-in "In app" target, the inbox of every active Owner and Administrator.
  • notify_patron_offers: SeaORM entity for notify_patron_offers: a notifier instance patrons may use for one patron notification type.
  • notify_patron_prefs: SeaORM entity for notify_patron_prefs: one patron's choice for one patron notification type.
  • notify_patron_targets: SeaORM entity for notify_patron_targets: a personal destination one patron chose for one patron notification type.
  • notify_route_revisions: SeaORM entity for notify_route_revisions: a fresh revision written with every replacement of one operational type's routes, so routing can tell that its separate reads of the channel routes and the "In app" route saw one configuration.
  • notify_routes: SeaORM entity for notify_routes: administrators' routing of one operational notification type to one channel destination.
  • oidc_auth_codes: SeaORM entity for the oidc_auth_codes — short-lived authorization codes (PKCE).
  • oidc_clients: SeaORM entity for the oidc_clients — registered OAuth/OIDC clients.
  • oidc_refresh_tokens: SeaORM entity for the oidc_refresh_tokens — refresh tokens bound to a User.
  • oidc_rp_states: SeaORM entity for OIDC relying-party authorize state (PKCE + nonce).
  • operator_sessions: SeaORM entity for the operator_sessions table.
  • patron_controls: SeaORM entity for the patron_controls table: one Member's overrides of the library's default member controls, set by an Administrator.
  • patron_scope_keys: SeaORM entity for the patron_scope_keys table: the include and exclude values of a patron scope as rows, so the Library filter joins them instead of binding one parameter per rule.
  • patron_scopes: SeaORM entity for the patron_scopes table: a Member's own patron scope, set by an Administrator.
  • pending_joins: SeaORM entity for pending_joins: on a host joining a library, one sign-in in progress (written by control_plane::create_pending_join). The PKCE verifier and the node keys are sealed in encrypted_secrets, never stored here.
  • playback_progress: SeaORM entity for playback_progress: how far one person has listened to one edition. Written by crate::LibraryStore's playback methods (store::playback).
  • playback_sessions: SeaORM entity for playback_sessions: one stretch of listening by one person on one player. A session is also the leave to stream the edition's files from one destination, checked afresh on every request (control_plane::copies::authorize_playback).
  • player_card_tokens: SeaORM entity for player_card_tokens: the access and refresh tokens of player library cards, by SHA-256 (store::player_cards).
  • player_cards: SeaORM entity for player_cards: how a player library card (a player row of portal_sessions) was signed in to (store::player_cards).
  • player_passwords: SeaORM entity for player_passwords: passwords a patron made for one player app each (store::player_cards). Only a SHA-256 of each is kept.
  • plugin_artifacts: SeaORM entity for plugin_artifacts: the header of a version archive stored in the library when no shared artifact location exists.
  • plugin_cron_cursors: SeaORM entity for plugin_cron_cursors: the last claimed fire of each plugin cron schedule.
  • plugin_deployment_observations: SeaORM entity for observed plugin deployment state.
  • plugin_deployments: SeaORM entity for desired plugin deployment state.
  • plugin_installs: SeaORM entity for plugin_installs: the active version per plugin.
  • plugin_instances: SeaORM entity for a durable plugin instance.
  • plugin_kv: SeaORM entity for the per-plugin durable key/value table plugin_kv.
  • plugin_placements: SeaORM entity for plugin_placements: the scheduler's input per instance.
  • plugin_schemas: SeaORM entity for the plugin_schemas table.
  • plugin_versions: SeaORM entity for plugin_versions: one installed version of a plugin.
  • plugin_webhooks: SeaORM entity for plugin_webhooks: one inbound webhook of one plugin instance, with its URL token (storage destinations ADR, docs/adr/storage-destinations.md, decision 6).
  • portal_identities: SeaORM entity for the portal_identities table.
  • portal_sessions: SeaORM entity for the portal_sessions table.
  • remote_plugin_consents: SeaORM entity for remote_plugin_consents: on a branch node, this install's operator consent for each owner plugin a library wants to run here (written by control_plane::remote_consents).
  • resolution_conflicts: SeaORM entity for the resolution_conflicts table (composite primary key).
  • resolution_overrides: SeaORM entity for the resolution_overrides table (composite primary key).
  • saved_filters: SeaORM entity for the saved_filters table.
  • security_audit_events: SeaORM entity for the security_audit_events table entity — elevate / impersonate / login audit.
  • series: SeaORM entity for the series table (text primary key).
  • series_entries: SeaORM entity for the series_entries table (composite primary key).
  • storage_scan_generations: Ownership row for one durable storage-scan generation.
  • storage_scan_rows: SeaORM entity for paged storage-scan rows.
  • store_listings: SeaORM entity for the store_listings table (text primary key).
  • title_request_sources: SeaORM entity for the title_request_sources — per-storefront catalog/pricing snapshot for a wish.
  • title_requests: SeaORM entity for the title_requests table.
  • user_invites: SeaORM entity for the user_invites table entity — admin/operator invite tickets with role.
  • user_preferences: SeaORM entity for the user_preferences table.
  • user_title_state: SeaORM entity for the user_title_state table.
  • user_work_tags: SeaORM entity for user_work_tags: one user's tags on a work, one row per tag.
  • users: SeaORM entity for the users table entity — first-party identity principal (#117).
  • webauthn_challenges: SeaORM entity for in-flight WebAuthn ceremonies.
  • webauthn_credentials: SeaORM entity for WebAuthn / passkey credentials.
  • window_book_parts: SeaORM entity for window_book_parts: one piece of a window book's stored edition and identifiers (control_plane::window_books).
  • window_books: SeaORM entity for window_books: on a branch or a clerk, the books of each library it reads, one row per edition (control_plane::window_books).
  • work_identifiers: SeaORM entity for the work_identifiers table (composite primary key).
  • work_tags: SeaORM entity for work_tags: library tags on a top-level work, one row per tag and source.
  • works: SeaORM entity for the works table (text primary key).

Generated from crates/bookclerk-library at main · View as Markdown