mirror of
https://github.com/kmitresse/Cards-Rush.git
synced 2026-05-13 17:11:49 +00:00
feat: dev-web - add equal method for RecoveryPasswordToken
This commit is contained in:
@@ -12,6 +12,7 @@ import jakarta.persistence.Temporal;
|
||||
import jakarta.persistence.TemporalType;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Représentation d'un token de réinitialisation de mot de passe
|
||||
@@ -131,6 +132,19 @@ public class RecoveryPasswordToken {
|
||||
this.expiresAt = expiresAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getId(), getToken(), getUser(), getExpiresAt());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof RecoveryPasswordToken)) return false;
|
||||
RecoveryPasswordToken that = (RecoveryPasswordToken) o;
|
||||
return Objects.equals(getId(), that.getId()) && Objects.equals(getToken(), that.getToken()) && Objects.equals(getUser(), that.getUser()) && Objects.equals(getExpiresAt(), that.getExpiresAt());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("RecoveryPasswordToken{id=%s, token=%s, user=%s, expiresAt=%s}",
|
||||
|
||||
Reference in New Issue
Block a user