/*
 * @Author: WuWei
 * @Date: 2020-08-13 19:40:08
 * @LastEditors: wuwei 
 * @LastEditTime: 2024-06-05 14:59:52
 * @Description:
 */

class PayDetail {
  List<ReceiptModel>? receiptTickets;
  List<ReceiptModel>? invoiceTickets;
  List<ListOfPayDetailModel>? list;
  BackAccountModel? bankAccount;
  String? id;
  String? remark;
  num? totalPayFee;
  String? payAt;
  dynamic payWay;
  String? payer;
  String? payType;
  String? createBy;
  String? createAt;
  String? assetName;
  String? accountAt;
  String? accountStatus;
  String? moneyFlow;
  bool? invalid;
  String? tranNo;
  bool? supplement;
  String? originalId;

  PayDetail({
    this.receiptTickets,
    this.invoiceTickets,
    this.list,
    this.id,
    this.bankAccount,
    this.remark,
    this.totalPayFee,
    this.payAt,
    this.payWay,
    this.payer,
    this.payType,
    this.createBy,
    this.createAt,
    this.assetName,
    this.accountAt,
    this.accountStatus,
    this.moneyFlow,
    this.invalid,
    this.tranNo,
    this.supplement,
    this.originalId,
  });

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

    receiptTickets = List<ReceiptModel>.from(
        (map["receiptTickets"] ?? []).map((x) => ReceiptModel.fromJson(x)));
    invoiceTickets = List<ReceiptModel>.from(
        (map["invoiceTickets"] ?? []).map((x) => ReceiptModel.fromJson(x)));
    list = List<ListOfPayDetailModel>.from(
        (map["list"] ?? []).map((x) => ListOfPayDetailModel.fromJson(x)));
    bankAccount = BackAccountModel.fromJson(map['bankAccount']);
    id = map['id'];
    remark = map['remark'];
    totalPayFee = map['totalPayFee'];
    payAt = map['payAt'];
    payWay = map['payWay'];
    payer = map['payer'];
    payType = map['payType'];
    createBy = map['createBy'];
    createAt = map['createAt'];
    assetName = map['assetName'];
    accountAt = map['accountAt'];
    accountStatus = map['accountStatus'];
    moneyFlow = map['moneyFlow'];
    invalid = map['invalid'];
    tranNo = map['tranNo'];
    supplement = map['supplement'];
    originalId = map['originalId'];
  }

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

    json['receiptTickets'] = this.receiptTickets;
    json['invoiceTickets'] = this.invoiceTickets;
    json['list'] = List<dynamic>.from((list ?? []).map((x) => x.toJson()));
    json['bankAccount'] = this.bankAccount;
    json['id'] = this.id;
    json['remark'] = this.remark;
    json['totalPayFee'] = this.totalPayFee;
    json['payAt'] = this.payAt;
    json['payWay'] = this.payWay;
    json['payer'] = this.payer;
    json['payType'] = this.payType;
    json['createBy'] = this.createBy;
    json['createAt'] = this.createAt;
    json['assetName'] = this.assetName;
    json['accountAt'] = this.accountAt;
    json['accountStatus'] = this.accountStatus;
    json['moneyFlow'] = this.moneyFlow;
    json['invalid'] = this.invalid;
    json['tranNo'] = this.tranNo;
    json['supplement'] = this.supplement;
    json['originalId'] = this.originalId;
    return json;
  }
}

class ListOfPayDetailModel {
  String? feeType;
  String? fee;
  String? payAt;
  String? chargeYearMonth;

  ListOfPayDetailModel({
    this.feeType,
    this.fee,
    this.payAt,
    this.chargeYearMonth,
  });

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

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

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

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

    return json;
  }
}

class ReceiptModel {
  String? ticketNo;
  num? fee;
  String? type;
  String? id;

  ReceiptModel({
    this.ticketNo,
    this.fee,
    this.type,
    this.id,
  });

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

    ticketNo = map['ticketNo'];
    fee = map['fee'];
    type = map['type'];
    id = map['id'];
  }

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

    json['ticketNo'] = this.ticketNo;
    json['fee'] = this.fee;
    json['type'] = this.type;
    json['id'] = this.id;

    return json;
  }
}

class BackAccountModel {
  String? bank;
  String? bankAccount;

  BackAccountModel({
    this.bank,
    this.bankAccount,
  });

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

    bank = map['bank'];
    bankAccount = map['bankAccount'];
  }

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

    json['bank'] = this.bank;
    json['bankAccount'] = this.bankAccount;

    return json;
  }
}
