bookclerk_library::entities::discover_candidates

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

Last updated View as Markdown

SeaORM entity for the discover_candidates table.

Item Kind Summary
Model struct One storefront title fetched for one Discover subject: a reference to the shared listing plus what is personal to the subject (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 id: i64,
    pub subject_key: String,
    pub source: String,
    pub listing_id: String,
    pub seed_scope: String,
    pub origin: String,
    pub seed_title: Option<String>,
    pub seed_categories: Option<String>,
    pub starter_genre: Option<String>,
    pub fetched_at: String,
}

One storefront title fetched for one Discover subject: a reference to the shared listing plus what is personal to the subject (DeriveEntityModel).

Rows for a (subject_key, source) pair are replaced together when that store's fetch for the subject finishes, so one slow store never erases another store's results.

Fields

  • id: Surrogate primary key assigned by the database.
  • subject_key: Discover subject the candidate was fetched for (operator, user:<id>, portal:<id>).
  • source: Storefront plugin id that returned the title (audible, chirp, …).
  • listing_id: The store_listings row the candidate is (shared by every subject).
  • seed_scope: Which seeds produced the row: own (the subject's taste) or household.
  • origin: How the store found it (related to …, deals), as it said.
  • seed_title: The subject's title that seeded it, when a seed did.
  • seed_categories: Categories of that seed, used to explain and rank the card.
  • starter_genre: Starter genre it was browsed from, for a subject with thin taste.
  • fetched_at: RFC 3339 timestamp of the store fetch that produced the row.

Model::into_ex

pub fn into_ex(self) -> Self

Generated by sea-orm-macros

Implements: Clone, Debug, Eq, 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 id: ActiveValue<i64>,
    pub subject_key: ActiveValue<String>,
    pub source: ActiveValue<String>,
    pub listing_id: ActiveValue<String>,
    pub seed_scope: ActiveValue<String>,
    pub origin: ActiveValue<String>,
    pub seed_title: ActiveValue<Option<String>>,
    pub seed_categories: ActiveValue<Option<String>>,
    pub starter_genre: ActiveValue<Option<String>>,
    pub fetched_at: ActiveValue<String>,
}

Generated by sea-orm-macros

Fields

  • id: Generated by sea-orm-macros
  • subject_key: Generated by sea-orm-macros
  • source: Generated by sea-orm-macros
  • listing_id: Generated by sea-orm-macros
  • seed_scope: Generated by sea-orm-macros
  • origin: Generated by sea-orm-macros
  • seed_title: Generated by sea-orm-macros
  • seed_categories: Generated by sea-orm-macros
  • starter_genre: Generated by sea-orm-macros
  • fetched_at: 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 {
    Id,
    SubjectKey,
    Source,
    ListingId,
    SeedScope,
    Origin,
    SeedTitle,
    SeedCategories,
    StarterGenre,
    FetchedAt,
}

Generated by sea-orm-macros

Variants

  • Id: Generated by sea-orm-macros
  • SubjectKey: Generated by sea-orm-macros
  • Source: Generated by sea-orm-macros
  • ListingId: Generated by sea-orm-macros
  • SeedScope: Generated by sea-orm-macros
  • Origin: Generated by sea-orm-macros
  • SeedTitle: Generated by sea-orm-macros
  • SeedCategories: Generated by sea-orm-macros
  • StarterGenre: Generated by sea-orm-macros
  • FetchedAt: Generated by sea-orm-macros

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

PrimaryKey

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

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