From 9032274702cac39cd82c332b7831727daf54e9fa Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 21 Jan 2018 18:32:56 +0100 Subject: [PATCH] Created post model --- .../comunic/client/data/posts/Post.java | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 app/src/main/java/org/communiquons/android/comunic/client/data/posts/Post.java diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/posts/Post.java b/app/src/main/java/org/communiquons/android/comunic/client/data/posts/Post.java new file mode 100644 index 0000000..a7c7425 --- /dev/null +++ b/app/src/main/java/org/communiquons/android/comunic/client/data/posts/Post.java @@ -0,0 +1,60 @@ +package org.communiquons.android.comunic.client.data.posts; + +/** + * Post model + * + * This object contains the informations about a single post + * + * @author Pierre HUBERT + * Created by pierre on 1/21/18. + */ + +public class Post { + + //Private fields + private int id; + private int userID; + private int post_time; + private String content; + + + //Set and get the ID of the post + public void setId(int id) { + this.id = id; + } + + public int getId() { + return id; + } + + + //Set the get the ID of the owner of the post + public void setUserID(int userID) { + this.userID = userID; + } + + public int getUserID() { + return userID; + } + + + //Set and get the post creation time + public void setPost_time(int post_time) { + this.post_time = post_time; + } + + public int getPost_time() { + return post_time; + } + + + //Set and get the content of the post + public void setContent(String content) { + this.content = content; + } + + public String getContent() { + return content; + } +} +