Skip to content
Snippets Groups Projects
Commit a0df947f authored by priagungs's avatar priagungs
Browse files

add chat model

parent a7122dc6
No related merge requests found
package com.chatman.model;
import java.util.Date;
public class Chat {
private String idSender;
private String idReceiver;
private Date date;
private String message;
public Chat(String idSender, String idReceiver, Date date, String message) {
this.idSender = idSender;
this.idReceiver = idReceiver;
this.date = date;
this.message = message;
}
public String getIdSender() {
return idSender;
}
public void setIdSender(String idSender) {
this.idSender = idSender;
}
public String getIdReceiver() {
return idReceiver;
}
public void setIdReceiver(String idReceiver) {
this.idReceiver = idReceiver;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.chatman.model;
import java.util.List;
public class ChatRoom {
private String idSender;
private List<Chat> messages;
public ChatRoom(String idSender, List<Chat> messages) {
this.idSender = idSender;
this.messages = messages;
}
public String getIdSender() {
return idSender;
}
public void setIdSender(String idSender) {
this.idSender = idSender;
}
public List<Chat> getMessages() {
return messages;
}
public void setMessages(List<Chat> messages) {
this.messages = messages;
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment