1 package com.foxinmy.weixin4j.mp.model;
2
3 import com.alibaba.fastjson.annotation.JSONField;
4
5
6
7
8
9
10
11
12
13
14 public class ArticleComment extends Comment {
15
16 private static final long serialVersionUID = -8506024679132313314L;
17 @JSONField(name = "user_comment_id")
18 private String id;
19 private String openid;
20 @JSONField(name = "comment_type")
21 private int type;
22 private Comment reply;
23
24 public String getId() {
25 return id;
26 }
27
28 public void setId(String id) {
29 this.id = id;
30 }
31
32 public String getOpenid() {
33 return openid;
34 }
35
36 public void setOpenid(String openid) {
37 this.openid = openid;
38 }
39
40 public int getType() {
41 return type;
42 }
43
44 @JSONField(serialize = false)
45 public ArticleCommentType getFormatType() {
46 if (type == 0) {
47 return ArticleCommentType.GENERAL;
48 } else if (type == 1) {
49 return ArticleCommentType.MARKELECT;
50 } else {
51 return null;
52 }
53 }
54
55 public void setType(int type) {
56 this.type = type;
57 }
58
59 public Comment getReply() {
60 return reply;
61 }
62
63 public void setReply(Comment reply) {
64 this.reply = reply;
65 }
66
67 public enum ArticleCommentType {
68 GENERAL,
69 MARKELECT
70 }
71 }