Derive Macro Model
Source #[derive(Model)]
{
#[sentinel]
}
Expand description
Derive macros — #[derive(Model)], #[derive(Partial)].
Derive the Model trait for a struct.
§Example
ⓘ#[derive(Model)]
#[sentinel(table = "users")]
pub struct User {
#[sentinel(primary_key, default = "gen_random_uuid()")]
pub id: Uuid,
pub email: String,
}