PortalUser
The PortalUser entity, mapped to the portal_user table.
| Table | portal_user |
| Tenant-scoped | No — global table |
| Columns | 10 |
| Relationships | 1 |
| Source | backend/src/main/java/com/motorph/payroll/model/PortalUser.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
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
portalUserId | Integer | portal_user_id | — | primary key, generated |
email | String | email | — | unique |
fullName | String | full_name | — | — |
companyName | String | company_name | Yes | — |
passwordHash | String | password_hash | — | — |
isActive | boolean | is_active | — | — |
emailVerifiedAt | LocalDateTime | email_verified_at | Yes | When the customer proved they own the email; null until then, and they can't sign in. |
createdAt | LocalDateTime | created_at | — | — |
updatedAt | LocalDateTime | updated_at | — | — |
tenantId | Integer | tenant_id | Yes | The company the account orders from. |
Relationships
| Field | Kind | Target | Join column | Required |
|---|---|---|---|---|
customer | @ManyToOne | com.motorph.payroll.sales.model.Customer | customer_id | — |
Referenced by
| Entity | Field | Kind |
|---|---|---|
| CustomerOrder | portalUser | @ManyToOne |
Neighbourhood
Repository
PortalUserRepository
Declared over PortalUser with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/PortalUserRepository.java
| Method | Returns | Notes |
|---|---|---|
findByEmail(String email) | Optional<PortalUser> | derived |
existsByEmail(String email) | boolean | derived |
findFirstByEmailIgnoreCaseOrderByPortalUserIdAsc(String email) | Optional<PortalUser> | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over PortalUser.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| PortalAuthController | /api/portal/auth | 6 | Inventory & Portal |
| PortalOrderController | /api/portal/orders | 7 | Inventory & Portal |
| PortalProfileController | /api/portal/profile | 3 | Inventory & 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/.