/// packetId : ""
/// senderUserId : ""
/// receiverUserId : ""
/// senderInfo : {"userId":"","account":"","nickName":"","avatar":""}
/// receiverInfo : {"userId":"","account":"","nickName":"","avatar":""}
/// totalAmount : 0
/// handlingFee : 0
/// status : 0
/// expireTime : 0
/// grabbedAt : 0
/// createTime : 0

class SCUserRedPacketSendRes {
  SCUserRedPacketSendRes({
      String? packetId,
      num? senderUserId,
    num? receiverUserId,
      SenderInfo? senderInfo,
      ReceiverInfo? receiverInfo,
      num? totalAmount,
      num? handlingFee,
      num? status,
      int? expireTime,
      int? grabbedAt,
      int? createTime,}){
    _packetId = packetId;
    _senderUserId = senderUserId;
    _receiverUserId = receiverUserId;
    _senderInfo = senderInfo;
    _receiverInfo = receiverInfo;
    _totalAmount = totalAmount;
    _handlingFee = handlingFee;
    _status = status;
    _expireTime = expireTime;
    _grabbedAt = grabbedAt;
    _createTime = createTime;
}

  SCUserRedPacketSendRes.fromJson(dynamic json) {
    _packetId = json['packetId'];
    _senderUserId = json['senderUserId'];
    _receiverUserId = json['receiverUserId'];
    _senderInfo = json['senderInfo'] != null ? SenderInfo.fromJson(json['senderInfo']) : null;
    _receiverInfo = json['receiverInfo'] != null ? ReceiverInfo.fromJson(json['receiverInfo']) : null;
    _totalAmount = json['totalAmount'];
    _handlingFee = json['handlingFee'];
    _status = json['status'];
    _expireTime = json['expireTime'];
    _grabbedAt = json['grabbedAt'];
    _createTime = json['createTime'];
  }
  String? _packetId;
  num? _senderUserId;
  num? _receiverUserId;
  SenderInfo? _senderInfo;
  ReceiverInfo? _receiverInfo;
  num? _totalAmount;
  num? _handlingFee;
  num? _status;
  int? _expireTime;
  int? _grabbedAt;
  int? _createTime;

  String? get packetId => _packetId;
  num? get senderUserId => _senderUserId;
  num? get receiverUserId => _receiverUserId;
  SenderInfo? get senderInfo => _senderInfo;
  ReceiverInfo? get receiverInfo => _receiverInfo;
  num? get totalAmount => _totalAmount;
  num? get handlingFee => _handlingFee;
  num? get status => _status;
  int? get expireTime => _expireTime;
  int? get grabbedAt => _grabbedAt;
  int? get createTime => _createTime;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['packetId'] = _packetId;
    map['senderUserId'] = _senderUserId;
    map['receiverUserId'] = _receiverUserId;
    if (_senderInfo != null) {
      map['senderInfo'] = _senderInfo?.toJson();
    }
    if (_receiverInfo != null) {
      map['receiverInfo'] = _receiverInfo?.toJson();
    }
    map['totalAmount'] = _totalAmount;
    map['handlingFee'] = _handlingFee;
    map['status'] = _status;
    map['expireTime'] = _expireTime;
    map['grabbedAt'] = _grabbedAt;
    map['createTime'] = _createTime;
    return map;
  }

}

/// userId : ""
/// account : ""
/// nickName : ""
/// avatar : ""

class ReceiverInfo {
  ReceiverInfo({
      num? userId,
      String? account,
      String? nickName,
      String? avatar,}){
    _userId = userId;
    _account = account;
    _nickName = nickName;
    _avatar = avatar;
}

  ReceiverInfo.fromJson(dynamic json) {
    _userId = json['userId'];
    _account = json['account'];
    _nickName = json['nickName'];
    _avatar = json['avatar'];
  }
  num? _userId;
  String? _account;
  String? _nickName;
  String? _avatar;

  num? get userId => _userId;
  String? get account => _account;
  String? get nickName => _nickName;
  String? get avatar => _avatar;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['userId'] = _userId;
    map['account'] = _account;
    map['nickName'] = _nickName;
    map['avatar'] = _avatar;
    return map;
  }

}

/// userId : ""
/// account : ""
/// nickName : ""
/// avatar : ""

class SenderInfo {
  SenderInfo({
      num? userId,
      String? account,
      String? nickName,
      String? avatar,}){
    _userId = userId;
    _account = account;
    _nickName = nickName;
    _avatar = avatar;
}

  SenderInfo.fromJson(dynamic json) {
    _userId = json['userId'];
    _account = json['account'];
    _nickName = json['nickName'];
    _avatar = json['avatar'];
  }
  num? _userId;
  String? _account;
  String? _nickName;
  String? _avatar;

  num? get userId => _userId;
  String? get account => _account;
  String? get nickName => _nickName;
  String? get avatar => _avatar;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['userId'] = _userId;
    map['account'] = _account;
    map['nickName'] = _nickName;
    map['avatar'] = _avatar;
    return map;
  }

}