fuliqi
2024-02-19 dd81058589bad62f173d9e2663f71c69776d9205
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.ycl.system;
 
import lombok.Data;
 
import java.time.LocalDateTime;
 
@Data
public class JwtToken {
 
    public JwtToken(){}
 
    public JwtToken(Integer userId, Integer staffId, LocalDateTime expirationTime){
        this.userId =userId;
        this.staffId = staffId;
        this.expirationTime = expirationTime;
        this.expiration = expirationTime.isBefore(LocalDateTime.now());
    }
 
    private Integer userId;
 
    private Integer staffId;
 
    private LocalDateTime expirationTime;
 
    private Boolean expiration;
 
    private String token;
}