tag
The
tags table: labels, stored once each, that the entity_tags table attaches to entities.struct Model
pub struct ModelA 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
pub fn created_at(&self) -> &DateTime<Utc>When the tag was first inserted.
| Parameter | Type | Description |
|---|---|---|
| returns | &DateTime<Utc> |
Model::id
pub fn id(&self) -> &IdStable identifier assigned at creation.
| Parameter | Type | Description |
|---|---|---|
| returns | &Id |
Model::label
pub fn label(&self) -> &StringUnique case-sensitive label text.
| Parameter | Type | Description |
|---|---|---|
| returns | &String |
Model::updated_at
pub fn updated_at(&self) -> &DateTime<Utc>When the tag row was last modified.
| Parameter | Type | Description |
|---|---|---|
| returns | &DateTime<Utc> |
Model::new
pub fn new(label: impl Into<String>) -> SelfCreate 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. |