#[derive(DbEnum)]
{
// Attributes available to this derive:
#[db_value]
}
Expand description
Derive string-backed database mapping for a unit-only enum.
Generates From<Enum> for DbValue, TryFrom<DbValue> for Enum,
as_str() and from_db_str(). Variant names default to the Rust variant
identifier; override with #[db_value("...")].
ⓘ
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, DbEnum)]
enum Status {
#[default]
Pending,
#[db_value("PAID")]
Paid,
}