pub struct NotificationRow {
pub id: String,
pub notification: String,
pub notifiable_type: String,
pub notifiable_id: String,
pub payload: String,
pub read_at: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
}Expand description
One stored notification.
The row behind an in-app bell menu: what it was, who it was for, and whether they have read it.
Fields§
§id: StringA unique id for this stored notification.
notification: StringThe notification’s stable name.
notifiable_type: StringWhat kind of thing it was for.
notifiable_id: StringWhich one.
payload: StringThe payload, as JSON text.
read_at: Option<DateTime<Utc>>When it was read, or NULL while unread.
created_at: DateTime<Utc>When it arrived.
Implementations§
Trait Implementations§
Source§impl Clone for NotificationRow
impl Clone for NotificationRow
Source§fn clone(&self) -> NotificationRow
fn clone(&self) -> NotificationRow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NotificationRow
impl Debug for NotificationRow
Source§impl<'de> Deserialize<'de> for NotificationRow
impl<'de> Deserialize<'de> for NotificationRow
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Entity for NotificationRow
impl Entity for NotificationRow
Source§fn columns() -> &'static [ColumnSpec]
fn columns() -> &'static [ColumnSpec]
Column metadata, in declaration order. Drives both DDL generation and
the column list of generated
INSERTs.Source§fn primary_key() -> &'static str
fn primary_key() -> &'static str
The primary-key column name. Used by
find_by_pk / update /
delete_by_pk.Source§fn indexes() -> &'static [IndexSpec]
fn indexes() -> &'static [IndexSpec]
Secondary indexes (single-column and composite, unique or not),
emitted as separate
CREATE INDEX statements by crate::schema.
Defaults to none.Source§fn foreign_keys() -> &'static [ForeignKeySpec]
fn foreign_keys() -> &'static [ForeignKeySpec]
Foreign-key constraints, emitted inline in the
CREATE TABLE. These
enforce referential integrity within one database; they are not ORM
relationships (no navigation is generated). Defaults to none.Source§fn shard_columns() -> &'static [&'static str]
fn shard_columns() -> &'static [&'static str]
Columns whose values are the shard key — a shard-encoded id
(
#[orm(shard_key)]), the “user id by proxy”. When a query constrains
one of these, the repo layer routes the operation to that id’s shard. Read moreSource§fn from_row(row: &dyn Row) -> Result<Self, Error>
fn from_row(row: &dyn Row) -> Result<Self, Error>
Decode one row into
Self. Generated to read each field through its
FromColumn impl.Source§fn insert_values(&self) -> Vec<(&'static str, Value)>
fn insert_values(&self) -> Vec<(&'static str, Value)>
(column, value) pairs for an INSERT. Auto-increment primary keys
are omitted so the database assigns them.Source§impl Model for NotificationRow
impl Model for NotificationRow
Source§fn model_name() -> &'static str
fn model_name() -> &'static str
The model’s name, for error messages —
"Post".Source§fn route_key_name() -> &'static str
fn route_key_name() -> &'static str
The column route-model binding looks a member up by. Read more
Source§impl PartialEq for NotificationRow
impl PartialEq for NotificationRow
Source§impl Serialize for NotificationRow
impl Serialize for NotificationRow
impl StructuralPartialEq for NotificationRow
Auto Trait Implementations§
impl Freeze for NotificationRow
impl RefUnwindSafe for NotificationRow
impl Send for NotificationRow
impl Sync for NotificationRow
impl Unpin for NotificationRow
impl UnsafeUnpin for NotificationRow
impl UnwindSafe for NotificationRow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Event for T
impl<T> Event for T
Source§fn event_name() -> &'static strwhere
Self: Sized,
fn event_name() -> &'static strwhere
Self: Sized,
A human-readable name, used by wildcard listeners and log output.
Always the Rust type path; see the trait docs.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.