/*
 * @Author: WuWei
 * @Date: 2020-06-09 16:47:16
 * @LastEditors: WuWei
 * @LastEditTime: 2020-06-11 14:40:13
 * @Description:
 */

class SearchHouseBillModel {
  String? chargeYearMonth;
  num? chargeArrearsFee;
  List<ArrearsFeeDetailsOfSearchHouseBillModel>? arrearsFeeDetails;

  SearchHouseBillModel({
    this.chargeYearMonth,
    this.chargeArrearsFee,
    this.arrearsFeeDetails,
  });

  SearchHouseBillModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    chargeYearMonth = map['chargeYearMonth'];
    chargeArrearsFee = map['chargeArrearsFee'];
    arrearsFeeDetails = List<ArrearsFeeDetailsOfSearchHouseBillModel>.from(
        (map["arrearsFeeDetails"] ?? [])
            .map((x) => ArrearsFeeDetailsOfSearchHouseBillModel.fromJson(x)));
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['chargeYearMonth'] = this.chargeYearMonth;
    json['chargeArrearsFee'] = this.chargeArrearsFee;
    json['arrearsFeeDetails'] =
        List<dynamic>.from((arrearsFeeDetails ?? []).map((x) => x.toJson()));

    return json;
  }
}

class ArrearsFeeDetailsOfSearchHouseBillModel {
  String? feeName;
  num? receivableFeeTotal;
  num? discountFeeTotal;
  num? receivedFeeTotal;
  num? arrearsFeeTotal;

  ArrearsFeeDetailsOfSearchHouseBillModel({
    this.feeName,
    this.receivableFeeTotal,
    this.discountFeeTotal,
    this.receivedFeeTotal,
    this.arrearsFeeTotal,
  });

  ArrearsFeeDetailsOfSearchHouseBillModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    feeName = map['feeName'];
    receivableFeeTotal = map['receivableFeeTotal'];
    discountFeeTotal = map['discountFeeTotal'];
    receivedFeeTotal = map['receivedFeeTotal'];
    arrearsFeeTotal = map['arrearsFeeTotal'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['feeName'] = this.feeName;
    json['receivableFeeTotal'] = this.receivableFeeTotal;
    json['discountFeeTotal'] = this.discountFeeTotal;
    json['receivedFeeTotal'] = this.receivedFeeTotal;
    json['arrearsFeeTotal'] = this.arrearsFeeTotal;

    return json;
  }
}
