# bookclerk_library::entities::discover_candidates

SeaORM entity for the `discover_candidates` table.

| Item | Kind | Summary |
| --- | --- | --- |
| [`Model`](#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`](#columniter) | struct | An iterator over the variants of [Column] |
| [`Entity`](#entity) | struct | Generated by sea-orm-macros |
| [`PrimaryKeyIter`](#primarykeyiter) | struct | An iterator over the variants of [PrimaryKey] |
| [`ActiveModel`](#activemodel) | struct | Generated by sea-orm-macros |
| [`RelationIter`](#relationiter) | struct | An iterator over the variants of [Relation] |
| [`Column`](#column) | enum | Generated by sea-orm-macros |
| [`PrimaryKey`](#primarykey) | enum | Generated by sea-orm-macros |
| [`Relation`](#relation) | enum | Declared SeaORM relations (none unless FK edges are modeled). |

## Structs

### Model

```rust
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

```rust
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

```rust
pub struct ColumnIter {
    /* private fields */
}
```

An iterator over the variants of [Column](#column)

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

### Entity

```rust
pub struct Entity;
```

Generated by sea-orm-macros

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

### PrimaryKeyIter

```rust
pub struct PrimaryKeyIter {
    /* private fields */
}
```

An iterator over the variants of [PrimaryKey](#primarykey)

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

### ActiveModel

```rust
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

```rust
pub struct RelationIter {
    /* private fields */
}
```

An iterator over the variants of [Relation](#relation)

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

## Enums

### Column

```rust
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

```rust
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

```rust
pub enum Relation {}
```

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

Implements: `Clone`, `Copy`, `Debug`, `IntoEnumIterator`, `RelationTrait`
