diff --git a/app/src/main/java/com/example/tampopo_client/models/ChatMessage.java b/app/src/main/java/com/example/tampopo_client/models/ChatMessage.java index 754a7e1..1b364e8 100644 --- a/app/src/main/java/com/example/tampopo_client/models/ChatMessage.java +++ b/app/src/main/java/com/example/tampopo_client/models/ChatMessage.java @@ -2,12 +2,14 @@ public class ChatMessage { private String senderId; // メッセージ送信者のID + private String senderNickname; // メッセージ送信者のニックネーム private String content; // メッセージ本文 public ChatMessage() {} - public ChatMessage(String senderId, String content) { + public ChatMessage(String senderId, String senderNickname, String content) { this.senderId = senderId; + this.senderNickname = senderNickname; this.content = content; } @@ -17,6 +19,15 @@ public void setSenderId(String senderId) { this.senderId = senderId; } + + public String getSenderNickname() { + return senderNickname; + } + + public void setSenderNickname(String senderNickname) { + this.senderNickname = senderNickname; + } + public String getContent() { return content; }