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

/// giftConfigs : [{"account":"","expiredTime":0,"explanationGift":false,"giftCandy":0.0,"giftCode":"","giftIntegral":0.0,"giftName":"","giftPhoto":"","giftSourceUrl":"","giftTab":"","id":0,"special":"","standardId":0,"type":"","userId":0}]
/// giftTab : ""

class GiftByGroupRes {
  GiftByGroupRes({
      List<SocialChatGiftRes>? giftConfigs,
      String? giftTab,}){
    _giftConfigs = giftConfigs;
    _giftTab = giftTab;
}

  GiftByGroupRes.fromJson(dynamic json) {
    if (json['giftConfigs'] != null) {
      _giftConfigs = [];
      json['giftConfigs'].forEach((v) {
        _giftConfigs?.add(SocialChatGiftRes.fromJson(v));
      });
    }
    _giftTab = json['giftTab'];
  }
  List<SocialChatGiftRes>? _giftConfigs;
  String? _giftTab;
GiftByGroupRes copyWith({  List<SocialChatGiftRes>? giftConfigs,
  String? giftTab,
}) => GiftByGroupRes(  giftConfigs: giftConfigs ?? _giftConfigs,
  giftTab: giftTab ?? _giftTab,
);
  List<SocialChatGiftRes>? get giftConfigs => _giftConfigs;
  String? get giftTab => _giftTab;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (_giftConfigs != null) {
      map['giftConfigs'] = _giftConfigs?.map((v) => v.toJson()).toList();
    }
    map['giftTab'] = _giftTab;
    return map;
  }

}
