JyMessage.java 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. package com.topsoft.jianyu.SQLite;
  2. import android.content.ContentValues;
  3. /**
  4. * Created by wangkaiyue on 2018/1/26.
  5. */
  6. public class JyMessage {
  7. private Integer id; //标识
  8. private String title; //标题
  9. private String content; //内容
  10. private String link; //链接
  11. private String category; //分类
  12. private Integer readed; //是否已读 0:未读 1:已读
  13. private Integer comeintime; //接受时间
  14. private String openid; //用户标识
  15. private String descript; //描述
  16. private String extend; //扩展字段
  17. public Integer getId() {
  18. return id;
  19. }
  20. public void setId(Integer id) {
  21. this.id = id;
  22. }
  23. public String getTitle() {
  24. return title;
  25. }
  26. public void setTitle(String title) {
  27. this.title = title;
  28. }
  29. public String getContent() {
  30. return content;
  31. }
  32. public void setContent(String content) {
  33. this.content = content;
  34. }
  35. public String getLink() {
  36. return link;
  37. }
  38. public void setLink(String link) {
  39. this.link = link;
  40. }
  41. public String getCategory() {
  42. return category;
  43. }
  44. public void setCategory(String category) {
  45. this.category = category;
  46. }
  47. public Integer getReaded() {
  48. return readed;
  49. }
  50. public void setReaded(Integer readed) {
  51. this.readed = readed;
  52. }
  53. public Integer getComeintime() {
  54. return comeintime;
  55. }
  56. public void setComeintime(Integer comeintime) {
  57. this.comeintime = comeintime;
  58. }
  59. public String getOpenid() {
  60. return openid;
  61. }
  62. public void setOpenid(String openid) {
  63. this.openid = openid;
  64. }
  65. public String getDescript() {
  66. return descript;
  67. }
  68. public void setDescript(String descript) {
  69. this.descript = descript;
  70. }
  71. public String getExtend() {
  72. return extend;
  73. }
  74. public void setExtend(String extend) {
  75. this.extend = extend;
  76. }
  77. public JyMessage(){}
  78. /**
  79. * 推送信息
  80. * @param title 标题
  81. * @param content 内容
  82. * @param link 链接
  83. * @param category 分类
  84. * @param readed 是否已读
  85. * @param comeintime 创建事件
  86. * @param openid 用户标识
  87. * @param descript 描述
  88. * @param extend 扩展字段
  89. */
  90. public JyMessage(String title, String content, String link, String category, Integer readed, Integer comeintime, String openid,String descript,String extend) {
  91. this.title = title;
  92. this.content = content;
  93. this.link = link;
  94. this.category = category;
  95. this.readed = readed;
  96. this.comeintime = comeintime;
  97. this.openid = openid;
  98. this.descript=descript;
  99. this.extend=extend;
  100. }
  101. public ContentValues getMsaagesContentValues(){
  102. ContentValues cv = new ContentValues();
  103. cv.put("id", id);
  104. cv.put("title", title);
  105. cv.put("content",content);
  106. cv.put("link", link);
  107. cv.put("category",category);
  108. cv.put("readed", readed);
  109. cv.put("comeintime", comeintime);
  110. cv.put("descript",descript);
  111. if(!"".equals(openid)&&openid!=null){
  112. cv.put("openid",openid);
  113. }
  114. return cv;
  115. }
  116. }