No Description

FKBadgeMessage.m 632B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // MessageBadge.m
  3. // FirstLink
  4. //
  5. // Created by ascii on 15/7/31.
  6. // Copyright (c) 2015年 FirstLink. All rights reserved.
  7. //
  8. #import "FKBadgeMessage.h"
  9. @implementation FKBadgeMessage
  10. + (NSDictionary*)mts_mapping
  11. {
  12. return @{@"sys_msg_num": mts_key(systemBadge),
  13. @"groupon_msg_num": mts_key(pindanBadge),
  14. @"comment_msg_num": mts_key(commentBadge),
  15. };
  16. }
  17. + (BOOL)mts_shouldSetUndefinedKeys
  18. {
  19. return NO;
  20. }
  21. - (NSInteger)totalBadge {
  22. return (self.systemBadge.integerValue
  23. + self.pindanBadge.integerValue
  24. + self.commentBadge.integerValue);
  25. }
  26. @end