GiftModel.m 766 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // YBGiftModel.m
  3. // iphoneLive
  4. //
  5. // Created by YB007 on 2019/8/20.
  6. // Copyright © 2019 cat. All rights reserved.
  7. //
  8. #import "YBGiftModel.h"
  9. @implementation YBGiftModel
  10. - (instancetype)initWithDic:(NSDictionary *)dic
  11. {
  12. self = [super init];
  13. if (self) {
  14. _idStr = minstr([dic valueForKey:@"id"]);
  15. _typeStr = minstr([dic valueForKey:@"type"]);
  16. _giftNameStr = minstr([dic valueForKey:@"giftname"]);
  17. _needCoinStr = minstr([dic valueForKey:@"needcoin"]);
  18. _needCoinNameStr = minstr([dic valueForKey:@"needcoin_name"]);
  19. _giftIconStr = minstr([dic valueForKey:@"gifticon"]);
  20. }
  21. return self;
  22. }
  23. +(instancetype)modelWithDic:(NSDictionary *)dic;{
  24. return [[self alloc]initWithDic:dic];
  25. }
  26. @end