bookclerk_library::entities::holdings
SeaORM entity for the holdings table: who holds a store listing.
| 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). |
pub struct Model {
pub id: String,
pub listing_id: String,
pub holder: String,
pub holder_kind: String,
pub plugin_key: Option<String>,
pub account_id: Option<String>,
pub node_id: Option<String>,
pub user_id: Option<i64>,
pub entitlement: String,
pub purchased_at: Option<String>,
pub seen_pass: Option<String>,
pub share_ref: Option<String>,
pub share_title: Option<String>,
pub share_digest: Option<String>,
pub delivered_digest: Option<String>,
pub delivered_at: Option<String>,
pub created_at: String,
pub updated_at: String,
}
Row shape for this table (DeriveEntityModel).
Fields
id: Random id of this holding; a holding removed and added again gets a new one, so itsholding_addedevent is published again.listing_id: The listing held.holder: Stored holder key,account:<account_id>,node:<node_id>orpatron:<user id>(bookclerk_resolve::Holder::stored); unique withlisting_id.holder_kind:account,nodeorpatron: which of the typed holder columns is set.plugin_key: PluginKey of the holding account (the listing's plugin);Nonefor a node holder.account_id: Holding store account, withplugin_keya foreign key intoaccounts;Nonefor a node holder.node_id: Holding branch library node (nodes.node_id);Nonefor an account holder.user_id: Holding patron (users.id) of an uploaded book;Nonefor an account or node holder.entitlement:purchase,plus,loan,freeorown(an upload).purchased_at: RFC 3339 time it was bought or added, when known.seen_pass: Id of the scan pass that last listed this holding (account_scan_state.pass_id, or the branch's catalog pass start for a node holding);Noneuntil a pass lists it.share_ref: For a node holding,store:product_idas the branch named the title (CatalogRef);Nonefor an account holding.share_title: For a node holding, the title as the branch shared it (JSONCatalogTitle: metadata and file manifest), passed on unchanged when this library is itself a branch.share_digest: For a node holding, the digest of the shared manifest (CatalogTitle::manifest_digest).delivered_digest: For a node holding, the manifest digest whose files reached this library; equal toshare_digestonce the current files arrived.delivered_at: For a node holding, the RFC 3339 time its files last arrived.created_at: RFC 3339 timestamp when the row was inserted.updated_at: RFC 3339 timestamp when the row was last modified.
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>
pub struct ColumnIter {
/* private fields */
}
An iterator over the variants of Column
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub struct Entity;
Generated by sea-orm-macros
Implements: Clone, Copy, Debug, Default, EntityName, EntityTrait, Iden, IdenStatic
pub struct PrimaryKeyIter {
/* private fields */
}
An iterator over the variants of PrimaryKey
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub struct ActiveModel {
pub id: ActiveValue<String>,
pub listing_id: ActiveValue<String>,
pub holder: ActiveValue<String>,
pub holder_kind: ActiveValue<String>,
pub plugin_key: ActiveValue<Option<String>>,
pub account_id: ActiveValue<Option<String>>,
pub node_id: ActiveValue<Option<String>>,
pub user_id: ActiveValue<Option<i64>>,
pub entitlement: ActiveValue<String>,
pub purchased_at: ActiveValue<Option<String>>,
pub seen_pass: ActiveValue<Option<String>>,
pub share_ref: ActiveValue<Option<String>>,
pub share_title: ActiveValue<Option<String>>,
pub share_digest: ActiveValue<Option<String>>,
pub delivered_digest: ActiveValue<Option<String>>,
pub delivered_at: ActiveValue<Option<String>>,
pub created_at: ActiveValue<String>,
pub updated_at: ActiveValue<String>,
}
Generated by sea-orm-macros
Fields
id: Generated by sea-orm-macroslisting_id: Generated by sea-orm-macrosholder: Generated by sea-orm-macrosholder_kind: Generated by sea-orm-macrosplugin_key: Generated by sea-orm-macrosaccount_id: Generated by sea-orm-macrosnode_id: Generated by sea-orm-macrosuser_id: Generated by sea-orm-macrosentitlement: Generated by sea-orm-macrospurchased_at: Generated by sea-orm-macrosseen_pass: Generated by sea-orm-macrosshare_ref: Generated by sea-orm-macrosshare_title: Generated by sea-orm-macrosshare_digest: Generated by sea-orm-macrosdelivered_digest: Generated by sea-orm-macrosdelivered_at: Generated by sea-orm-macroscreated_at: Generated by sea-orm-macrosupdated_at: Generated by sea-orm-macros
Implements: ActiveModelBehavior, ActiveModelTrait, Clone, Debug, Default, From<Model>, IntoActiveModel<ActiveModel>, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>
pub struct RelationIter {
/* private fields */
}
An iterator over the variants of Relation
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub enum Column {
Id,
ListingId,
Holder,
HolderKind,
PluginKey,
AccountId,
NodeId,
UserId,
Entitlement,
PurchasedAt,
SeenPass,
ShareRef,
ShareTitle,
ShareDigest,
DeliveredDigest,
DeliveredAt,
CreatedAt,
UpdatedAt,
}
Generated by sea-orm-macros
Variants
Id: Generated by sea-orm-macrosListingId: Generated by sea-orm-macrosHolder: Generated by sea-orm-macrosHolderKind: Generated by sea-orm-macrosPluginKey: Generated by sea-orm-macrosAccountId: Generated by sea-orm-macrosNodeId: Generated by sea-orm-macrosUserId: Generated by sea-orm-macrosEntitlement: Generated by sea-orm-macrosPurchasedAt: Generated by sea-orm-macrosSeenPass: Generated by sea-orm-macrosShareRef: Generated by sea-orm-macrosShareTitle: Generated by sea-orm-macrosShareDigest: Generated by sea-orm-macrosDeliveredDigest: Generated by sea-orm-macrosDeliveredAt: Generated by sea-orm-macrosCreatedAt: Generated by sea-orm-macrosUpdatedAt: Generated by sea-orm-macros
Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator
pub enum PrimaryKey {
Id,
}
Generated by sea-orm-macros
Variants
Id: Generated by sea-orm-macros
Implements: Clone, Copy, Debug, Iden, IdenStatic, IntoEnumIterator, PrimaryKeyToColumn, PrimaryKeyTrait
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