# bookclerk_library::entities::plugin_webhooks

SeaORM entity for `plugin_webhooks`: one inbound webhook of one plugin
instance, with its URL token (storage destinations ADR,
`docs/adr/storage-destinations.md`, decision 6).

| 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). |

## Structs

### Model

```rust
pub struct Model {
    pub instance_id: String,
    pub name: String,
    pub token_hash: String,
    pub token_sealed: String,
    pub token_nonce: String,
    pub missed: i64,
    pub created_at: String,
}
```

Row shape for this table (`DeriveEntityModel`).

**Fields**

- `instance_id`: Owning plugin instance id.
- `name`: `[[webhooks]]` name.
- `token_hash`: Lowercase hex SHA-256 of the URL token; the public route looks the
  webhook up by it.
- `token_sealed`: The URL token sealed with the library key, base64.
- `token_nonce`: Seal nonce, base64.
- `missed`: 1 when a request was dropped since the last pull, else 0.
- `created_at`: RFC 3339 time the token was minted.

#### 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 instance_id: ActiveValue<String>,
    pub name: ActiveValue<String>,
    pub token_hash: ActiveValue<String>,
    pub token_sealed: ActiveValue<String>,
    pub token_nonce: ActiveValue<String>,
    pub missed: ActiveValue<i64>,
    pub created_at: ActiveValue<String>,
}
```

Generated by sea-orm-macros

**Fields**

- `instance_id`: Generated by sea-orm-macros
- `name`: Generated by sea-orm-macros
- `token_hash`: Generated by sea-orm-macros
- `token_sealed`: Generated by sea-orm-macros
- `token_nonce`: Generated by sea-orm-macros
- `missed`: Generated by sea-orm-macros
- `created_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 {
    InstanceId,
    Name,
    TokenHash,
    TokenSealed,
    TokenNonce,
    Missed,
    CreatedAt,
}
```

Generated by sea-orm-macros

**Variants**

- `InstanceId`: Generated by sea-orm-macros
- `Name`: Generated by sea-orm-macros
- `TokenHash`: Generated by sea-orm-macros
- `TokenSealed`: Generated by sea-orm-macros
- `TokenNonce`: Generated by sea-orm-macros
- `Missed`: Generated by sea-orm-macros
- `CreatedAt`: Generated by sea-orm-macros

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

### PrimaryKey

```rust
pub enum PrimaryKey {
    InstanceId,
    Name,
}
```

Generated by sea-orm-macros

**Variants**

- `InstanceId`: Generated by sea-orm-macros
- `Name`: 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`
