bookclerk_library::entities
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.
account_credential_revisions: SeaORM entity for theaccount_credential_revisionstable: the newest sign-in of a single-keeper account that crossed each share (control_plane::keeper).account_downloads: SeaORM entity foraccount_downloads: each download that reached a store, counted against the account's rolling daily budget.account_links: SeaORM entity for theaccount_linkstable.account_pace: SeaORM entity foraccount_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 foraccount_scan_state: where each account's storefront scan stands between passes and between pages.account_shares: SeaORM entity for theaccount_sharestable: where a store account travelled with its person (control_plane::carried_accounts).accounts: SeaORM entity for theaccountstable.admin_controls: SeaORM entity for theadmin_controlstable: 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 forbookmarks: places one person marked in one edition. Written bycrate::LibraryStore's playback methods (store::playback).catalog_listing_optouts: SeaORM entity forcatalog_listing_optouts: on a branch, the members whose books it does not list to the libraries it joined.catalog_lookups: SeaORM entity forcatalog_lookups: on a library, the catalog questions waiting for (or answered by) each branch (control_plane::catalog_lookup).chapter_list_entries: SeaORM entity forchapter_list_entries: one chapter of a stored chapter list (chapter_lists), in pre-order.chapter_lists: SeaORM entity forchapter_lists: one stored chapter list, named by its digest. Written bycrate::LibraryStore's chapter methods (store::chapters) after every entry of the list.claim_tickets: SeaORM entity for theclaim_ticketstable.clerk_links: SeaORM entity forclerk_links: on a clerk, the libraries this install holds a library card for (written bycontrol_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 thecontributorstable (text primary key).copy_grants: SeaORM entity forcopy_grants: one reader's leave to download the copy this library holds of one edition. Written bycontrol_plane::copies.credits: SeaORM entity for thecreditstable (composite primary key).destination_feeds: SeaORM entity fordestination_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 fordestination_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 thediscover_candidatestable.discover_feeds: SeaORM entity for thediscover_feedstable.discover_fetches: SeaORM entity for thediscover_fetchestable.discover_request_queue: SeaORM entity for thediscover_request_queuetable.discover_store_call_hits: SeaORM entity for thediscover_store_call_hitstable (composite primary key).discover_store_calls: SeaORM entity for thediscover_store_callstable.discover_tastes: SeaORM entity for thediscover_tastestable.domain_events: SeaORM entity for the durabledomain_eventsoutbox.edition_acquisitions: SeaORM entity foredition_acquisitions: each edition's acquire state.edition_chapters: SeaORM entity foredition_chapters: the chapter list an edition's claims resolved to (store::chapters).edition_copies: SeaORM entity foredition_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 foredition_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 bycontrol_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 theedition_identifierstable (composite primary key).editions: SeaORM entity for theeditionstable (text primary key).embeddings: SeaORM entity for theembeddingstable.encrypted_secrets: SeaORM entity for theencrypted_secretstable.event_deliveries: SeaORM entity for per-subscriberevent_deliveries.event_outbox_stats: SeaORM entity for the singleton durable event-outbox counters.event_subscriber_nodes: SeaORM entity for live per-nodeevent_subscriber_nodesregistrations.expressions: SeaORM entity for theexpressionstable (text primary key).holdings: SeaORM entity for theholdingstable: who holds a store listing.ignored_titles: SeaORM entity for theignored_titlestable entity (composite primary key).ingest_batches: SeaORM entity foringest_batches: one batch of uploaded files or intake references, held by one patron. Written bycontrol_plane::ingest.ingest_members: SeaORM entity foringest_members: one file of an ingest batch and what became of it. Written bycontrol_plane::ingest.intake_items: SeaORM entity forintake_items: one item seen in a drop folder and how far its ingest has come.job_secret_handoffs: SeaORM entity forjob_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 daemonjobstable.library_identity: SeaORM entity for the singleton library identity and secret-root fingerprint.library_index_builds: SeaORM entity forlibrary_index_builds: finished page index builds.library_leases: SeaORM entity forlibrary_leases: singleton maintenance leases.library_links: SeaORM entity forlibrary_links: on a branch node, the libraries it enrolled into (written bycontrol_plane::record_library_link).library_work_facets: SeaORM entity forlibrary_work_facets: the page index's filter values.library_work_rows: SeaORM entity forlibrary_work_rows: the library's page index.link_imports: SeaORM entity forlink_imports: on a branch, the branch owner's books acquired for a library it joined and imported into this library as well (written bycontrol_plane::link_imports). The catalog sync never sends a library a book recorded here for it.link_requests: SeaORM entity forlink_requests: on a branch, the books a library it joined asked for through an interlibrary request (written bycontrol_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 thelistening_progresstable.listing_offers: SeaORM entity for thelisting_offerstable (composite primary key).metadata_claims: SeaORM entity formetadata_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 fornode_credentials: the public keys an enrolled branch node proves itself with.node_enrollment_links: SeaORM entity fornode_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 fornode_status: each node's latest daemon heartbeat.node_upload_sessions: SeaORM entity fornode_upload_sessions: one title's streamed upload from a branch node to a shared node (H-4 design, section 6). Written bycontrol_plane::uploads.nodes: SeaORM entity for durable node identity and liveness observations.notifications: SeaORM entity fornotifications: one notification the router accepted, rendered once for every destination and the inbox.notify_deliveries: SeaORM entity fornotify_deliveries: the delivery log, one row per notification and destination.notify_destinations: SeaORM entity fornotify_destinations: where one notifier instance sends, either a library channel or one patron's personal address.notify_inbox: SeaORM entity fornotify_inbox: a patron-audience notification in its patron's in-app inbox.notify_inbox_routes: SeaORM entity fornotify_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 fornotify_patron_offers: a notifier instance patrons may use for one patron notification type.notify_patron_prefs: SeaORM entity fornotify_patron_prefs: one patron's choice for one patron notification type.notify_patron_targets: SeaORM entity fornotify_patron_targets: a personal destination one patron chose for one patron notification type.notify_route_revisions: SeaORM entity fornotify_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 fornotify_routes: administrators' routing of one operational notification type to one channel destination.oidc_auth_codes: SeaORM entity for theoidc_auth_codes— short-lived authorization codes (PKCE).oidc_clients: SeaORM entity for theoidc_clients— registered OAuth/OIDC clients.oidc_refresh_tokens: SeaORM entity for theoidc_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 theoperator_sessionstable.patron_controls: SeaORM entity for thepatron_controlstable: one Member's overrides of the library's default member controls, set by an Administrator.patron_scope_keys: SeaORM entity for thepatron_scope_keystable: 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 thepatron_scopestable: a Member's own patron scope, set by an Administrator.pending_joins: SeaORM entity forpending_joins: on a host joining a library, one sign-in in progress (written bycontrol_plane::create_pending_join). The PKCE verifier and the node keys are sealed inencrypted_secrets, never stored here.playback_progress: SeaORM entity forplayback_progress: how far one person has listened to one edition. Written bycrate::LibraryStore's playback methods (store::playback).playback_sessions: SeaORM entity forplayback_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 forplayer_card_tokens: the access and refresh tokens of player library cards, by SHA-256 (store::player_cards).player_cards: SeaORM entity forplayer_cards: how a player library card (aplayerrow ofportal_sessions) was signed in to (store::player_cards).player_passwords: SeaORM entity forplayer_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 forplugin_artifacts: the header of a version archive stored in the library when no shared artifact location exists.plugin_cron_cursors: SeaORM entity forplugin_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 forplugin_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 tableplugin_kv.plugin_placements: SeaORM entity forplugin_placements: the scheduler's input per instance.plugin_schemas: SeaORM entity for theplugin_schemastable.plugin_versions: SeaORM entity forplugin_versions: one installed version of a plugin.plugin_webhooks: SeaORM entity forplugin_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 theportal_identitiestable.portal_sessions: SeaORM entity for theportal_sessionstable.remote_plugin_consents: SeaORM entity forremote_plugin_consents: on a branch node, this install's operator consent for each owner plugin a library wants to run here (written bycontrol_plane::remote_consents).resolution_conflicts: SeaORM entity for theresolution_conflictstable (composite primary key).resolution_overrides: SeaORM entity for theresolution_overridestable (composite primary key).saved_filters: SeaORM entity for thesaved_filterstable.security_audit_events: SeaORM entity for thesecurity_audit_eventstable entity — elevate / impersonate / login audit.series: SeaORM entity for theseriestable (text primary key).series_entries: SeaORM entity for theseries_entriestable (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 thestore_listingstable (text primary key).title_request_sources: SeaORM entity for thetitle_request_sources— per-storefront catalog/pricing snapshot for a wish.title_requests: SeaORM entity for thetitle_requeststable.user_invites: SeaORM entity for theuser_invitestable entity — admin/operator invite tickets with role.user_preferences: SeaORM entity for theuser_preferencestable.user_title_state: SeaORM entity for theuser_title_statetable.user_work_tags: SeaORM entity foruser_work_tags: one user's tags on a work, one row per tag.users: SeaORM entity for theuserstable 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 forwindow_book_parts: one piece of a window book's stored edition and identifiers (control_plane::window_books).window_books: SeaORM entity forwindow_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 thework_identifierstable (composite primary key).work_tags: SeaORM entity forwork_tags: library tags on a top-level work, one row per tag and source.works: SeaORM entity for theworkstable (text primary key).
Generated from crates/bookclerk-library at main · View as Markdown