class AcquireDetailModel {
  String? assetName;
  String? assetFullName;
  String? chargeSubject;
  num? prePayTotal;
  num? depositeTotal;
  num? feeTotal;
  List<ArrearsFeeBillsOfAcquireDetailModel>? arrearsFeeBills;
  List<ArrearsFeeBillDetailsOfAcquireDetailModel>? arrearsFeeBillDetails;
  List<BillsOfAcquireDetailModel>? bills;

  AcquireDetailModel({
    this.assetName,
    this.assetFullName,
    this.chargeSubject,
    this.prePayTotal,
    this.depositeTotal,
    this.feeTotal,
    this.arrearsFeeBills,
    this.arrearsFeeBillDetails,
    this.bills,
  });

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

    assetName = map['assetName'];
    assetFullName = map['assetFullName'];
    chargeSubject = map['chargeSubject'];
    prePayTotal = map['prePayTotal'];
    depositeTotal = map['depositeTotal'];
    feeTotal = map['feeTotal'];
    arrearsFeeBills = List<ArrearsFeeBillsOfAcquireDetailModel>.from(
        (map["arrearsFeeBills"] ?? [])
            .map((x) => ArrearsFeeBillsOfAcquireDetailModel.fromJson(x)));
    arrearsFeeBillDetails =
        List<ArrearsFeeBillDetailsOfAcquireDetailModel>.from(
            (map["arrearsFeeBillDetails"] ?? []).map(
                (x) => ArrearsFeeBillDetailsOfAcquireDetailModel.fromJson(x)));
    bills = List<BillsOfAcquireDetailModel>.from(
        (map["bills"] ?? []).map((x) => BillsOfAcquireDetailModel.fromJson(x)));
  }

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

    json['assetName'] = this.assetName;
    json['assetFullName'] = this.assetFullName;
    json['chargeSubject'] = this.chargeSubject;
    json['prePayTotal'] = this.prePayTotal;
    json['depositeTotal'] = this.depositeTotal;
    json['feeTotal'] = this.feeTotal;
    json['arrearsFeeBills'] =
        List<dynamic>.from((arrearsFeeBills ?? []).map((x) => x.toJson()));
    json['arrearsFeeBillDetails'] = List<dynamic>.from(
        (arrearsFeeBillDetails ?? []).map((x) => x.toJson()));
    json['bills'] = List<dynamic>.from((bills ?? []).map((x) => x.toJson()));

    return json;
  }
}

class ArrearsFeeBillsOfAcquireDetailModel {
  String? feeName;
  String? feeTypeId;
  num? receivableFeeTotal;
  num? discountFeeTotal;
  num? receivedFeeTotal;
  num? arrearsFeeTotal;

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

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

    feeName = map['feeName'];
    feeTypeId = map['feeTypeId'];
    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['feeTypeId'] = this.feeTypeId;
    json['receivableFeeTotal'] = this.receivableFeeTotal;
    json['discountFeeTotal'] = this.discountFeeTotal;
    json['receivedFeeTotal'] = this.receivedFeeTotal;
    json['arrearsFeeTotal'] = this.arrearsFeeTotal;

    return json;
  }
}

class ArrearsFeeBillDetailsOfAcquireDetailModel {
  String? chargeYearMonth;
  num? chargeArrearsFee;
  List<ArrearsFeeDetailsOfArrearsFeeBillDetailsOfAcquireDetailModel>?
      arrearsFeeDetails;

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

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

    chargeYearMonth = map['chargeYearMonth'];
    chargeArrearsFee = map['chargeArrearsFee'];
    arrearsFeeDetails =
        List<ArrearsFeeDetailsOfArrearsFeeBillDetailsOfAcquireDetailModel>.from(
            (map["arrearsFeeDetails"] ?? []).map((x) =>
                ArrearsFeeDetailsOfArrearsFeeBillDetailsOfAcquireDetailModel
                    .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 ArrearsFeeDetailsOfArrearsFeeBillDetailsOfAcquireDetailModel {
  String? feeName;
  num? receivableFeeTotal;
  num? discountFeeTotal;
  num? receivedFeeTotal;
  num? arrearsFeeTotal;

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

  ArrearsFeeDetailsOfArrearsFeeBillDetailsOfAcquireDetailModel.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;
  }
}

class BillsOfAcquireDetailModel {
  String? id;
  num? payFee;

  BillsOfAcquireDetailModel({
    this.id,
    this.payFee,
  });

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

    id = map['id'];
    payFee = map['payFee'];
  }

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

    json['id'] = this.id;
    json['payFee'] = this.payFee;

    return json;
  }
}
