//
//  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;

/// 是否显示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;

@end

@interface SLMessageDetail : NSObject

@property (nonatomic, strong) NSString *role;

@property (nonatomic, strong) NSString *content;


@end
NS_ASSUME_NONNULL_END
