relationship
The
relationships table: directed links, such as blocks or child-of, between two entities.struct Model
pub struct ModelA directed relationship between two entities.
| Field | Type | Description |
|---|---|---|
created_at |
DateTime<Utc> | When the relationship was first recorded. |
id |
Id | Stable identifier assigned at creation. |
rel_type |
RelationshipType | Semantic kind of relationship (e.g. blocks, parent-of). |
source_id |
Id | Identifier of the source (from-side) entity. |
source_type |
EntityType | Which domain type source_id refers to. |
target_id |
Id | Identifier of the target (to-side) entity. |
target_type |
EntityType | Which domain type target_id refers to. |
updated_at |
DateTime<Utc> | When the relationship row was last modified. |
Implements Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, TryFrom<Row>, From<&Model>.
Model::rel_type
pub fn rel_type(&self) -> RelationshipTypeSemantic kind of relationship (e.g. blocks, parent-of).
| Parameter | Type | Description |
|---|---|---|
| returns | RelationshipType |
Model::source_type
pub fn source_type(&self) -> EntityTypeWhich domain type source_id refers to.
| Parameter | Type | Description |
|---|---|---|
| returns | EntityType |
Model::target_type
pub fn target_type(&self) -> EntityTypeWhich domain type target_id refers to.
| Parameter | Type | Description |
|---|---|---|
| returns | EntityType |
Model::created_at
pub fn created_at(&self) -> &DateTime<Utc>When the relationship was first recorded.
| Parameter | Type | Description |
|---|---|---|
| returns | &DateTime<Utc> |
Model::id
pub fn id(&self) -> &IdStable identifier assigned at creation.
| Parameter | Type | Description |
|---|---|---|
| returns | &Id |
Model::source_id
pub fn source_id(&self) -> &IdIdentifier of the source (from-side) entity.
| Parameter | Type | Description |
|---|---|---|
| returns | &Id |
Model::target_id
pub fn target_id(&self) -> &IdIdentifier of the target (to-side) entity.
| Parameter | Type | Description |
|---|---|---|
| returns | &Id |
Model::updated_at
pub fn updated_at(&self) -> &DateTime<Utc>When the relationship row was last modified.
| Parameter | Type | Description |
|---|---|---|
| returns | &DateTime<Utc> |