tag

The tags table: labels, stored once each, that the entity_tags table attaches to entities.

struct Model

source

pub struct Model

A deduplicated label that can be attached to any entity.

Field Type Description
created_at DateTime<Utc> When the tag was first inserted.
id Id Stable identifier assigned at creation.
label String Unique case-sensitive label text.
updated_at DateTime<Utc> When the tag row was last modified.

Implements Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, TryFrom<Row>.

Model::created_at

source

pub fn created_at(&self) -> &DateTime<Utc>

When the tag was first inserted.

Parameter Type Description
returns &DateTime<Utc>

Model::id

source

pub fn id(&self) -> &Id

Stable identifier assigned at creation.

Parameter Type Description
returns &Id

Model::label

source

pub fn label(&self) -> &String

Unique case-sensitive label text.

Parameter Type Description
returns &String

Model::updated_at

source

pub fn updated_at(&self) -> &DateTime<Utc>

When the tag row was last modified.

Parameter Type Description
returns &DateTime<Utc>

Model::new

source

pub fn new(label: impl Into<String>) -> Self

Create a new tag with a fresh Id and timestamps set to now.

Parameter Type Description
label impl Into<String> the tag’s text, stored as given
returns Self The tag, not yet saved.