/*
 * @Author: wuwei
 * @Date: 2023-11-02 18:12:15
 * @LastEditors: wuwei
 * @LastEditTime: 2023-12-18 11:28:11
 * @FilePath: /wisdom-huiguanjia-app/bill_package/lib/src/models/owe_fee_count.dart
 * @Description: 
 */
class OweFeeCountModel {
  num? payFee;
  num? liquidatedDamagesFee;
  List<FeeTypeFeesOfOweFeeCountModel>? feeTypeFees;
  List<dynamic>? liquidatedDamagesBills;
  List<String>? billIds;
  int? arrearsBillingPeriodCount;
  num? arrearsFee;
  String? billingPeriod;

  OweFeeCountModel({
    this.payFee,
    this.liquidatedDamagesFee,
    this.feeTypeFees,
    this.liquidatedDamagesBills,
    this.billIds,
    this.arrearsBillingPeriodCount,
    this.arrearsFee,
    this.billingPeriod,
  });

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

    payFee = map['payFee'];
    liquidatedDamagesFee = map['liquidatedDamagesFee'];
    feeTypeFees = List<FeeTypeFeesOfOweFeeCountModel>.from(
        (map["feeTypeFees"] ?? [])
            .map((x) => FeeTypeFeesOfOweFeeCountModel.fromJson(x)));
    liquidatedDamagesBills = map['liquidatedDamagesBills'].cast<dynamic>();
    billIds = map['billIds'].cast<String>();
    arrearsBillingPeriodCount = map['arrearsBillingPeriodCount'];
    arrearsFee = map['arrearsFee'];
    billingPeriod = map['billingPeriod'];
  }

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

    json['payFee'] = this.payFee;
    json['liquidatedDamagesFee'] = this.liquidatedDamagesFee;
    json['feeTypeFees'] =
        List<dynamic>.from((feeTypeFees ?? []).map((x) => x.toJson()));
    json['liquidatedDamagesBills'] = this.liquidatedDamagesBills;
    json['billIds'] = this.billIds;
    json['arrearsBillingPeriodCount'] = this.arrearsBillingPeriodCount;
    json['arrearsFee'] = this.arrearsFee;
    json['billingPeriod'] = this.billingPeriod;

    return json;
  }
}

class FeeTypeFeesOfOweFeeCountModel {
  num? fee;
  String? feeType;

  FeeTypeFeesOfOweFeeCountModel({
    this.fee,
    this.feeType,
  });

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

    fee = map['fee'];
    feeType = map['feeType'];
  }

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

    json['fee'] = this.fee;
    json['feeType'] = this.feeType;

    return json;
  }
}
