package com.njzscloud.supervisory.gps.tuqiang.jimi;

import cn.hutool.extra.spring.SpringUtil;
import com.njzscloud.supervisory.config.JimiProperties;
import com.njzscloud.supervisory.gps.tuqiang.jimi.support.JimiParam;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * 刷新access_token
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class OauthTokenRefreshParam extends JimiParam<OauthTokenRefreshResult> {
    private String access_token;
    private String refresh_token;
    private String expires_in;

    public OauthTokenRefreshParam() {
        super("jimi.oauth.token.refresh");
        JimiProperties jimiProperties = SpringUtil.getBean(JimiProperties.class);
        this.expires_in = jimiProperties.getExpires().toString();
    }

    @Override
    public Class<OauthTokenRefreshResult> resultType() {
        return OauthTokenRefreshResult.class;
    }
}
