37 lines
841 B
Java
37 lines
841 B
Java
package ru.ulstu.user.model;
|
|
|
|
import jakarta.validation.constraints.NotEmpty;
|
|
import jakarta.validation.constraints.Size;
|
|
import ru.ulstu.configuration.Constants;
|
|
|
|
import java.util.Objects;
|
|
|
|
public class UserResetPasswordDto {
|
|
@NotEmpty
|
|
@Size(min = Constants.MIN_PASSWORD_LENGTH, max = 50)
|
|
private String password;
|
|
@NotEmpty
|
|
@Size(min = Constants.MIN_PASSWORD_LENGTH, max = 50)
|
|
private String passwordConfirm;
|
|
|
|
@NotEmpty
|
|
@Size(min = Constants.RESET_KEY_LENGTH)
|
|
private String resetKey;
|
|
|
|
public String getPassword() {
|
|
return password;
|
|
}
|
|
|
|
public String getPasswordConfirm() {
|
|
return passwordConfirm;
|
|
}
|
|
|
|
public boolean isPasswordsValid() {
|
|
return Objects.equals(password, passwordConfirm);
|
|
}
|
|
|
|
public String getResetKey() {
|
|
return resetKey;
|
|
}
|
|
}
|