/// Append-only commitment event log. The status field is never the source of
/// truth — this log is.
enum EventType {
  CREATED,
  COMPLETED,
  LATE,
  DEFERRED,
  MISSED,
  ABANDONED,
  AMNESTY,
}

EventType getEventType(String? name) {
  for (EventType value in EventType.values) {
    if (value.name == name) {
      return value;
    }
  }
  return EventType.CREATED;
}
