macro_rules! impl_link_entity {
(
$type:ident,
$type_name:expr,
{
$( $specific_field:ident : $specific_type:ty ),* $(,)?
}
) => { ... };
}Expand description
Complete macro to create a Link entity with automatic trait implementations
§Example
ⓘ
use this::prelude::*;
impl_link_entity!(
UserCompanyLink,
"user_company_link",
{
role: String,
start_date: DateTime<Utc>,
}
);
// Usage
let link = UserCompanyLink::new(
"employment".to_string(),
user_id,
company_id,
"active".to_string(),
"Senior Developer".to_string(),
Utc::now(),
);