class OweFeeInfoModel {
  num? receivableFee;
  num? receivedFee;
  num? arrearsFee;
  List<DetailInfosOfOweFeeInfoModel>? detailInfos;

  OweFeeInfoModel({
    this.receivableFee,
    this.receivedFee,
    this.arrearsFee,
    this.detailInfos,
  });

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

    receivableFee = map['receivableFee'];
    receivedFee = map['receivedFee'];
    arrearsFee = map['arrearsFee'];
    detailInfos = List<DetailInfosOfOweFeeInfoModel>.from(
        (map["detailInfos"] ?? [])
            .map((x) => DetailInfosOfOweFeeInfoModel.fromJson(x)));
  }

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

    json['receivableFee'] = this.receivableFee;
    json['receivedFee'] = this.receivedFee;
    json['arrearsFee'] = this.arrearsFee;
    json['detailInfos'] =
        List<dynamic>.from((detailInfos ?? []).map((x) => x.toJson()));

    return json;
  }
}

class DetailInfosOfOweFeeInfoModel {
  String? assetId;
  String? assetName;
  String? chargeSubject;
  List<BillsOfDetailInfosOfOweFeeInfoModel>? bills;

  DetailInfosOfOweFeeInfoModel({
    this.assetId,
    this.assetName,
    this.chargeSubject,
    this.bills,
  });

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

    assetId = map['assetId'];
    assetName = map['assetName'];
    chargeSubject = map['chargeSubject'];
    bills = List<BillsOfDetailInfosOfOweFeeInfoModel>.from((map["bills"] ?? [])
        .map((x) => BillsOfDetailInfosOfOweFeeInfoModel.fromJson(x)));
  }

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

    json['assetId'] = this.assetId;
    json['assetName'] = this.assetName;
    json['chargeSubject'] = this.chargeSubject;
    json['bills'] = List<dynamic>.from((bills ?? []).map((x) => x.toJson()));

    return json;
  }
}

class BillsOfDetailInfosOfOweFeeInfoModel {
  String? id;
  String? feeType;
  String? chargeSubject;
  String? identification;
  String? feeName;
  dynamic quantity;
  num? price;
  String? unit;
  num? receivableFee;
  num? discountFee;
  num? receivedFee;
  num? arrearsFee;
  String? chargeYearMonth;
  String? serviceStartAt;
  String? serviceEndAt;
  dynamic breachQuantity;
  num? breachReceivableFee;
  num? breachDiscountFee;
  num? breachReceivedFee;
  num? breachArrearsFee;
  dynamic liquidatedDamagesStartAt;
  dynamic coefficient;
  num? printSort;
  bool? isBreach;

  BillsOfDetailInfosOfOweFeeInfoModel({
    this.id,
    this.feeType,
    this.chargeSubject,
    this.identification,
    this.feeName,
    this.quantity,
    this.price,
    this.unit,
    this.receivableFee,
    this.discountFee,
    this.receivedFee,
    this.arrearsFee,
    this.chargeYearMonth,
    this.serviceStartAt,
    this.serviceEndAt,
    this.breachQuantity,
    this.breachReceivableFee,
    this.breachDiscountFee,
    this.breachReceivedFee,
    this.breachArrearsFee,
    this.liquidatedDamagesStartAt,
    this.coefficient,
    this.printSort,
    this.isBreach,
  });

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

    id = map['id'];
    feeType = map['feeType'];
    chargeSubject = map['chargeSubject'];
    identification = map['identification'];
    feeName = map['feeName'];
    quantity = map['quantity'];
    price = map['price'];
    unit = map['unit'];
    receivableFee = map['receivableFee'];
    discountFee = map['discountFee'];
    receivedFee = map['receivedFee'];
    arrearsFee = map['arrearsFee'];
    chargeYearMonth = map['chargeYearMonth'];
    serviceStartAt = map['serviceStartAt'];
    serviceEndAt = map['serviceEndAt'];
    breachQuantity = map['breachQuantity'];
    breachReceivableFee = map['breachReceivableFee'];
    breachDiscountFee = map['breachDiscountFee'];
    breachReceivedFee = map['breachReceivedFee'];
    breachArrearsFee = map['breachArrearsFee'];
    liquidatedDamagesStartAt = map['liquidatedDamagesStartAt'];
    coefficient = map['coefficient'];
    printSort = map['printSort'];
    isBreach = map['isBreach'];
  }

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

    json['id'] = this.id;
    json['feeType'] = this.feeType;
    json['chargeSubject'] = this.chargeSubject;
    json['identification'] = this.identification;
    json['feeName'] = this.feeName;
    json['quantity'] = this.quantity;
    json['price'] = this.price;
    json['unit'] = this.unit;
    json['receivableFee'] = this.receivableFee;
    json['discountFee'] = this.discountFee;
    json['receivedFee'] = this.receivedFee;
    json['arrearsFee'] = this.arrearsFee;
    json['chargeYearMonth'] = this.chargeYearMonth;
    json['serviceStartAt'] = this.serviceStartAt;
    json['serviceEndAt'] = this.serviceEndAt;
    json['breachQuantity'] = this.breachQuantity;
    json['breachReceivableFee'] = this.breachReceivableFee;
    json['breachDiscountFee'] = this.breachDiscountFee;
    json['breachReceivedFee'] = this.breachReceivedFee;
    json['breachArrearsFee'] = this.breachArrearsFee;
    json['liquidatedDamagesStartAt'] = this.liquidatedDamagesStartAt;
    json['coefficient'] = this.coefficient;
    json['printSort'] = this.printSort;
    json['isBreach'] = this.isBreach;

    return json;
  }
}
