Skip to main content

PortalEmailVerificationToken

A customer-portal email confirmation link: single use, stored as a SHA-256 of the emailed token.

Tableportal_email_verification_tokens
Tenant-scopedNo — global table
Columns8
Relationships0
Sourcebackend/src/main/java/com/motorph/payroll/model/PortalEmailVerificationToken.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—
returnToStringreturn_toYesThe storefront page to send the customer back to once confirmed; a validated portal path or null.
createdAtInstantcreated_at——

Repository​

PortalEmailVerificationTokenRepository​

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

MethodReturnsNotes
findByTokenHash(String tokenHash)Optional<PortalEmailVerificationToken>derived
findFirstByPortalUserIdOrderByCreatedAtDesc(Integer portalUserId)Optional<PortalEmailVerificationToken>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 PortalEmailVerificationToken.

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/.