From a0df947f3eebe520ef1a3ecdfd8e1693e1c27e86 Mon Sep 17 00:00:00 2001
From: priagungs <priagungsatyagama@gmail.com>
Date: Sat, 23 Feb 2019 10:27:28 +0700
Subject: [PATCH] add chat model

---
 .../src/main/java/com/chatman/model/Chat.java | 49 +++++++++++++++++++
 .../main/java/com/chatman/model/ChatRoom.java | 29 +++++++++++
 2 files changed, 78 insertions(+)
 create mode 100644 android/app/src/main/java/com/chatman/model/Chat.java
 create mode 100644 android/app/src/main/java/com/chatman/model/ChatRoom.java

diff --git a/android/app/src/main/java/com/chatman/model/Chat.java b/android/app/src/main/java/com/chatman/model/Chat.java
new file mode 100644
index 0000000..ecb083b
--- /dev/null
+++ b/android/app/src/main/java/com/chatman/model/Chat.java
@@ -0,0 +1,49 @@
+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;
+    }
+}
diff --git a/android/app/src/main/java/com/chatman/model/ChatRoom.java b/android/app/src/main/java/com/chatman/model/ChatRoom.java
new file mode 100644
index 0000000..fb68f03
--- /dev/null
+++ b/android/app/src/main/java/com/chatman/model/ChatRoom.java
@@ -0,0 +1,29 @@
+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;
+    }
+}
-- 
GitLab