import 'User.dart'; class Ratings { Ratings({ this.description, this.id, this.rating, this.reason, this.timestamp, this.user,}); Ratings.fromJson(dynamic json) { description = json['description']; id = json['id']; rating = json['rating']; reason = json['reason']; timestamp = json['timestamp']; user = json['user'] != null ? User.fromJson(json['user']) : null; } String? description; int? id; double? rating; String? reason; int? timestamp; User? user; Map toJson() { final map = {}; map['description'] = description; map['id'] = id; map['rating'] = rating; map['reason'] = reason; map['timestamp'] = timestamp; if (user != null) { map['user'] = user?.toJson(); } return map; } }