bookclerk_library::entities::edition_acquisitions

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

Last updated View as Markdown

SeaORM entity for edition_acquisitions: each edition's acquire state.

Files belong to editions, so one acquire serves every title an account holds of the edition. Written beside the title's own status by crate::LibraryStore::set_acquire_status (audio) and crate::LibraryStore::set_pdf_status (companion PDF); an edition with no row is not acquired.

Item Kind Summary
Model struct Row shape for this table (DeriveEntityModel).
ColumnIter struct An iterator over the variants of [Column]
Entity struct Generated by sea-orm-macros
PrimaryKeyIter struct An iterator over the variants of [PrimaryKey]
ActiveModel struct Generated by sea-orm-macros
RelationIter struct An iterator over the variants of [Relation]
Column enum Generated by sea-orm-macros
PrimaryKey enum Generated by sea-orm-macros
Relation enum Declared SeaORM relations (none unless FK edges are modeled).

Structs

Model

pub struct Model {
    pub edition_id: String,
    pub status: String,
    pub storage_key: Option<String>,
    pub error_message: Option<String>,
    pub holding_id: String,
    pub updated_at: String,
    pub pdf_status: String,
    pub pdf_storage_key: Option<String>,
    pub pdf_holding_id: Option<String>,
}

Row shape for this table (DeriveEntityModel).

Fields

  • edition_id: The edition (editions.id).
  • status: Acquire state (AcquireStatus::as_str): not_acquired, queued, downloading, acquired or error.
  • storage_key: Primary destination key of the edition's audio once acquired.
  • error_message: Last acquire failure message for operators.
  • holding_id: The account holding (holdings.id) whose title's write set this row; while the holding exists, only its writes change an acquired edition.
  • updated_at: RFC 3339 timestamp when the row was last modified.
  • pdf_status: Companion PDF state (AcquireStatus::as_str), not_acquired until a PDF write.
  • pdf_storage_key: Primary destination key of the edition's companion PDF once acquired.
  • pdf_holding_id: The account holding (holdings.id) whose title's write set the PDF state; while the holding exists, only its writes change an acquired PDF. None before any PDF write.

Model::into_ex

pub fn into_ex(self) -> Self

Generated by sea-orm-macros

Implements: Clone, Debug, From<Model>, FromQueryResult, IntoActiveModel<ActiveModel>, ModelTrait, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>

ColumnIter

pub struct ColumnIter {
    /* private fields */
}

An iterator over the variants of Column

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

Entity

pub struct Entity;

Generated by sea-orm-macros

Implements: Clone, Copy, Debug, Default, EntityName, EntityTrait, Iden, IdenStatic

PrimaryKeyIter

pub struct PrimaryKeyIter {
    /* private fields */
}

An iterator over the variants of PrimaryKey

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

ActiveModel

pub struct ActiveModel {
    pub edition_id: ActiveValue<String>,
    pub status: ActiveValue<String>,
    pub storage_key: ActiveValue<Option<String>>,
    pub error_message: ActiveValue<Option<String>>,
    pub holding_id: ActiveValue<String>,
    pub updated_at: ActiveValue<String>,
    pub pdf_status: ActiveValue<String>,
    pub pdf_storage_key: ActiveValue<Option<String>>,
    pub pdf_holding_id: ActiveValue<Option<String>>,
}

Generated by sea-orm-macros

Fields

  • edition_id: Generated by sea-orm-macros
  • status: Generated by sea-orm-macros
  • storage_key: Generated by sea-orm-macros
  • error_message: Generated by sea-orm-macros
  • holding_id: Generated by sea-orm-macros
  • updated_at: Generated by sea-orm-macros
  • pdf_status: Generated by sea-orm-macros
  • pdf_storage_key: Generated by sea-orm-macros
  • pdf_holding_id: Generated by sea-orm-macros

Implements: ActiveModelBehavior, ActiveModelTrait, Clone, Debug, Default, From<Model>, IntoActiveModel<ActiveModel>, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>

RelationIter

pub struct RelationIter {
    /* private fields */
}

An iterator over the variants of Relation

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

Enums

Column

pub enum Column {
    EditionId,
    Status,
    StorageKey,
    ErrorMessage,
    HoldingId,
    UpdatedAt,
    PdfStatus,
    PdfStorageKey,
    PdfHoldingId,
}

Generated by sea-orm-macros

Variants

  • EditionId: Generated by sea-orm-macros
  • Status: Generated by sea-orm-macros
  • StorageKey: Generated by sea-orm-macros
  • ErrorMessage: Generated by sea-orm-macros
  • HoldingId: Generated by sea-orm-macros
  • UpdatedAt: Generated by sea-orm-macros
  • PdfStatus: Generated by sea-orm-macros
  • PdfStorageKey: Generated by sea-orm-macros
  • PdfHoldingId: Generated by sea-orm-macros

Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator

PrimaryKey

pub enum PrimaryKey {
    EditionId,
}

Generated by sea-orm-macros

Variants

  • EditionId: Generated by sea-orm-macros

Implements: Clone, Copy, Debug, Iden, IdenStatic, IntoEnumIterator, PrimaryKeyToColumn, PrimaryKeyTrait

Relation

pub enum Relation {}

Declared SeaORM relations (none unless FK edges are modeled).

Implements: Clone, Copy, Debug, IntoEnumIterator, RelationTrait

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