감정표현, 채팅응답대기 추가
This commit is contained in:
@@ -2,11 +2,13 @@ class ChatMessage {
|
||||
final String text;
|
||||
final bool isUser;
|
||||
final DateTime timestamp;
|
||||
final int? emotionCategory; // ← 새로 추가 (봇 메시지의 감정)
|
||||
|
||||
ChatMessage({
|
||||
required this.text,
|
||||
required this.isUser,
|
||||
required this.timestamp,
|
||||
this.emotionCategory,
|
||||
});
|
||||
|
||||
// JSON에서 ChatMessage로 변환
|
||||
@@ -15,6 +17,7 @@ class ChatMessage {
|
||||
text: json['text'] as String,
|
||||
isUser: json['isUser'] as bool,
|
||||
timestamp: DateTime.parse(json['timestamp'] as String),
|
||||
emotionCategory: json['emotionCategory'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -24,6 +27,7 @@ class ChatMessage {
|
||||
'text': text,
|
||||
'isUser': isUser,
|
||||
'timestamp': timestamp.toIso8601String(),
|
||||
'emotionCategory': emotionCategory,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user