龚焕茏
2024-04-25 5777b0803509008e638e747eca5408f82ffbc8bf
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;
}