import 'package:yumi/shared/business_logic/models/res/gift_res.dart';

/// id : "0"
/// quantity : 0
/// giftLimit : {"id":"0","userId":"0","backId":"0","giftTab":"","content":""}
/// giftConfig : {"id":"0","giftCode":"","giftPhoto":"","giftSourceUrl":"","giftCandy":0.0,"giftIntegral":0.0,"special":"","type":"","giftTab":"","standardId":"0","explanationGift":false,"account":"","userId":"0","giftName":"","expiredTime":0}

class SocialChatGiftBackpackRes {
  SocialChatGiftBackpackRes({
      String? id,
      num? quantity,
      GiftLimit? giftLimit,
    SocialChatGiftRes? giftConfig,}){
    _id = id;
    _quantity = quantity;
    _giftLimit = giftLimit;
    _giftConfig = giftConfig;
}

  SocialChatGiftBackpackRes.fromJson(dynamic json) {
    _id = json['id'];
    _quantity = json['quantity'];
    _giftLimit = json['giftLimit'] != null ? GiftLimit.fromJson(json['giftLimit']) : null;
    _giftConfig = json['giftConfig'] != null ? SocialChatGiftRes.fromJson(json['giftConfig']) : null;
  }
  String? _id;
  num? _quantity;
  GiftLimit? _giftLimit;
  SocialChatGiftRes? _giftConfig;

  String? get id => _id;
  num? get quantity => _quantity;
  GiftLimit? get giftLimit => _giftLimit;
  SocialChatGiftRes? get giftConfig => _giftConfig;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['quantity'] = _quantity;
    if (_giftLimit != null) {
      map['giftLimit'] = _giftLimit?.toJson();
    }
    if (_giftConfig != null) {
      map['giftConfig'] = _giftConfig?.toJson();
    }
    return map;
  }

}

/// id : "0"
/// giftCode : ""
/// giftPhoto : ""
/// giftSourceUrl : ""
/// giftCandy : 0.0
/// giftIntegral : 0.0
/// special : ""
/// type : ""
/// giftTab : ""
/// standardId : "0"
/// explanationGift : false
/// account : ""
/// userId : "0"
/// giftName : ""
/// expiredTime : 0


/// id : "0"
/// userId : "0"
/// backId : "0"
/// giftTab : ""
/// content : ""

class GiftLimit {
  GiftLimit({
      String? id,
      String? userId,
      String? backId,
      String? giftTab,
      String? content,}){
    _id = id;
    _userId = userId;
    _backId = backId;
    _giftTab = giftTab;
    _content = content;
}

  GiftLimit.fromJson(dynamic json) {
    _id = json['id'];
    _userId = json['userId'];
    _backId = json['backId'];
    _giftTab = json['giftTab'];
    _content = json['content'];
  }
  String? _id;
  String? _userId;
  String? _backId;
  String? _giftTab;
  String? _content;

  String? get id => _id;
  String? get userId => _userId;
  String? get backId => _backId;
  String? get giftTab => _giftTab;
  String? get content => _content;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['userId'] = _userId;
    map['backId'] = _backId;
    map['giftTab'] = _giftTab;
    map['content'] = _content;
    return map;
  }

}