WFCCReadReport.m 756 B

12345678910111213141516171819202122232425262728
  1. //
  2. // WFCCConversation.m
  3. // WFChatClient
  4. //
  5. // Created by heavyrain on 2017/8/16.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import "WFCCReadReport.h"
  9. @implementation WFCCReadReport
  10. +(instancetype)readed:(WFCCConversation *)conversation
  11. userId:(NSString *)userId
  12. timestamp:(long long)timestamp {
  13. WFCCReadReport *d = [[WFCCReadReport alloc] init];
  14. d.conversation = conversation;
  15. d.userId = userId;
  16. d.timestamp = timestamp;
  17. return d;;
  18. }
  19. - (id)toJsonObj {
  20. NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
  21. dict[@"userId"] = self.userId;
  22. dict[@"conversation"] = [self.conversation toJsonObj];
  23. dict[@"timestamp"] = @(self.timestamp);
  24. return dict;
  25. }
  26. @end