# bookclerk_library::entities::storage_scan_generations

Ownership row for one durable storage-scan generation.

`storage_scan_rows` are keyed only by `scan_id`. This row binds that id to
the storage instance and, when the scan runs inside a job, the job that
owns it. Cleanup uses the row to tell a live scan from an abandoned one.

| Item | Kind | Summary |
| --- | --- | --- |
| [`Model`](#model) | struct | One scan generation. |
| [`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 | No declared relations. |

## Structs

### Model

```rust
pub struct Model {
    pub scan_id: String,
    pub instance_id: String,
    pub job_id: String,
    pub updated_at: String,
    pub completed: i64,
}
```

One scan generation.

**Fields**

- `scan_id`: Globally unique scan id.
- `instance_id`: Storage instance id (`StorageBackend::instance_id`) this generation lists.
- `job_id`: Job id when the scan is fenced. Empty when the scan has no job.
- `updated_at`: RFC 3339 heartbeat. Page ingestion updates this.
- `completed`: 1 after the list phase finished and the inventory can be adopted.

#### 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 scan_id: ActiveValue<String>,
    pub instance_id: ActiveValue<String>,
    pub job_id: ActiveValue<String>,
    pub updated_at: ActiveValue<String>,
    pub completed: ActiveValue<i64>,
}
```

Generated by sea-orm-macros

**Fields**

- `scan_id`: Generated by sea-orm-macros
- `instance_id`: Generated by sea-orm-macros
- `job_id`: Generated by sea-orm-macros
- `updated_at`: Generated by sea-orm-macros
- `completed`: 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 {
    ScanId,
    InstanceId,
    JobId,
    UpdatedAt,
    Completed,
}
```

Generated by sea-orm-macros

**Variants**

- `ScanId`: Generated by sea-orm-macros
- `InstanceId`: Generated by sea-orm-macros
- `JobId`: Generated by sea-orm-macros
- `UpdatedAt`: Generated by sea-orm-macros
- `Completed`: Generated by sea-orm-macros

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

### PrimaryKey

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

Generated by sea-orm-macros

**Variants**

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

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

### Relation

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

No declared relations.

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