bookclerk_library::entities::notifications

Development These docs follow the development version and change with every merge.

Last updated View as Markdown

SeaORM entity for notifications: one notification the router accepted, rendered once for every destination and the inbox.

Item Kind Summary
Model struct Row shape for this table (DeriveEntityModel).
ColumnIter struct An iterator over the variants of [Column]
Entity struct Generated by sea-orm-macros
PrimaryKeyIter struct An iterator over the variants of [PrimaryKey]
ActiveModel struct Generated by sea-orm-macros
RelationIter struct An iterator over the variants of [Relation]
Column enum Generated by sea-orm-macros
PrimaryKey enum Generated by sea-orm-macros
Relation enum Declared SeaORM relations (none).

Structs

Model

pub struct Model {
    pub id: String,
    pub notification_type: String,
    pub audience: String,
    pub severity: String,
    pub title: String,
    pub body_text: String,
    pub link_path: Option<String>,
    pub fields_json: String,
    pub group_key: Option<String>,
    pub alert_action: String,
    pub alert_key: Option<String>,
    pub source: String,
    pub user_id: Option<i64>,
    pub created_at: String,
}

Row shape for this table (DeriveEntityModel).

Fields

  • id: Random UUID; the notificationId every copy carries.
  • notification_type: Qualified notification type.
  • audience: operational, patron or account.
  • severity: info, warning or critical.
  • title: Short title.
  • body_text: Plain-text body.
  • link_path: Path inside the library the notification links to; the send job prefixes the public origin.
  • fields_json: JSON array of {name, value} fields.
  • group_key: Grouping key, when the raiser gave one.
  • alert_action: none, trigger or resolve.
  • alert_key: Alert key; set exactly when alert_action is not none.
  • source: Empty for a host type, else the raising plugin's id.
  • user_id: Patron a patron-audience notification is for.
  • created_at: RFC 3339 creation time.

Model::into_ex

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

pub struct ColumnIter {
    /* private fields */
}

An iterator over the variants of Column

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

Entity

pub struct Entity;

Generated by sea-orm-macros

Implements: Clone, Copy, Debug, Default, EntityName, EntityTrait, Iden, IdenStatic

PrimaryKeyIter

pub struct PrimaryKeyIter {
    /* private fields */
}

An iterator over the variants of PrimaryKey

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

ActiveModel

pub struct ActiveModel {
    pub id: ActiveValue<String>,
    pub notification_type: ActiveValue<String>,
    pub audience: ActiveValue<String>,
    pub severity: ActiveValue<String>,
    pub title: ActiveValue<String>,
    pub body_text: ActiveValue<String>,
    pub link_path: ActiveValue<Option<String>>,
    pub fields_json: ActiveValue<String>,
    pub group_key: ActiveValue<Option<String>>,
    pub alert_action: ActiveValue<String>,
    pub alert_key: ActiveValue<Option<String>>,
    pub source: ActiveValue<String>,
    pub user_id: ActiveValue<Option<i64>>,
    pub created_at: ActiveValue<String>,
}

Generated by sea-orm-macros

Fields

  • id: Generated by sea-orm-macros
  • notification_type: Generated by sea-orm-macros
  • audience: Generated by sea-orm-macros
  • severity: Generated by sea-orm-macros
  • title: Generated by sea-orm-macros
  • body_text: Generated by sea-orm-macros
  • link_path: Generated by sea-orm-macros
  • fields_json: Generated by sea-orm-macros
  • group_key: Generated by sea-orm-macros
  • alert_action: Generated by sea-orm-macros
  • alert_key: Generated by sea-orm-macros
  • source: Generated by sea-orm-macros
  • user_id: 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

pub struct RelationIter {
    /* private fields */
}

An iterator over the variants of Relation

Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator

Enums

Column

pub enum Column {
    Id,
    NotificationType,
    Audience,
    Severity,
    Title,
    BodyText,
    LinkPath,
    FieldsJson,
    GroupKey,
    AlertAction,
    AlertKey,
    Source,
    UserId,
    CreatedAt,
}

Generated by sea-orm-macros

Variants

  • Id: Generated by sea-orm-macros
  • NotificationType: Generated by sea-orm-macros
  • Audience: Generated by sea-orm-macros
  • Severity: Generated by sea-orm-macros
  • Title: Generated by sea-orm-macros
  • BodyText: Generated by sea-orm-macros
  • LinkPath: Generated by sea-orm-macros
  • FieldsJson: Generated by sea-orm-macros
  • GroupKey: Generated by sea-orm-macros
  • AlertAction: Generated by sea-orm-macros
  • AlertKey: Generated by sea-orm-macros
  • Source: Generated by sea-orm-macros
  • UserId: Generated by sea-orm-macros
  • CreatedAt: Generated by sea-orm-macros

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

PrimaryKey

pub enum PrimaryKey {
    Id,
}

Generated by sea-orm-macros

Variants

  • Id: Generated by sea-orm-macros

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

Relation

pub enum Relation {}

Declared SeaORM relations (none).

Implements: Clone, Copy, Debug, IntoEnumIterator, RelationTrait

Generated from crates/bookclerk-library at main · View as Markdown