/// packetId : ""
/// userId : 0
/// userName : ""
/// userAvatar : ""
/// packetType : 0
/// packetTypeDesc : ""
/// totalAmount : 0
/// totalCount : 0
/// remainAmount : 0
/// remainCount : 0
/// status : 0
/// statusDesc : ""
/// myAmount : 0
/// grabbed : false
/// records : [{"recordId":"","userId":0,"userName":"","userAvatar":"","amount":0,"grabTime":""}]
/// createTime : ""

class SCRoomRedPacketDetailRes {
  SCRoomRedPacketDetailRes({
      String? packetId,
      num? userId,
      String? userName,
      String? userAvatar,
      num? packetType,
      String? packetTypeDesc,
      num? totalAmount,
      num? totalCount,
      num? remainAmount,
      num? remainCount,
      num? status,
      String? statusDesc,
      num? myAmount,
      bool? grabbed,
      List<Records>? records,
      String? createTime,}){
    _packetId = packetId;
    _userId = userId;
    _userName = userName;
    _userAvatar = userAvatar;
    _packetType = packetType;
    _packetTypeDesc = packetTypeDesc;
    _totalAmount = totalAmount;
    _totalCount = totalCount;
    _remainAmount = remainAmount;
    _remainCount = remainCount;
    _status = status;
    _statusDesc = statusDesc;
    _myAmount = myAmount;
    _grabbed = grabbed;
    _records = records;
    _createTime = createTime;
}

  SCRoomRedPacketDetailRes.fromJson(dynamic json) {
    _packetId = json['packetId'];
    _userId = json['userId'];
    _userName = json['userName'];
    _userAvatar = json['userAvatar'];
    _packetType = json['packetType'];
    _packetTypeDesc = json['packetTypeDesc'];
    _totalAmount = json['totalAmount'];
    _totalCount = json['totalCount'];
    _remainAmount = json['remainAmount'];
    _remainCount = json['remainCount'];
    _status = json['status'];
    _statusDesc = json['statusDesc'];
    _myAmount = json['myAmount'];
    _grabbed = json['grabbed'];
    if (json['records'] != null) {
      _records = [];
      json['records'].forEach((v) {
        _records?.add(Records.fromJson(v));
      });
    }
    _createTime = json['createTime'];
  }
  String? _packetId;
  num? _userId;
  String? _userName;
  String? _userAvatar;
  num? _packetType;
  String? _packetTypeDesc;
  num? _totalAmount;
  num? _totalCount;
  num? _remainAmount;
  num? _remainCount;
  num? _status;
  String? _statusDesc;
  num? _myAmount;
  bool? _grabbed;
  List<Records>? _records;
  String? _createTime;

  String? get packetId => _packetId;
  num? get userId => _userId;
  String? get userName => _userName;
  String? get userAvatar => _userAvatar;
  num? get packetType => _packetType;
  String? get packetTypeDesc => _packetTypeDesc;
  num? get totalAmount => _totalAmount;
  num? get totalCount => _totalCount;
  num? get remainAmount => _remainAmount;
  num? get remainCount => _remainCount;
  num? get status => _status;
  String? get statusDesc => _statusDesc;
  num? get myAmount => _myAmount;
  bool? get grabbed => _grabbed;
  List<Records>? get records => _records;
  String? get createTime => _createTime;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['packetId'] = _packetId;
    map['userId'] = _userId;
    map['userName'] = _userName;
    map['userAvatar'] = _userAvatar;
    map['packetType'] = _packetType;
    map['packetTypeDesc'] = _packetTypeDesc;
    map['totalAmount'] = _totalAmount;
    map['totalCount'] = _totalCount;
    map['remainAmount'] = _remainAmount;
    map['remainCount'] = _remainCount;
    map['status'] = _status;
    map['statusDesc'] = _statusDesc;
    map['myAmount'] = _myAmount;
    map['grabbed'] = _grabbed;
    if (_records != null) {
      map['records'] = _records?.map((v) => v.toJson()).toList();
    }
    map['createTime'] = _createTime;
    return map;
  }

}

/// recordId : ""
/// userId : 0
/// userName : ""
/// userAvatar : ""
/// amount : 0
/// grabTime : ""

class Records {
  Records({
      String? recordId,
      num? userId,
      String? userName,
      String? account,
      String? userAvatar,
      num? amount,
      String? grabTime,}){
    _recordId = recordId;
    _userId = userId;
    _userName = userName;
    _account = account;
    _userAvatar = userAvatar;
    _amount = amount;
    _grabTime = grabTime;
}

  Records.fromJson(dynamic json) {
    _recordId = json['recordId'];
    _userId = json['userId'];
    _userName = json['userName'];
    _account = json['account'];
    _userAvatar = json['userAvatar'];
    _amount = json['amount'];
    _grabTime = json['grabTime'];
  }
  String? _recordId;
  num? _userId;
  String? _userName;
  String? _account;
  String? _userAvatar;
  num? _amount;
  String? _grabTime;

  String? get recordId => _recordId;
  num? get userId => _userId;
  String? get userName => _userName;
  String? get account => _account;
  String? get userAvatar => _userAvatar;
  num? get amount => _amount;
  String? get grabTime => _grabTime;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['recordId'] = _recordId;
    map['userId'] = _userId;
    map['userName'] = _userName;
    map['account'] = _account;
    map['userAvatar'] = _userAvatar;
    map['amount'] = _amount;
    map['grabTime'] = _grabTime;
    return map;
  }

}