package cn.reghao.bnt.web.admin.model.vo;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author reghao
 * @date 2023-02-14 16:51:21
 */
@Setter
@Getter
public class AccountToken implements Serializable {
    private static final long serialVersionUID = 1L;

    private String accessToken;
    // ms timestamp
    private long accessExpireAt;
    private String refreshToken;
    // ms timestamp
    private long refreshExpireAt;

    public AccountToken(String accessToken) {
        this.accessToken = accessToken;
        this.accessExpireAt = System.currentTimeMillis() + 3600*24*7*1000;
        this.refreshToken = accessToken;
        this.refreshExpireAt = this.accessExpireAt;
    }
}
