Prostore::Schema::EnumMember
A single Crystal enum member captured from a field declaration whose
type resolves to an Enum subclass (ADR-0016, ADR-0017). Each member
carries:
name— the source-level Crystal identifier (BounceHard), used for display, error messages, and as the lookup key when comparing schemas across migrations.value— the underlying Int64-promoted integer value, used for the int-backed wire form and@[Flags]arithmetic.wire_name— the string that hits the database forenum_stringcolumns and that appears in the CHECK constraint (ADR-0017). Defaults tonamefor backward compatibility with declarations that don't opt into a custom naming convention (naming: :as_declared). Forenum_intcolumns the wire form is the integer value, but the field still travels through this record so the bookkeeping table is uniform.
Constructors
Instance methods
clone
Sourcecopy_with(name _name = @name, value _value = @value, wire_name _wire_name = @wire_name)
Sourcename
value
wire_name
When constructed without an explicit wire_name, fall back to the source-level name so existing call sites and bookkeeping rows that predate ADR-0017 stay valid.