package com.njcn.common.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author hongawen
 * @version 1.0.0
 * @date 2022年03月11日 11:29
 */
@Data
public class UserTokenInfo implements Serializable {

    /**
     * 通行token
     */
    private String accessTokenJti;

    /**
     * 刷新token
     */
    private String refreshToken;


    /**
     * refreshToken的生命周期结点
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime refreshTokenExpire;


}
