AppMessageBo.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package com.goafanti.message.bo;
  2. import java.util.Date;
  3. import org.apache.commons.lang3.time.DateFormatUtils;
  4. import com.goafanti.common.constant.AFTConstants;
  5. public class AppMessageBo {
  6. private String id;
  7. private String title;
  8. private String body;
  9. private Date createTime;
  10. private Date sendTime;
  11. private Boolean isRead ;
  12. public String getId() {
  13. return id;
  14. }
  15. public void setId(String id) {
  16. this.id = id;
  17. }
  18. public String getTitle() {
  19. return title;
  20. }
  21. public void setTitle(String title) {
  22. this.title = title;
  23. }
  24. public Date getCreateTime() {
  25. return createTime;
  26. }
  27. public void setCreateTime(Date createTime) {
  28. this.createTime = createTime;
  29. }
  30. public Boolean getIsRead() {
  31. return isRead;
  32. }
  33. public void setIsRead(Boolean isRead) {
  34. this.isRead = isRead;
  35. }
  36. public String getBody() {
  37. return body;
  38. }
  39. public void setBody(String body) {
  40. this.body = body;
  41. }
  42. public Date getSendTime() {
  43. return sendTime;
  44. }
  45. public void setSendTime(Date sendTime) {
  46. this.sendTime = sendTime;
  47. }
  48. public String getSendTimeFormattedDate() {
  49. if (this.sendTime == null) {
  50. return null;
  51. } else {
  52. return DateFormatUtils.format(this.getSendTime(), AFTConstants.YYYYMMDDHHMMSS);
  53. }
  54. }
  55. public String getCreateTimeFormattedDate() {
  56. if (this.createTime == null) {
  57. return null;
  58. } else {
  59. return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
  60. }
  61. }
  62. }