mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-08 11:59:13 +00:00
99 lines
2.0 KiB
Java
99 lines
2.0 KiB
Java
package com.imprimelibros.erp.auth;
|
|
|
|
import java.time.LocalDateTime;
|
|
import jakarta.persistence.*;
|
|
|
|
@Entity
|
|
@Table(name = "password_reset_tokens")
|
|
public class PasswordResetToken {
|
|
|
|
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
@Column(name = "created_at", nullable = false)
|
|
private LocalDateTime createdAt;
|
|
|
|
@Column(name = "expires_at", nullable = false)
|
|
private LocalDateTime expiresAt;
|
|
|
|
@Column(name = "request_ip", length = 64)
|
|
private String requestIp;
|
|
|
|
@Column(name = "token_hash", length = 128, nullable = false)
|
|
private String tokenHash;
|
|
|
|
@Column(name = "used_at")
|
|
private LocalDateTime usedAt;
|
|
|
|
@Column(name = "user_agent", length = 255)
|
|
private String userAgent;
|
|
|
|
@Column(name = "user_id", nullable = false)
|
|
private Long userId;
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public LocalDateTime getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
public void setCreatedAt(LocalDateTime createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public LocalDateTime getExpiresAt() {
|
|
return expiresAt;
|
|
}
|
|
|
|
public void setExpiresAt(LocalDateTime expiresAt) {
|
|
this.expiresAt = expiresAt;
|
|
}
|
|
|
|
public String getRequestIp() {
|
|
return requestIp;
|
|
}
|
|
|
|
public void setRequestIp(String requestIp) {
|
|
this.requestIp = requestIp;
|
|
}
|
|
|
|
public String getTokenHash() {
|
|
return tokenHash;
|
|
}
|
|
|
|
public void setTokenHash(String tokenHash) {
|
|
this.tokenHash = tokenHash;
|
|
}
|
|
|
|
public LocalDateTime getUsedAt() {
|
|
return usedAt;
|
|
}
|
|
|
|
public void setUsedAt(LocalDateTime usedAt) {
|
|
this.usedAt = usedAt;
|
|
}
|
|
|
|
public String getUserAgent() {
|
|
return userAgent;
|
|
}
|
|
|
|
public void setUserAgent(String userAgent) {
|
|
this.userAgent = userAgent;
|
|
}
|
|
|
|
public Long getUserId() {
|
|
return userId;
|
|
}
|
|
|
|
public void setUserId(Long userId) {
|
|
this.userId = userId;
|
|
}
|
|
|
|
|
|
} |