Skip to main content

PortalPasswordResetToken

A customer-portal password-reset link.

Tableportal_password_reset_tokens
Tenant-scopedNo — global table
Columns7
Relationships0
Sourcebackend/src/main/java/com/motorph/payroll/model/PortalPasswordResetToken.java
Not tenant-scoped

This entity does not extend TenantOwned, so its rows are shared across every tenant. TenantCoverageTest allows that only for tables deliberately declared global.

Columns​

FieldTypeColumnNullNotes
idLongidYes—
portalUserIdIntegerportal_user_id——
tenantIdLongtenant_idYes—
tokenHashStringtoken_hash—unique
expiresAtInstantexpires_at——
usedAtInstantused_atYes—
createdAtInstantcreated_at——

Repository​

PortalPasswordResetTokenRepository​

Declared over PortalPasswordResetToken with id type Long. Source: backend/src/main/java/com/motorph/payroll/repository/PortalPasswordResetTokenRepository.java

MethodReturnsNotes
findByTokenHash(String tokenHash)Optional<PortalPasswordResetToken>derived
findFirstByPortalUserIdOrderByCreatedAtDesc(Integer portalUserId)Optional<PortalPasswordResetToken>derived
countByPortalUserIdAndCreatedAtAfter(Integer portalUserId, Instant since)longderived
invalidateAllForUser(@Param("portalUserId") Integer portalUserId, @Param("now") Instant now)voidexplicit @Query, modifying

Reached by​

These controllers hold — directly or through a service they depend on — a repository over PortalPasswordResetToken.

ControllerBase pathEndpointsModule
PortalAuthController/api/portal/auth6Inventory & Portal

Generated page

This page is rebuilt from the source on every docs build by docs-site/scripts/gen-code-wiki.mjs. Editing it has no effect — change the code, or, if what you want to say is prose, write it in docs/.