package com.muyu.common.wechat.domain;

import lombok.Data;

/**
 * @author 24415
 */
@Data
public class AccessToken {

    private String access_token;

    private Long expires_in;

    public void setExpiresTime(Long expiresIn) {
        this.expires_in = System.currentTimeMillis()+expiresIn*1000;
    }

    public boolean isExpired(Long expiresIn){
        long now = System.currentTimeMillis();
        return now>expiresIn;
    }
}
