import 'package:diplomaticquarterapp/uitl/date_uitl.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 = new Map<String, dynamic>();
    data['monthAverageResult'] = this.monthAverageResult;
    data['monthNumber'] = this.monthNumber;
    data['monthName'] = this.monthName;
    data['yearName'] = this.yearName;
    return data;
  }
}
