enum StatusEnum { active, unknown, canceled, finished, blocked, inactive }

mixin Status {
  static StatusEnum? getStatus(dynamic data) {
    switch (data) {
      case 'A':
        return StatusEnum.active;
      case 'F':
        return StatusEnum.finished;
      case 'B':
        return StatusEnum.blocked;
      case 'C':
        return StatusEnum.canceled;
      case 'I':
        return StatusEnum.inactive;
      default:
        return StatusEnum.unknown;
    }
  }
}
