123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- //
- // MessageModel.h
- // SLAiELTS
- //
- // Created by Gusont on 2023/3/3.
- //
- #import <Foundation/Foundation.h>
- #import "SLMikeSegmentModel.h"
- @class SLMessageSendModel;
- @class SLMessageDetail;
- NS_ASSUME_NONNULL_BEGIN
- @interface MessageModel : NSObject
- @property (nonatomic, strong) NSString *sendText;
- /// 译文
- @property (nonatomic, strong) NSString *sendTextTrans;
- /// 是否接收
- @property (nonatomic, assign) BOOL isReceive;
- /// 原数据是否是语音
- @property (nonatomic, assign) BOOL isMike;
- /// 是否显示语音
- @property (nonatomic, assign) BOOL showMike;
- /// 正在播放
- @property (nonatomic, assign) BOOL onBroadcast;
- /// 是否显示text
- @property (nonatomic, assign) BOOL showText;
- @property (nonatomic, strong) NSString *voicePath;
- /// 音频时长
- @property (nonatomic, assign) NSTimeInterval audioDuration;
- /// 时间戳
- @property (nonatomic, assign) CGFloat sendTime;
- /// 发送失败
- @property (nonatomic, assign) BOOL sendFailure;
- @property (nonatomic, assign) BOOL showTime;
- /// 翻译
- @property (nonatomic, assign) BOOL showTrans;
- @property (nonatomic, strong) NSString *toId;
- //+ (instancetype)initWithSendText:(NSString *)sendText isReceive:(BOOL)isReceive;
- + (instancetype)initWithSendText:(NSString *)sendText
- isReceive:(BOOL)isReceive
- showMike:(BOOL)showMike
- showText:(BOOL)showText;
- + (instancetype)initWithSendText:(NSString *)sendText
- isReceive:(BOOL)isReceive
- showMike:(BOOL)showMike
- showText:(BOOL)showText
- isMike:(BOOL)isMike;
- + (instancetype)initWithSendText:(NSString *)sendText
- isReceive:(BOOL)isReceive
- showMike:(BOOL)showMike
- showText:(BOOL)showText
- isMike:(BOOL)isMike
- voicePath:(NSString *)voicePath;
- + (instancetype)initWithSendText:(NSString *)sendText
- isReceive:(BOOL)isReceive
- showMike:(BOOL)showMike
- showText:(BOOL)showText
- isMike:(BOOL)isMike
- showTime:(BOOL)showTime
- sendTime:(CGFloat)sendTime
- voicePath:(NSString *)voicePath
- sendFailure:(BOOL)sendFailure
- sendTextTrans:(NSString *)sendTextTrans;
- @end
- @interface SLMessageSendModel : NSObject
- @property (nonatomic, strong) NSMutableArray<SLMessageDetail *> *messages;
- @property (nonatomic, strong) NSString *sign;
- @property (nonatomic, strong) NSString *timestamp;
- @property (nonatomic, assign) NSInteger chatType;
- @property (nonatomic, strong) NSString *toId;
- @property (nonatomic, strong) NSString *message;
- @property (nonatomic, assign) NSInteger messageType;
- @end
- @interface SLMessageDetail : NSObject
- @property (nonatomic, strong) NSString *role;
- @property (nonatomic, strong) NSString *content;
- @end
- @interface SLSocketMessage : NSObject
- @property (nonatomic, strong) NSString *AIId;
- @property (nonatomic, strong) NSString *AIName;
- @property (nonatomic, strong) NSString *UserId;
- @property (nonatomic, strong) NSString *MessageId;
- @property (nonatomic, strong) NSString *Message;
- //文字0 语音1
- @property (nonatomic, assign) BOOL MessageType;
- //私聊0 群聊1
- @property (nonatomic, assign) BOOL ChatType;
- @end
- @interface SLMessageManager : NSObject
- + (instancetype)SharedInstance;
- - (void)saveSocketChatMessageWith:(NSDictionary *)resultDic;
- @end
- @interface SLMessageReceiveModel : NSObject
- @property (nonatomic, strong) NSString *sendDate;
- @property (nonatomic, strong) NSString *chatType;
- @property (nonatomic, strong) NSString *message;
- //0文字1语音
- @property (nonatomic, assign) BOOL messageType;
- //0发送1接收
- @property (nonatomic, assign) BOOL interactMode;
- @end
- NS_ASSUME_NONNULL_END
|