package com.cm.common.plugin.pojo.bos;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: ClientTokenBO
 * @Description: 客户端token
 * @Author: WangGeng
 * @Date: 2019/10/16 12:17 上午
 * @Version: 1.0
 **/
public class ClientTokenBO {

    private String accessToken;
    private String tokenType;
    private int expiresIn;
    private String scope;
    private String jti;
    private long createTime;

    public String getAccessToken() {
        return accessToken == null ? "" : accessToken.trim();
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getTokenType() {
        return tokenType == null ? "" : tokenType.trim();
    }

    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }

    public int getExpiresIn() {
        return expiresIn;
    }

    public void setExpiresIn(int expiresIn) {
        this.expiresIn = expiresIn;
    }

    public String getScope() {
        return scope == null ? "" : scope.trim();
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String getJti() {
        return jti == null ? "" : jti.trim();
    }

    public void setJti(String jti) {
        this.jti = jti;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"accessToken\":")
                .append("\"").append(accessToken).append("\"");
        sb.append(",\"tokenType\":")
                .append("\"").append(tokenType).append("\"");
        sb.append(",\"expiresIn\":")
                .append(expiresIn);
        sb.append(",\"scope\":")
                .append("\"").append(scope).append("\"");
        sb.append(",\"jti\":")
                .append("\"").append(jti).append("\"");
        sb.append(",\"createTime\":")
                .append(createTime);
        sb.append('}');
        return sb.toString();
    }
}
