# bookclerk_library::entities::user_preferences

SeaORM entity for the `user_preferences` table.

| 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 id: i64,
    pub subject_key: String,
    pub identity_id: Option<i64>,
    pub default_view: String,
    pub disabled_shelves_json: String,
    pub discover_sort: String,
    pub discover_sort_dir: String,
    pub discover_language: Option<String>,
    pub discover_excluded_sources_json: String,
    pub theme: String,
    pub updated_at: String,
}
```

Row shape for this table (`DeriveEntityModel`).

**Fields**

- `id`: Surrogate primary key assigned by the database.
- `subject_key`: Preference subject key (`operator`, `user:<id>`, portal key).
- `identity_id`: Foreign key to `portal_identities.id`.
- `default_view`: Preferred library SPA view identifier (for example `grid` or `list`).
- `disabled_shelves_json`: JSON list of shelf ids hidden in the UI.
- `discover_sort`: Preferred Discover sort column (for example `title` or `added`).
- `discover_sort_dir`: Discover sort direction (`asc` / `desc`).
- `discover_language`: BCP-47 language code used to filter Discover results, when set.
- `discover_excluded_sources_json`: JSON list of storefronts excluded from Discover.
- `theme`: Appearance preference (`system`, `light`, or `dark`).
- `updated_at`: RFC 3339 timestamp when the row was last modified.

#### 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 identity_id: ActiveValue<Option<i64>>,
    pub default_view: ActiveValue<String>,
    pub disabled_shelves_json: ActiveValue<String>,
    pub discover_sort: ActiveValue<String>,
    pub discover_sort_dir: ActiveValue<String>,
    pub discover_language: ActiveValue<Option<String>>,
    pub discover_excluded_sources_json: ActiveValue<String>,
    pub theme: ActiveValue<String>,
    pub updated_at: ActiveValue<String>,
}
```

Generated by sea-orm-macros

**Fields**

- `id`: Generated by sea-orm-macros
- `subject_key`: Generated by sea-orm-macros
- `identity_id`: Generated by sea-orm-macros
- `default_view`: Generated by sea-orm-macros
- `disabled_shelves_json`: Generated by sea-orm-macros
- `discover_sort`: Generated by sea-orm-macros
- `discover_sort_dir`: Generated by sea-orm-macros
- `discover_language`: Generated by sea-orm-macros
- `discover_excluded_sources_json`: Generated by sea-orm-macros
- `theme`: Generated by sea-orm-macros
- `updated_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,
    IdentityId,
    DefaultView,
    DisabledShelvesJson,
    DiscoverSort,
    DiscoverSortDir,
    DiscoverLanguage,
    DiscoverExcludedSourcesJson,
    Theme,
    UpdatedAt,
}
```

Generated by sea-orm-macros

**Variants**

- `Id`: Generated by sea-orm-macros
- `SubjectKey`: Generated by sea-orm-macros
- `IdentityId`: Generated by sea-orm-macros
- `DefaultView`: Generated by sea-orm-macros
- `DisabledShelvesJson`: Generated by sea-orm-macros
- `DiscoverSort`: Generated by sea-orm-macros
- `DiscoverSortDir`: Generated by sea-orm-macros
- `DiscoverLanguage`: Generated by sea-orm-macros
- `DiscoverExcludedSourcesJson`: Generated by sea-orm-macros
- `Theme`: Generated by sea-orm-macros
- `UpdatedAt`: 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`
