/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2022-01-19 16:44:35
 * @LastEditTime : 2023-02-07 18:22:21
 * @Description  : Do not edit
 */

class DepositDetailModel {
  String? assetName;
  String? assetFullName;
  String? chargeSubject;
  num? generalPrepayFee;
  num? specialPrepayFee;
  num? customizePrepayFee;
  List<SpecialPrePayInfosOfDepositDetailModel>? specialPrePayInfos;
  List<SpecialPrePayInfosOfDepositDetailModel>? customizePrePayInfos;

  DepositDetailModel({
    this.assetName,
    this.assetFullName,
    this.chargeSubject,
    this.generalPrepayFee,
    this.specialPrepayFee,
    this.specialPrePayInfos,
    this.customizePrepayFee,
    this.customizePrePayInfos,
  });

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

    assetName = map['assetName'];
    assetFullName = map['assetFullName'];
    chargeSubject = map['chargeSubject'];
    generalPrepayFee = map['generalPrepayFee'];
    specialPrepayFee = map['specialPrepayFee'];
    customizePrepayFee = map['customizePrepayFee'];
    specialPrePayInfos = List<SpecialPrePayInfosOfDepositDetailModel>.from(
        (map["specialPrePayInfos"] ?? [])
            .map((x) => SpecialPrePayInfosOfDepositDetailModel.fromJson(x)));
    customizePrePayInfos = List<SpecialPrePayInfosOfDepositDetailModel>.from(
        (map["customizePrePayInfos"] ?? [])
            .map((x) => SpecialPrePayInfosOfDepositDetailModel.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['generalPrepayFee'] = this.generalPrepayFee;
    json['specialPrepayFee'] = this.specialPrepayFee;
    json['customizePrepayFee'] = this.customizePrepayFee;
    json['specialPrePayInfos'] =
        List<dynamic>.from((specialPrePayInfos ?? []).map((x) => x.toJson()));
    json['customizePrePayInfos'] =
        List<dynamic>.from((customizePrePayInfos ?? []).map((x) => x.toJson()));

    return json;
  }
}

class SpecialPrePayInfosOfDepositDetailModel {
  String? feeName;
  num? fee;

  SpecialPrePayInfosOfDepositDetailModel({
    this.feeName,
    this.fee,
  });

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

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

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

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

    return json;
  }
}
