# bookclerk_library::entities::clerk_links

SeaORM entity for `clerk_links`: on a clerk, the libraries this install
holds a library card for (written by `control_plane::record_clerk_link`).

| Item | Kind | Summary |
| --- | --- | --- |
| [`Model`](#model) | struct | One library this install signed in to with a library card. |
| [`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). |

## Structs

### Model

```rust
pub struct Model {
    pub library_id: String,
    pub origin: String,
    pub spki_pin: Option<String>,
    pub library_name: String,
    pub remote_user_id: i64,
    pub display_name: Option<String>,
    pub clerk_name: String,
    pub state: String,
    pub created_at: String,
    pub updated_at: String,
}
```

One library this install signed in to with a library card.

**Fields**

- `library_id`: The library id, as its token answer named it.
- `origin`: The library's canonical origin (`https://library.example`).
- `spki_pin`: SPKI pin confirmed for a self-signed library, when it is one.
- `library_name`: The library's name, as its info reported it at sign-in.
- `remote_user_id`: The person's user id on the library.
- `display_name`: The person's display name on the library, when it has one.
- `clerk_name`: The name this install signed in as (shown in the person's session
  list on the library).
- `state`: `active` while the card is held, `signed_out` once the library
  ended it.
- `created_at`: RFC 3339 time of the sign-in.
- `updated_at`: RFC 3339 time of the last change.

#### 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 library_id: ActiveValue<String>,
    pub origin: ActiveValue<String>,
    pub spki_pin: ActiveValue<Option<String>>,
    pub library_name: ActiveValue<String>,
    pub remote_user_id: ActiveValue<i64>,
    pub display_name: ActiveValue<Option<String>>,
    pub clerk_name: ActiveValue<String>,
    pub state: ActiveValue<String>,
    pub created_at: ActiveValue<String>,
    pub updated_at: ActiveValue<String>,
}
```

Generated by sea-orm-macros

**Fields**

- `library_id`: Generated by sea-orm-macros
- `origin`: Generated by sea-orm-macros
- `spki_pin`: Generated by sea-orm-macros
- `library_name`: Generated by sea-orm-macros
- `remote_user_id`: Generated by sea-orm-macros
- `display_name`: Generated by sea-orm-macros
- `clerk_name`: Generated by sea-orm-macros
- `state`: Generated by sea-orm-macros
- `created_at`: 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 {
    LibraryId,
    Origin,
    SpkiPin,
    LibraryName,
    RemoteUserId,
    DisplayName,
    ClerkName,
    State,
    CreatedAt,
    UpdatedAt,
}
```

Generated by sea-orm-macros

**Variants**

- `LibraryId`: Generated by sea-orm-macros
- `Origin`: Generated by sea-orm-macros
- `SpkiPin`: Generated by sea-orm-macros
- `LibraryName`: Generated by sea-orm-macros
- `RemoteUserId`: Generated by sea-orm-macros
- `DisplayName`: Generated by sea-orm-macros
- `ClerkName`: Generated by sea-orm-macros
- `State`: Generated by sea-orm-macros
- `CreatedAt`: 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 {
    LibraryId,
}
```

Generated by sea-orm-macros

**Variants**

- `LibraryId`: Generated by sea-orm-macros

Implements: `Clone`, `Copy`, `Debug`, `Iden`, `IdenStatic`, `IntoEnumIterator`, `PrimaryKeyToColumn`, `PrimaryKeyTrait`

### Relation

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

Declared SeaORM relations (none).

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