import 'package:hmg_patient_app_new/core/utils/date_util.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 = <String, dynamic>{};
    data['DailySystolicePressureAverageResult'] = dailySystolicePressureAverageResult;
    data['DailyDiastolicPressureAverageResult'] = dailyDiastolicPressureAverageResult;
    data['BloodPressureDate'] = bloodPressureDate;
    return data;
  }
}

