class SuccessModel {
  String? payId;
  String? prePayDetailId;
  String? status;
  String? assetId;
  String? assetName;
  String? assetFullName;
  String? chargeSubject;
  num? totalPayFee;
  num? receivedFee;
  num? excessFee;
  String? feeName;
  String? payer;
  String? payType;
  String? payAt;
  String? remark;
  List<TicketsOfSuccessModel>? tickets;
  bool? invoice;
  num? preInvoiceType;
  String? identification;
  num? price;
  String? unit;
  num? prePayFee;
  num? receivableFee;
  String? type;

  SuccessModel({
    this.payId,
    this.prePayDetailId,
    this.status,
    this.assetId,
    this.assetName,
    this.assetFullName,
    this.chargeSubject,
    this.totalPayFee,
    this.receivedFee,
    this.excessFee,
    this.feeName,
    this.payer,
    this.payType,
    this.payAt,
    this.remark,
    this.tickets,
    this.invoice,
    this.preInvoiceType,
    this.identification,
    this.price,
    this.unit,
    this.prePayFee,
    this.receivableFee,
    this.type,
  });

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

    payId = map['payId'];
    prePayDetailId = map['prePayDetailId'];
    status = map['status'];
    assetId = map['assetId'];
    assetName = map['assetName'];
    assetFullName = map['assetFullName'];
    chargeSubject = map['chargeSubject'];
    totalPayFee = map['totalPayFee'];
    receivedFee = map['receivedFee'];
    excessFee = map['excessFee'];
    feeName = map['feeName'];
    payer = map['payer'];
    payType = map['payType'];
    payAt = map['payAt'];
    remark = map['remark'];
    tickets = List<TicketsOfSuccessModel>.from(
        (map["tickets"] ?? []).map((x) => TicketsOfSuccessModel.fromJson(x)));
    invoice = map['invoice'];
    preInvoiceType = map['preInvoiceType'];
    identification = map['identification'];
    price = map['price'];
    unit = map['unit'];
    prePayFee = map['prePayFee'];
    receivableFee = map['receivableFee'];
    type = map['type'];
  }

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

    json['payId'] = this.payId;
    json['prePayDetailId'] = this.prePayDetailId;
    json['status'] = this.status;
    json['assetId'] = this.assetId;
    json['assetName'] = this.assetName;
    json['assetFullName'] = this.assetFullName;
    json['chargeSubject'] = this.chargeSubject;
    json['totalPayFee'] = this.totalPayFee;
    json['receivedFee'] = this.receivedFee;
    json['excessFee'] = this.excessFee;
    json['feeName'] = this.feeName;
    json['payer'] = this.payer;
    json['payType'] = this.payType;
    json['payAt'] = this.payAt;
    json['remark'] = this.remark;
    json['tickets'] =
        List<dynamic>.from((tickets ?? []).map((x) => x.toJson()));
    json['invoice'] = this.invoice;
    json['preInvoiceType'] = this.preInvoiceType;
    json['identification'] = this.identification;
    json['price'] = this.price;
    json['unit'] = this.unit;
    json['prePayFee'] = this.prePayFee;
    json['receivableFee'] = this.receivableFee;
    json['type'] = this.type;

    return json;
  }
}

class TicketsOfSuccessModel {
  String? ticketNo;
  String? ticketType;

  TicketsOfSuccessModel({
    this.ticketNo,
    this.ticketType,
  });

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

    ticketNo = map['ticketNo'];
    ticketType = map['ticketType'];
  }

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

    json['ticketNo'] = this.ticketNo;
    json['ticketType'] = this.ticketType;

    return json;
  }
}
