bookclerk_library::entities::node_enrollment_links

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

Last updated View as Markdown

SeaORM entity for node_enrollment_links: single-use links that enroll a branch node into this library. Only the hash of each link's secret is stored.

Item Kind Summary
Model struct Row shape for one enrollment link.
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 link_id: String,
    pub token_hash: String,
    pub for_user_id: i64,
    pub label: String,
    pub created_by: String,
    pub created_at: String,
    pub expires_at: String,
    pub redeemed_at: Option<String>,
    pub redeemed_node_id: Option<String>,
    pub revoked_at: Option<String>,
    pub bring_accounts: i64,
}

Row shape for one enrollment link.

Fields

  • link_id: Public link id (the second field of bcn1.<link_id>.<secret>).
  • token_hash: hash_token(secret). The secret itself is never stored.
  • for_user_id: User who will own the enrolled node.
  • label: Free-form label shown in listings.
  • created_by: Audit id of the minter (operator:<id> or user:<id>).
  • created_at: RFC 3339 mint time.
  • expires_at: RFC 3339 expiry.
  • redeemed_at: RFC 3339 redeem time, once redeemed.
  • redeemed_node_id: Node the redeem created.
  • revoked_at: RFC 3339 revoke time, once revoked.
  • bring_accounts: 1 when the user who approved a branch sign-in chose "Bring my store connections to this branch": the redeem answer then carries the user's own shareable store accounts, sealed to the node.

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 link_id: ActiveValue<String>,
    pub token_hash: ActiveValue<String>,
    pub for_user_id: ActiveValue<i64>,
    pub label: ActiveValue<String>,
    pub created_by: ActiveValue<String>,
    pub created_at: ActiveValue<String>,
    pub expires_at: ActiveValue<String>,
    pub redeemed_at: ActiveValue<Option<String>>,
    pub redeemed_node_id: ActiveValue<Option<String>>,
    pub revoked_at: ActiveValue<Option<String>>,
    pub bring_accounts: ActiveValue<i64>,
}

Generated by sea-orm-macros

Fields

  • link_id: Generated by sea-orm-macros
  • token_hash: Generated by sea-orm-macros
  • for_user_id: Generated by sea-orm-macros
  • label: Generated by sea-orm-macros
  • created_by: Generated by sea-orm-macros
  • created_at: Generated by sea-orm-macros
  • expires_at: Generated by sea-orm-macros
  • redeemed_at: Generated by sea-orm-macros
  • redeemed_node_id: Generated by sea-orm-macros
  • revoked_at: Generated by sea-orm-macros
  • bring_accounts: 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 {
    LinkId,
    TokenHash,
    ForUserId,
    Label,
    CreatedBy,
    CreatedAt,
    ExpiresAt,
    RedeemedAt,
    RedeemedNodeId,
    RevokedAt,
    BringAccounts,
}

Generated by sea-orm-macros

Variants

  • LinkId: Generated by sea-orm-macros
  • TokenHash: Generated by sea-orm-macros
  • ForUserId: Generated by sea-orm-macros
  • Label: Generated by sea-orm-macros
  • CreatedBy: Generated by sea-orm-macros
  • CreatedAt: Generated by sea-orm-macros
  • ExpiresAt: Generated by sea-orm-macros
  • RedeemedAt: Generated by sea-orm-macros
  • RedeemedNodeId: Generated by sea-orm-macros
  • RevokedAt: Generated by sea-orm-macros
  • BringAccounts: Generated by sea-orm-macros

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

PrimaryKey

pub enum PrimaryKey {
    LinkId,
}

Generated by sea-orm-macros

Variants

  • LinkId: 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