Files
keyboard/keyBoard/Class/AiTalk/M/KBChatHistoryModel.h
2026-01-26 18:17:02 +08:00

44 lines
884 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// KBChatHistoryModel.h
// keyBoard
//
// Created by Kiro on 2026/1/26.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// 消息发送者类型
typedef NS_ENUM(NSInteger, KBChatSender) {
KBChatSenderUser = 0, // 用户
KBChatSenderAssistant = 1 // AI 助手
};
/// 聊天记录模型
@interface KBChatHistoryModel : NSObject
/// 消息 ID
@property (nonatomic, assign) NSInteger messageId;
/// 发送者0-用户1-AI
@property (nonatomic, assign) KBChatSender sender;
/// 消息内容
@property (nonatomic, copy) NSString *content;
/// 创建时间
@property (nonatomic, copy) NSString *createdAt;
#pragma mark - 扩展属性
/// 是否是用户消息
@property (nonatomic, assign, readonly) BOOL isUserMessage;
/// 是否是 AI 消息
@property (nonatomic, assign, readonly) BOOL isAssistantMessage;
@end
NS_ASSUME_NONNULL_END