import 'PointsAmountPerday.dart';

class PointsAmountPerMonth {
  num? amountPerMonth;
  String? month;
  num? monthNumber;
  List<PointsAmountPerday>? pointsAmountPerday;
  num? pointsPerMonth;

  PointsAmountPerMonth(
      {this.amountPerMonth,
        this.month,
        this.monthNumber,
        this.pointsAmountPerday,
        this.pointsPerMonth});

  PointsAmountPerMonth.fromJson(Map<String, dynamic> json) {
    amountPerMonth = json['AmountPerMonth'];
    month = json['Month'];
    monthNumber = json['MonthNumber'];
    if (json['PointsAmountPerday'] != null) {
      pointsAmountPerday = [];
      json['PointsAmountPerday'].forEach((v) {
        pointsAmountPerday!.add(new PointsAmountPerday.fromJson(v));
      });
    }
    pointsPerMonth = json['PointsPerMonth'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AmountPerMonth'] = this.amountPerMonth;
    data['Month'] = this.month;
    data['MonthNumber'] = this.monthNumber;
    if (this.pointsAmountPerday != null) {
      data['PointsAmountPerday'] =
          this.pointsAmountPerday!.map((v) => v.toJson()).toList();
    }
    data['PointsPerMonth'] = this.pointsPerMonth;
    return data;
  }
}
