# bookclerk_library::entities::library_work_facets

SeaORM entity for `library_work_facets`: the page index's filter values.

One row per value a held top-level work has under a facet (author,
narrator, series, genre, publisher or source), written with the work's
`library_work_rows` row by
[`crate::LibraryStore::refresh_library_works`](/docs/internals/crates/bookclerk_library/index.md#librarystorerefresh_library_works).

| Item | Kind | Summary |
| --- | --- | --- |
| [`Model`](#model) | struct | Row shape for this table (`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 work_id: String,
    pub facet: String,
    pub key: String,
    pub value: String,
}
```

Row shape for this table (`DeriveEntityModel`).

**Fields**

- `work_id`: The work (`works.id`); a top-level work, never a podcast episode.
- `facet`: The facet (`WorkFacet::as_str`), such as `genre`.
- `key`: The value lower-cased, which a filter matches.
- `value`: The value as the library shows it.

#### Model::into_ex

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

```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 work_id: ActiveValue<String>,
    pub facet: ActiveValue<String>,
    pub key: ActiveValue<String>,
    pub value: ActiveValue<String>,
}
```

Generated by sea-orm-macros

**Fields**

- `work_id`: Generated by sea-orm-macros
- `facet`: Generated by sea-orm-macros
- `key`: Generated by sea-orm-macros
- `value`: 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 {
    WorkId,
    Facet,
    Key,
    Value,
}
```

Generated by sea-orm-macros

**Variants**

- `WorkId`: Generated by sea-orm-macros
- `Facet`: Generated by sea-orm-macros
- `Key`: Generated by sea-orm-macros
- `Value`: Generated by sea-orm-macros

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

### PrimaryKey

```rust
pub enum PrimaryKey {
    WorkId,
    Facet,
    Key,
}
```

Generated by sea-orm-macros

**Variants**

- `WorkId`: Generated by sea-orm-macros
- `Facet`: Generated by sea-orm-macros
- `Key`: 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`
