# bookclerk_library::entities::ingest_members

SeaORM entity for `ingest_members`: one file of an ingest batch and
what became of it. Written by `control_plane::ingest`.

| Item | Kind | Summary |
| --- | --- | --- |
| [`Model`](#model) | struct | Row shape for one member. |
| [`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 batch_id: String,
    pub member_no: i64,
    pub parent_no: Option<i64>,
    pub path: String,
    pub size: i64,
    pub sha256: Option<String>,
    pub received: i64,
    pub storage_key: Option<String>,
    pub signature: Option<String>,
    pub outcome: String,
    pub reason: Option<String>,
    pub edition_id: Option<String>,
    pub updated_at: String,
}
```

Row shape for one member.

**Fields**

- `batch_id`: The batch (`ingest_batches.id`).
- `member_no`: Position in the batch, from 0: manifest files first, then the
  entries archives expanded into.
- `parent_no`: The archive member this file was expanded from; `None` for a file
  the manifest named.
- `path`: Relative path in the batch (canonical `bookclerk_archive::EntryPath`
  form), or the sanitized name of a refused archive entry.
- `size`: Size in bytes: declared by the manifest, or written by the archive
  walk.
- `sha256`: Lower-case hex SHA-256 the manifest declared, when it declared one.
- `received`: Bytes staged so far (equal to `size` once complete).
- `storage_key`: For an intake member, its key in the batch's intake instance.
- `signature`: For an intake member, the storage signature it was listed with.
- `outcome`: `pending`, `expanded`, `matched`, `needs_review`, `duplicate`,
  `refused` or `failed`.
- `reason`: Why it was refused or failed (a stable snake_case reason).
- `edition_id`: The edition a stored member belongs to.
- `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 batch_id: ActiveValue<String>,
    pub member_no: ActiveValue<i64>,
    pub parent_no: ActiveValue<Option<i64>>,
    pub path: ActiveValue<String>,
    pub size: ActiveValue<i64>,
    pub sha256: ActiveValue<Option<String>>,
    pub received: ActiveValue<i64>,
    pub storage_key: ActiveValue<Option<String>>,
    pub signature: ActiveValue<Option<String>>,
    pub outcome: ActiveValue<String>,
    pub reason: ActiveValue<Option<String>>,
    pub edition_id: ActiveValue<Option<String>>,
    pub updated_at: ActiveValue<String>,
}
```

Generated by sea-orm-macros

**Fields**

- `batch_id`: Generated by sea-orm-macros
- `member_no`: Generated by sea-orm-macros
- `parent_no`: Generated by sea-orm-macros
- `path`: Generated by sea-orm-macros
- `size`: Generated by sea-orm-macros
- `sha256`: Generated by sea-orm-macros
- `received`: Generated by sea-orm-macros
- `storage_key`: Generated by sea-orm-macros
- `signature`: Generated by sea-orm-macros
- `outcome`: Generated by sea-orm-macros
- `reason`: Generated by sea-orm-macros
- `edition_id`: 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 {
    BatchId,
    MemberNo,
    ParentNo,
    Path,
    Size,
    Sha256,
    Received,
    StorageKey,
    Signature,
    Outcome,
    Reason,
    EditionId,
    UpdatedAt,
}
```

Generated by sea-orm-macros

**Variants**

- `BatchId`: Generated by sea-orm-macros
- `MemberNo`: Generated by sea-orm-macros
- `ParentNo`: Generated by sea-orm-macros
- `Path`: Generated by sea-orm-macros
- `Size`: Generated by sea-orm-macros
- `Sha256`: Generated by sea-orm-macros
- `Received`: Generated by sea-orm-macros
- `StorageKey`: Generated by sea-orm-macros
- `Signature`: Generated by sea-orm-macros
- `Outcome`: Generated by sea-orm-macros
- `Reason`: Generated by sea-orm-macros
- `EditionId`: 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 {
    BatchId,
    MemberNo,
}
```

Generated by sea-orm-macros

**Variants**

- `BatchId`: Generated by sea-orm-macros
- `MemberNo`: 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`
