import 'package:diplomaticquarterapp/uitl/date_uitl.dart';

class YearBloodPressureResultAverage {
  int monthSystolicePressureAverageResult;
  int monthDiastolicPressureAverageResult;
  dynamic monthNumber;
  String monthName;
  String yearName;
  DateTime date;

  YearBloodPressureResultAverage(
      {this.monthSystolicePressureAverageResult,
        this.monthDiastolicPressureAverageResult,
        this.monthNumber,
        this.monthName,
        this.yearName});

  YearBloodPressureResultAverage.fromJson(Map<String, dynamic> json) {
    monthSystolicePressureAverageResult =
    json['monthSystolicePressureAverageResult'];
    monthDiastolicPressureAverageResult =
    json['monthDiastolicPressureAverageResult'];
    monthNumber = json['monthNumber'];
    monthName = json['monthName'];
    yearName = json['yearName'];
    date = DateUtil.getMonthDateTime(monthName,yearName);

  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['monthSystolicePressureAverageResult'] =
        this.monthSystolicePressureAverageResult;
    data['monthDiastolicPressureAverageResult'] =
        this.monthDiastolicPressureAverageResult;
    data['monthNumber'] = this.monthNumber;
    data['monthName'] = this.monthName;
    data['yearName'] = this.yearName;
    return data;
  }
}
