YMChatNotificationCellViewModel.m 1005 B

123456789101112131415161718192021222324252627
  1. //
  2. // YMChatNotificationCellViewModel.m
  3. // MSYOUPAI
  4. //
  5. // Created by YoMi on 2024/2/21.
  6. // Copyright © 2024 MS. All rights reserved.
  7. //
  8. #import "YMChatNotificationCellViewModel.h"
  9. @interface YMChatNotificationCellViewModel ()
  10. /// 行标题
  11. @property (nonatomic, copy, readwrite) NSString *rowTitle;
  12. /// 是否开启
  13. @property (nonatomic, assign, readwrite) BOOL isOpen;
  14. /// 消息通知功能类型
  15. @property (nonatomic, assign, readwrite) YMChatNotificationFunctionsType chatNotificationFunctionsType;
  16. @end
  17. @implementation YMChatNotificationCellViewModel
  18. - (void)ym_initialize{
  19. [super ym_initialize];
  20. NSDictionary *dic = [self.params dictionaryValueForKey:ParamsModel defaultValue:@{}];
  21. self.rowTitle = [dic stringValueForKey:@"title" defaultValue:@""];
  22. self.isOpen = [dic boolValueForKey:@"isOpen" defaultValue:NO];
  23. self.chatNotificationFunctionsType = [dic integerValueForKey:ParamsCategoryType defaultValue:YMChatNotificationFunctionsTypePersonalizedRecommendation];
  24. }
  25. @end