y_ys79
2024-01-05 e5840972b6b17ec03bfc1069a9cacfe0cef189c6
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
package com.qianwen.mdc.domain;
 
import java.io.Serializable;
import java.util.Date;
//import javax.persistence.*;
 
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
 
/**
 * 用户登陆token数据
 */
@TableName("account_token")
public class AccountToken implements Serializable {
    /**
     * primary key
     */
    //@Id
    //@GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type=IdType.AUTO)
    private Integer id;
 
    /**
     * 
     */
    private Integer userId;
 
    /**
     * 
     */
    private String token;
 
    /**
     * 
     */
    private Date expireTime;
 
    private static final long serialVersionUID = 1L;
 
    /**
     * 获取primary key
     *
     * @return id - primary key
     */
    public Integer getId() {
        return id;
    }
 
    /**
     * 设置primary key
     *
     * @param id primary key
     */
    public void setId(Integer id) {
        this.id = id;
    }
 
    /**
     * 获取user id
     *
     * @return user - user id
     */
    public Integer getUserId() {
        return userId;
    }
 
    /**
     * 设置user id
     *
     * @param user user id
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }
 
    /**
     * 获取token
     *
     * @return token - token
     */
    public String getToken() {
        return token;
    }
 
    /**
     * 设置token
     *
     * @param token token
     */
    public void setToken(String token) {
        this.token = token;
    }
 
    public Date getExpireTime() {
        return expireTime;
    }
 
    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }
 
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", token=").append(token);
        sb.append(", expireTime=").append(expireTime);
        sb.append("]");
        return sb.toString();
    }
 
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AccountToken other = (AccountToken) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getToken() == null ? other.getToken() == null : this.getToken().equals(other.getToken()))
            && (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()));
    }
 
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getToken() == null) ? 0 : getToken().hashCode());
        result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
        return result;
    }
}