import 'package:hmg_patient_app_new/core/utils/date_util.dart';

class YearWeightMeasurementResultAverage {
  dynamic monthAverageResult;
  int? monthNumber;
  String? monthName;
  String? yearName;
  DateTime? date;

  YearWeightMeasurementResultAverage({this.monthAverageResult, this.monthNumber, this.monthName, this.yearName});

  YearWeightMeasurementResultAverage.fromJson(Map<String, dynamic> json) {
    monthAverageResult = json['monthAverageResult'];
    monthNumber = json['monthNumber'];
    monthName = json['monthName'];
    yearName = json['yearName'];
    date = DateUtil.getMonthDateTime(monthName!, yearName);
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['monthAverageResult'] = monthAverageResult;
    data['monthNumber'] = monthNumber;
    data['monthName'] = monthName;
    data['yearName'] = yearName;
    return data;
  }
}

