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

class WeekBloodPressureResultAverage {
  int dailySystolicePressureAverageResult;
  int dailyDiastolicPressureAverageResult;
  DateTime bloodPressureDate;

  WeekBloodPressureResultAverage(
      {this.dailySystolicePressureAverageResult,
      this.dailyDiastolicPressureAverageResult,
      this.bloodPressureDate});

  WeekBloodPressureResultAverage.fromJson(Map<String, dynamic> json) {
    dailySystolicePressureAverageResult =
        json['DailySystolicePressureAverageResult'];
    dailyDiastolicPressureAverageResult =
        json['DailyDiastolicPressureAverageResult'];
    bloodPressureDate = DateUtil.convertStringToDate(json['BloodPressureDate']);
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['DailySystolicePressureAverageResult'] =
        this.dailySystolicePressureAverageResult;
    data['DailyDiastolicPressureAverageResult'] =
        this.dailyDiastolicPressureAverageResult;
    data['BloodPressureDate'] = this.bloodPressureDate;
    return data;
  }
}
