1 package com.foxinmy.weixin4j.mp.model;
2
3 import java.io.Serializable;
4
5 import com.alibaba.fastjson.annotation.JSONField;
6 import com.foxinmy.weixin4j.mp.type.KfOnlineStatus;
7
8
9
10
11
12
13
14
15
16
17 public class KfOnlineAccount implements Serializable {
18
19 private static final long serialVersionUID = -4565570894727129245L;
20
21
22
23 @JSONField(name = "kf_id")
24 private String id;
25
26
27
28 @JSONField(name = "kf_account")
29 private String account;
30
31
32
33 private int status;
34
35
36
37 @JSONField(name = "auto_accept")
38 private int autoAccept;
39
40
41
42 @JSONField(name = "accepted_case")
43 private int acceptedCase;
44
45 public String getAccount() {
46 return account;
47 }
48
49 public void setAccount(String account) {
50 this.account = account;
51 }
52
53 public String getId() {
54 return id;
55 }
56
57 public void setId(String id) {
58 this.id = id;
59 }
60
61 public int getStatus() {
62 return status;
63 }
64
65 @JSONField(serialize = false)
66 public KfOnlineStatus getFormatStatus() {
67 if (status == 1) {
68 return KfOnlineStatus.PC;
69 } else if (status == 2) {
70 return KfOnlineStatus.MOBILE;
71 } else {
72 return KfOnlineStatus.BOTH;
73 }
74 }
75
76 public void setStatus(int status) {
77 this.status = status;
78 }
79
80 public int getAutoAccept() {
81 return autoAccept;
82 }
83
84 public void setAutoAccept(int autoAccept) {
85 this.autoAccept = autoAccept;
86 }
87
88 public int getAcceptedCase() {
89 return acceptedCase;
90 }
91
92 public void setAcceptedCase(int acceptedCase) {
93 this.acceptedCase = acceptedCase;
94 }
95
96 @Override
97 public String toString() {
98 return "KfAccount [account=" + account + ", id=" + id + ", status="
99 + status + ", autoAccept=" + autoAccept + ", acceptedCase="
100 + acceptedCase + "]";
101 }
102 }