# bookclerk_library::entities::library_links

SeaORM entity for `library_links`: on a branch node, the libraries it
enrolled into (written by `control_plane::record_library_link`).

| Item | Kind | Summary |
| --- | --- | --- |
| [`Model`](#model) | struct | Row shape for one link from this install to a library. |
| [`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 parent_library_id: String,
    pub owner_origin: String,
    pub remote_node_id: String,
    pub spki_pin: Option<String>,
    pub state: String,
    pub enrolled_at: String,
    pub share_books: i64,
    pub include_branches: i64,
    pub ancestry_json: String,
    pub work_for_members: i64,
    pub keep_member_copies: i64,
    pub max_jobs: Option<i64>,
    pub list_members_books: i64,
    pub keep_copies: i64,
    pub person_user_id: Option<i64>,
}
```

Row shape for one link from this install to a library.

**Fields**

- `parent_library_id`: Library id returned by enrollment.
- `owner_origin`: Owner origin (`https://owner.example`).
- `remote_node_id`: Node id the owner minted for this install.
- `spki_pin`: SPKI pin from the enrollment link, when it carried one.
- `state`: `active`, `revoked`, or `left`.
- `enrolled_at`: RFC 3339 enrollment time.
- `share_books`: "Share this branch's books with *library*" (1 = on, the default).
- `include_branches`: "Include books from my own branches" (1 = on, the default).
- `ancestry_json`: The owner library's ancestry (JSON list of library ids, the owner's
  own first), as it last reported it.
- `work_for_members`: "Download for other members of *library*" (0 = off, the default):
  the branch takes work for the library's other members too, not only
  its owner's.
- `keep_member_copies`: "Keep copies of other members' books" (0 = off, the default): a
  book acquired here for another member is also written to this
  install's own destinations.
- `max_jobs`: The most jobs this install runs for the library at once, set by its
  operator; `NULL` leaves it to the equal share of the machine.
- `list_members_books`: "List my members' books to *library*" (1 = on, the default): the
  branch answers that library's catalog lookups with its members'
  books as well as its owner's.
- `keep_copies`: "Keep copies on this computer" (1 = on, the default): the branch
  takes the library's copies of its person's books into its own
  storage. It takes the library's work either way.
- `person_user_id`: The local user who joined the library through this link (`NULL`
  when nobody could be named, such as a join with several Owners and
  no signed-in Administrator). Only this person may add their own
  store connections to the library or withdraw them through it.

#### 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 parent_library_id: ActiveValue<String>,
    pub owner_origin: ActiveValue<String>,
    pub remote_node_id: ActiveValue<String>,
    pub spki_pin: ActiveValue<Option<String>>,
    pub state: ActiveValue<String>,
    pub enrolled_at: ActiveValue<String>,
    pub share_books: ActiveValue<i64>,
    pub include_branches: ActiveValue<i64>,
    pub ancestry_json: ActiveValue<String>,
    pub work_for_members: ActiveValue<i64>,
    pub keep_member_copies: ActiveValue<i64>,
    pub max_jobs: ActiveValue<Option<i64>>,
    pub list_members_books: ActiveValue<i64>,
    pub keep_copies: ActiveValue<i64>,
    pub person_user_id: ActiveValue<Option<i64>>,
}
```

Generated by sea-orm-macros

**Fields**

- `parent_library_id`: Generated by sea-orm-macros
- `owner_origin`: Generated by sea-orm-macros
- `remote_node_id`: Generated by sea-orm-macros
- `spki_pin`: Generated by sea-orm-macros
- `state`: Generated by sea-orm-macros
- `enrolled_at`: Generated by sea-orm-macros
- `share_books`: Generated by sea-orm-macros
- `include_branches`: Generated by sea-orm-macros
- `ancestry_json`: Generated by sea-orm-macros
- `work_for_members`: Generated by sea-orm-macros
- `keep_member_copies`: Generated by sea-orm-macros
- `max_jobs`: Generated by sea-orm-macros
- `list_members_books`: Generated by sea-orm-macros
- `keep_copies`: Generated by sea-orm-macros
- `person_user_id`: 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 {
    ParentLibraryId,
    OwnerOrigin,
    RemoteNodeId,
    SpkiPin,
    State,
    EnrolledAt,
    ShareBooks,
    IncludeBranches,
    AncestryJson,
    WorkForMembers,
    KeepMemberCopies,
    MaxJobs,
    ListMembersBooks,
    KeepCopies,
    PersonUserId,
}
```

Generated by sea-orm-macros

**Variants**

- `ParentLibraryId`: Generated by sea-orm-macros
- `OwnerOrigin`: Generated by sea-orm-macros
- `RemoteNodeId`: Generated by sea-orm-macros
- `SpkiPin`: Generated by sea-orm-macros
- `State`: Generated by sea-orm-macros
- `EnrolledAt`: Generated by sea-orm-macros
- `ShareBooks`: Generated by sea-orm-macros
- `IncludeBranches`: Generated by sea-orm-macros
- `AncestryJson`: Generated by sea-orm-macros
- `WorkForMembers`: Generated by sea-orm-macros
- `KeepMemberCopies`: Generated by sea-orm-macros
- `MaxJobs`: Generated by sea-orm-macros
- `ListMembersBooks`: Generated by sea-orm-macros
- `KeepCopies`: Generated by sea-orm-macros
- `PersonUserId`: Generated by sea-orm-macros

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

### PrimaryKey

```rust
pub enum PrimaryKey {
    ParentLibraryId,
}
```

Generated by sea-orm-macros

**Variants**

- `ParentLibraryId`: 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`
