Map<String, dynamic> toMap() { return <String, dynamic>{ 'direction': direction?.toString().split('.').last, 'where': where, }; }