Skip to main content

active_enum

Macro active_enum 

Source
macro_rules! active_enum {
    ($name:ident, $pg_name:literal, $( $(#[$meta:meta])* $variant:ident => $value:literal),+ $(,)?) => { ... };
}
Expand description

A macro to define an enum that can be used as a SeaORM ActiveEnum with string values. This is done this way precisely because SeaORM does not support enums with string values out of the box, and this macro provides a convenient way to define such enums with the necessary traits and methods for working with them in a SeaORM context.