pub struct LinkEntity {
pub id: Uuid,
pub entity_type: String,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub deleted_at: Option<DateTime<Utc>>,
pub status: String,
pub link_type: String,
pub source_id: Uuid,
pub target_id: Uuid,
pub metadata: Option<Value>,
}Expand description
A polymorphic link between two entities
Links follow the Entity model with base fields (id, type, timestamps, status) plus relationship-specific fields (source_id, target_id, link_type).
Fields§
§id: UuidUnique identifier for this link
entity_type: StringEntity type (always “link” for base links)
created_at: DateTime<Utc>When this link was created
updated_at: DateTime<Utc>When this link was last updated
deleted_at: Option<DateTime<Utc>>When this link was soft-deleted (if applicable)
status: StringStatus of the link
link_type: StringThe type of relationship (e.g., “owner”, “driver”, “worker”)
source_id: UuidThe ID of the source entity
target_id: UuidThe ID of the target entity
metadata: Option<Value>Optional metadata for the relationship
Implementations§
Trait Implementations§
Source§impl Clone for LinkEntity
impl Clone for LinkEntity
Source§fn clone(&self) -> LinkEntity
fn clone(&self) -> LinkEntity
Returns a duplicate of the value. Read more
1.0.0 · 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 LinkEntity
impl Debug for LinkEntity
Source§impl<'de> Deserialize<'de> for LinkEntity
impl<'de> Deserialize<'de> for LinkEntity
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
Auto Trait Implementations§
impl Freeze for LinkEntity
impl RefUnwindSafe for LinkEntity
impl Send for LinkEntity
impl Sync for LinkEntity
impl Unpin for LinkEntity
impl UnwindSafe for LinkEntity
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