1 package com.foxinmy.weixin4j.mp.model;
2
3 import com.alibaba.fastjson.annotation.JSONField;
4 import com.foxinmy.weixin4j.model.Token;
5
6
7
8
9
10
11
12
13
14 public class OauthToken extends Token {
15
16 private static final long serialVersionUID = 1L;
17
18
19
20
21 @JSONField(name = "openid")
22 private String openId;
23
24
25
26 @JSONField(name = "unionid")
27 private String unionId;
28
29
30
31
32 @JSONField(name = "refresh_token")
33 private String refreshToken;
34
35 private String scope;
36
37 public OauthToken(String accessToken, long expires) {
38 super(accessToken, expires);
39 }
40
41 public String getOpenId() {
42 return openId;
43 }
44
45 public void setOpenId(String openId) {
46 this.openId = openId;
47 }
48
49 public String getUnionId() {
50 return unionId;
51 }
52
53 public void setUnionId(String unionId) {
54 this.unionId = unionId;
55 }
56
57 public String getRefreshToken() {
58 return refreshToken;
59 }
60
61 public void setRefreshToken(String refreshToken) {
62 this.refreshToken = refreshToken;
63 }
64
65 public String getScope() {
66 return scope;
67 }
68
69 public void setScope(String scope) {
70 this.scope = scope;
71 }
72
73 @Override
74 public String toString() {
75 return "OauthToken [openId=" + openId + ", unionId=" + unionId
76 + ", refreshToken=" + refreshToken + ", scope=" + scope + ", "
77 + super.toString() + "]";
78 }
79 }