#[derive(ModelMixin)]
{
// Attributes available to this derive:
#[field]
}
Expand description
Marker derive for abstract model mixins (never creates a table).
§Example
ⓘ
#[derive(ModelMixin)]
struct Timestamps {
#[field(auto_now_add)]
created_at: FieldDateTime,
#[field(auto_now)]
updated_at: FieldDateTime,
}
#[derive(Model)]
#[model(mixins(Timestamps))]
struct Article {
id: FieldUuid,
title: FieldVarchar<1, 255>,
}