class YearlyHeartRateResModel { num valueAvg; int medCategoryID; int month; String monthName; int patientID; int year; YearlyHeartRateResModel( {this.valueAvg, this.medCategoryID, this.month, this.monthName, this.patientID, this.year}); YearlyHeartRateResModel.fromJson(Map json) { num value = json['ValueAvg']; valueAvg = json['ValueAvg'] != null ? value.toInt() : 0; medCategoryID = json['MedCategoryID']; month = json['Month']; monthName = json['MonthName']; patientID = json['PatientID']; year = json['Year']; } Map toJson() { final Map data = new Map(); data['ValueAvg'] = this.valueAvg; data['MedCategoryID'] = this.medCategoryID; data['Month'] = this.month; data['MonthName'] = this.monthName; data['PatientID'] = this.patientID; data['Year'] = this.year; return data; } }