package api.common.pojo.vo.sign;

import api.common.util.TimeUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SimulationTokenVO {

    private String access_token;
    private String token_type;
    private String refresh_token;
    private int expires_in;
    private String scope;
    private Timestamp expires_time;

    //根据令牌有效时间设置到期时间
    public void setExpires_in(int expires_in) {
        this.expires_in = expires_in;
        this.expires_time = TimeUtil.getPostTimestamp(expires_in);
    }
}
