Map<String, dynamic> toJson() { return { 'rating': rating, 'user': user, if (content != null) 'content': content, }; }