ConversationModel.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // ConversationModel.h
  3. // BuguLive
  4. //
  5. // Created by 朱庆彬 on 2017/8/22.
  6. // Copyright © 2017年 xfg. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "AudioChatEnum.h"
  10. @interface ConversationModel : NSObject
  11. @property (nonatomic, assign) AudioChatType callAudioType;
  12. @property (nonatomic, assign) BOOL isCall;
  13. @property (nonatomic, strong) NSString *mMsgID;
  14. @property (nonatomic, assign) int mMsgStatus; //0 正常,1发送中,2发送失败,
  15. @property (nonatomic, assign) BOOL mIsCoin; //是否游戏币
  16. @property (nonatomic, strong) NSString *mHeadImgUrl;
  17. @property (nonatomic, assign) BOOL mIsSendOut; //是否是发出去的
  18. @property (nonatomic, assign) int mMsgType; //0 时间消息, 1 文字消息, 2,图片消息,3 语音消息,4 礼物
  19. @property (nonatomic, strong) NSDate *mMsgDate; //消息时间
  20. - (NSString *)getTimeStr;
  21. //文字消息的数据
  22. @property (nonatomic, strong) NSString *mTextMsg; //文字消息内容
  23. //图片消息的数据
  24. @property (nonatomic, assign) CGFloat mPicW;
  25. @property (nonatomic, assign) CGFloat mPicH;
  26. @property (nonatomic, strong) NSString *mPicURL; //图片URL
  27. @property (nonatomic, strong) UIImage *mImgObj; //如果有这个就优先显示这个
  28. //语音消息的数据
  29. @property (nonatomic, assign) NSTimeInterval mDurlong; //单位,秒..有小数点.
  30. @property (nonatomic, strong) NSData *mVoiceData; //如果有这个,优先用这个,
  31. @property (nonatomic, strong) NSURL *mVoiceURL; //声音文件的URL,
  32. @property (nonatomic, assign) BOOL mIsPlaying;
  33. //礼物消息的数据
  34. @property (nonatomic, strong) NSString *mGiftId;
  35. @property (nonatomic, strong) NSString *mGiftIconURL; //礼物小图标URL
  36. @property (nonatomic, strong) NSString *mGiftDesc;
  37. @property (nonatomic, strong) NSString *mDetailURL; //详情URL
  38. @property (nonatomic, strong) NSString *mJyStr;
  39. //需要填充数据,,比如,语音要下载什么的,
  40. - (void)fetchMsgData:(void (^)(NSString *errmsg))block;
  41. @end