package f1.entity; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @JsonInclude(JsonInclude.Include.NON_NULL) public class CommentItem { private int id; @JsonProperty("user_id") private int userId; private String username; @JsonProperty("response_id") private Integer responseId; @JsonProperty("root_id") private Integer rootId; private String content; @JsonProperty("reply_count") private int replyCount; @JsonProperty("reply_to_user_id") private Integer replyToUserId; @JsonProperty("reply_to_username") private String replyToUsername; public CommentItem(int id, int userId, String username, Integer responseId, Integer rootId, String content, int replyCount) { this.id = id; this.userId = userId; this.username = username; this.responseId = responseId; this.rootId = rootId; this.content = content; this.replyCount = replyCount; } public CommentItem(int id, int userId, String username, Integer responseId, Integer rootId, String content, Integer replyToUserId, String replyToUsername) { this.id = id; this.userId = userId; this.username = username; this.responseId = responseId; this.rootId = rootId; this.content = content; this.replyToUserId = replyToUserId; this.replyToUsername = replyToUsername; } public int getId() { return id; } public int getUserId() { return userId; } public String getUsername() { return username; } public Integer getResponseId() { return responseId; } public Integer getRootId() { return rootId; } public String getContent() { return content; } public int getReplyCount() { return replyCount; } public Integer getReplyToUserId() { return replyToUserId; } public String getReplyToUsername() { return replyToUsername; } }