1 package com.foxinmy.weixin4j.qy.model;
2
3 import java.io.Serializable;
4 import java.util.Date;
5
6 import com.alibaba.fastjson.annotation.JSONField;
7 import com.foxinmy.weixin4j.qy.type.CorpType;
8 import com.foxinmy.weixin4j.qy.type.CorporateType;
9
10
11
12
13
14
15
16
17
18
19 public class CorpInfo implements Serializable {
20
21 private static final long serialVersionUID = 1251033124778972419L;
22
23
24
25 @JSONField(name = "corpid")
26 private String corpId;
27
28
29
30 @JSONField(name = "corp_name")
31 private String corpName;
32
33
34
35 @JSONField(name = "corp_square_logo_url")
36 private String squareLogoUrl;
37
38
39
40 @JSONField(name = "corp_round_logo_url")
41 private String roundLogoUrl;
42
43
44
45 @JSONField(name = "corp_type")
46 private String corpType;
47
48
49
50 @JSONField(name = "corp_user_max")
51 private Integer userMax;
52
53
54
55 @JSONField(name = "corp_agent_max")
56 private Integer agentMax;
57
58
59
60 @JSONField(name = "corp_wxqrcode")
61 private String wxQrCode;
62
63
64
65 @JSONField(name = "corp_full_name")
66 private String fullName;
67
68
69
70 @JSONField(name = "verified_end_time")
71 private long verifiedEndTime;
72
73
74
75 @JSONField(name = "subject_type")
76 private int corporateType;
77
78 public String getCorpId() {
79 return corpId;
80 }
81
82 public String getCorpType() {
83 return corpType;
84 }
85
86 @JSONField(serialize = false)
87 public CorpType getFormatCorpType() {
88 return corpType != null ? CorpType.valueOf(corpType) : null;
89 }
90
91 public String getCorpName() {
92 return corpName;
93 }
94
95 public String getSquareLogoUrl() {
96 return squareLogoUrl;
97 }
98
99 public String getRoundLogoUrl() {
100 return roundLogoUrl;
101 }
102
103 public Integer getUserMax() {
104 return userMax;
105 }
106
107 public Integer getAgentMax() {
108 return agentMax;
109 }
110
111 public String getWxQrCode() {
112 return wxQrCode;
113 }
114
115 public String getFullName() {
116 return fullName;
117 }
118
119 public long getVerifiedEndTime() {
120 return verifiedEndTime;
121 }
122
123 @JSONField(serialize = false)
124 public Date getFormatVerifiedEndTime() {
125 return verifiedEndTime > 0l ? new Date(verifiedEndTime * 1000l) : null;
126 }
127
128 public int getCorporateType() {
129 return corporateType;
130 }
131
132 @JSONField(serialize = false)
133 public CorporateType getFormatCorporateType() {
134 return corporateType > 0
135 && corporateType <= CorporateType.values().length ? CorporateType
136 .values()[corporateType - 1] : null;
137 }
138
139
140
141 public void setCorpId(String corpId) {
142 this.corpId = corpId;
143 }
144
145 public void setCorpName(String corpName) {
146 this.corpName = corpName;
147 }
148
149 public void setSquareLogoUrl(String squareLogoUrl) {
150 this.squareLogoUrl = squareLogoUrl;
151 }
152
153 public void setRoundLogoUrl(String roundLogoUrl) {
154 this.roundLogoUrl = roundLogoUrl;
155 }
156
157 public void setCorpType(String corpType) {
158 this.corpType = corpType;
159 }
160
161 public void setUserMax(Integer userMax) {
162 this.userMax = userMax;
163 }
164
165 public void setAgentMax(Integer agentMax) {
166 this.agentMax = agentMax;
167 }
168
169 public void setWxQrCode(String wxQrCode) {
170 this.wxQrCode = wxQrCode;
171 }
172
173 public void setFullName(String fullName) {
174 this.fullName = fullName;
175 }
176
177 public void setVerifiedEndTime(long verifiedEndTime) {
178 this.verifiedEndTime = verifiedEndTime;
179 }
180
181 public void setCorporateType(int corporateType) {
182 this.corporateType = corporateType;
183 }
184
185 @Override
186 public String toString() {
187 return "CorpInfo [corpId=" + corpId + ", corpName=" + corpName
188 + ", squareLogoUrl=" + squareLogoUrl + ", roundLogoUrl="
189 + roundLogoUrl + ", corpType=" + corpType + ", userMax="
190 + userMax + ", agentMax=" + agentMax + ", wxQrCode=" + wxQrCode
191 + ", fullName=" + fullName + ", verifiedEndTime="
192 + verifiedEndTime + ", corporateType=" + corporateType + "]";
193 }
194 }