vip_record_model.dart 6.94 KB
class VipRecordModel {
  int? ret;
  List<VipRecordSunModel>? data;
  String? msg;

  VipRecordModel({this.ret, this.data, this.msg});

  VipRecordModel.fromJson(Map<dynamic, dynamic> json) {
    if (json["ret"] is int) {
      ret = json["ret"];
    }
    if (json["data"] is List) {
      data = json["data"] == null
          ? null
          : (json["data"] as List)
              .map((e) => VipRecordSunModel.fromJson(e))
              .toList();
    }
    if (json["msg"] is String) {
      msg = json["msg"];
    }
  }

  static List<VipRecordModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(VipRecordModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["ret"] = ret;
    if (data != null) {
      _data["data"] = data?.map((e) => e.toJson()).toList();
    }
    _data["msg"] = msg;
    return _data;
  }
}

class VipRecordSunModel {
  String? date;
  dynamic total;
  dynamic refundTotal;
  List<VipModel>? list;

  VipRecordSunModel({this.date, this.total, this.refundTotal, this.list});

  VipRecordSunModel.fromJson(Map<String, dynamic> json) {
    if (json["date"] is String) {
      date = json["date"];
    }
 
      total = json["total"]??0;
  

      refundTotal = json["refund_total"]??0;
    
    if (json["list"] is List) {
      list = json["list"] == null
          ? null
          : (json["list"] as List).map((e) => VipModel.fromJson(e)).toList();
    }
  }

  static List<VipRecordSunModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(VipRecordSunModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["date"] = date;
    _data["total"] = total;
    _data["refund_total"] = refundTotal;
    if (list != null) {
      _data["list"] = list?.map((e) => e.toJson()).toList();
    }
    return _data;
  }
}

class VipModel {
  String? id;
  String? status;
  String? rechargeId;
  String? gid;
  String? rechargeName;
  String? price;
  String? sellerid;
  String? sellername;
  String? openid;
  String? orderNo;
  String? combineOutTradeNo;
  String? outTradeNo;
  dynamic outRefundNo;
  dynamic outOrderNo;
  String? expDate;
  dynamic stime;
  dynamic etime;
  String? transactionId;
  dynamic refundId;
  dynamic reOutTradeNo;
  String? tradeState;
  String? tradeStateDesc;
  String? qrcode;
  String? isExamine;
  dynamic examineName;
  dynamic examineTime;
  dynamic isComment;
  dynamic outRequestNo;
  dynamic withdrawId;
  dynamic fzOrderId;
  String? type;
  String? cdate;
  String? rname;
  String? phone;

  VipModel(
      {this.id,
      this.status,
      this.rechargeId,
      this.gid,
      this.rechargeName,
      this.price,
      this.sellerid,
      this.sellername,
      this.openid,
      this.orderNo,
      this.combineOutTradeNo,
      this.outTradeNo,
      this.outRefundNo,
      this.outOrderNo,
      this.expDate,
      this.stime,
      this.etime,
      this.transactionId,
      this.refundId,
      this.reOutTradeNo,
      this.tradeState,
      this.tradeStateDesc,
      this.qrcode,
      this.isExamine,
      this.examineName,
      this.examineTime,
      this.isComment,
      this.outRequestNo,
      this.withdrawId,
      this.fzOrderId,
      this.type,
      this.cdate,
      this.rname,
      this.phone});

  VipModel.fromJson(Map<String, dynamic> json) {
    if (json["id"] is String) {
      id = json["id"];
    }
    if (json["status"] is String) {
      status = json["status"];
    }
    if (json["recharge_id"] is String) {
      rechargeId = json["recharge_id"];
    }
    if (json["gid"] is String) {
      gid = json["gid"];
    }
    if (json["recharge_name"] is String) {
      rechargeName = json["recharge_name"];
    }
    if (json["price"] is String) {
      price = json["price"];
    }
    if (json["sellerid"] is String) {
      sellerid = json["sellerid"];
    }
    if (json["sellername"] is String) {
      sellername = json["sellername"];
    }
    if (json["openid"] is String) {
      openid = json["openid"];
    }
    if (json["order_no"] is String) {
      orderNo = json["order_no"];
    }
    if (json["combine_out_trade_no"] is String) {
      combineOutTradeNo = json["combine_out_trade_no"];
    }
    if (json["out_trade_no"] is String) {
      outTradeNo = json["out_trade_no"];
    }
    outRefundNo = json["out_refund_no"];
    outOrderNo = json["out_order_no"];
    if (json["exp_date"] is String) {
      expDate = json["exp_date"];
    }
    stime = json["stime"];
    etime = json["etime"];
    if (json["transaction_id"] is String) {
      transactionId = json["transaction_id"];
    }
    refundId = json["refund_id"];
    reOutTradeNo = json["re_out_trade_no"];
    if (json["trade_state"] is String) {
      tradeState = json["trade_state"];
    }
    if (json["trade_state_desc"] is String) {
      tradeStateDesc = json["trade_state_desc"];
    }
    if (json["qrcode"] is String) {
      qrcode = json["qrcode"];
    }
    if (json["is_examine"] is String) {
      isExamine = json["is_examine"];
    }
    examineName = json["examine_name"];
    examineTime = json["examine_time"];
    isComment = json["is_comment"];
    outRequestNo = json["out_request_no"];
    withdrawId = json["withdraw_id"];
    fzOrderId = json["fz_order_id"];
    if (json["type"] is String) {
      type = json["type"];
    }
    if (json["cdate"] is String) {
      cdate = json["cdate"];
    }
    if (json["rname"] is String) {
      rname = json["rname"];
    }
    if (json["phone"] is String) {
      phone = json["phone"];
    }
  }

  static List<VipModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(VipModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["id"] = id;
    _data["status"] = status;
    _data["recharge_id"] = rechargeId;
    _data["gid"] = gid;
    _data["recharge_name"] = rechargeName;
    _data["price"] = price;
    _data["sellerid"] = sellerid;
    _data["sellername"] = sellername;
    _data["openid"] = openid;
    _data["order_no"] = orderNo;
    _data["combine_out_trade_no"] = combineOutTradeNo;
    _data["out_trade_no"] = outTradeNo;
    _data["out_refund_no"] = outRefundNo;
    _data["out_order_no"] = outOrderNo;
    _data["exp_date"] = expDate;
    _data["stime"] = stime;
    _data["etime"] = etime;
    _data["transaction_id"] = transactionId;
    _data["refund_id"] = refundId;
    _data["re_out_trade_no"] = reOutTradeNo;
    _data["trade_state"] = tradeState;
    _data["trade_state_desc"] = tradeStateDesc;
    _data["qrcode"] = qrcode;
    _data["is_examine"] = isExamine;
    _data["examine_name"] = examineName;
    _data["examine_time"] = examineTime;
    _data["is_comment"] = isComment;
    _data["out_request_no"] = outRequestNo;
    _data["withdraw_id"] = withdrawId;
    _data["fz_order_id"] = fzOrderId;
    _data["type"] = type;
    _data["cdate"] = cdate;
    _data["rname"] = rname;
    _data["phone"] = phone;
    return _data;
  }
}