pub struct EnrichedLink {
pub id: Uuid,
pub tenant_id: Uuid,
pub link_type: String,
pub source: Option<Value>,
pub target: Option<Value>,
pub metadata: Option<Value>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Link with full entity data instead of just references
This enriched version includes the complete source and target entities as JSON, avoiding the need for additional API calls.
Depending on the context:
- From source route (e.g., /orders/{id}/invoices): only
targetis populated - From target route (reverse): only
sourceis populated - Direct link access (e.g., /links/{id}): both
sourceandtargetare populated
Fields§
§id: UuidUnique identifier for this link
tenant_id: UuidTenant ID for multi-tenant isolation
link_type: StringThe type of relationship (e.g., “has_invoice”, “payment”)
source: Option<Value>Full source entity as JSON (omitted when querying from source)
target: Option<Value>Full target entity as JSON (omitted when querying from target)
metadata: Option<Value>Optional metadata for the relationship
created_at: DateTime<Utc>When this link was created
updated_at: DateTime<Utc>When this link was last updated
Trait Implementations§
Source§impl Debug for EnrichedLink
impl Debug for EnrichedLink
Auto Trait Implementations§
impl Freeze for EnrichedLink
impl RefUnwindSafe for EnrichedLink
impl Send for EnrichedLink
impl Sync for EnrichedLink
impl Unpin for EnrichedLink
impl UnwindSafe for EnrichedLink
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