import 'dart:core'; class ReportedContent { String userGuid; String postID; String publisherID; DateTime timestamp; int report; ReportedContent( {this.postID, this.publisherID, this.report, this.timestamp, this.userGuid}); ReportedContent.fromJSON(Map json) : postID = json["postID"], publisherID = json['publisherID'], report = int.parse(json['report']), userGuid = json['userGuid'], timestamp = DateTime.parse(json['timestamp']); Map toJson() { final Map data = Map(); data['postID'] = this.postID; data['publisherID'] = this.publisherID; data['report'] = this.report; data['userGuid'] = this.userGuid; data['timestamp'] = this.timestamp; return data; } @override String toString() { return '{"postID":"$postID","publisherID": "$publisherID", "report": "$report","userGuid": "$userGuid","timestamp":"$timestamp"}'; } }