Tenant
One customer company.
| Table | tenant |
| Tenant-scoped | No — global table |
| Columns | 11 |
| Relationships | 0 |
| Source | backend/src/main/java/com/motorph/payroll/model/Tenant.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 |
|---|---|---|---|---|
tenantId | Integer | tenant_id | — | primary key, generated |
slug | String | slug | — | unique; DNS-safe identifier: public careers URLs today, subdomain routing later. |
name | String | name | — | — |
status | String | status | — | — |
timezone | String | timezone | — | — |
adminEmail | String | admin_email | Yes | — |
trialEndsAt | LocalDateTime | trial_ends_at | Yes | When a self-serve workspace stops being served. |
createdAt | LocalDateTime | created_at | — | — |
createdBy | String | created_by | Yes | — |
updatedAt | LocalDateTime | updated_at | Yes | — |
updatedBy | String | updated_by | Yes | — |
Repository
TenantRepository
Declared over Tenant with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/TenantRepository.java
| Method | Returns | Notes |
|---|---|---|
findBySlugIgnoreCase(String slug) | Optional<Tenant> | derived |
existsBySlugIgnoreCase(String slug) | boolean | derived |
findByStatusOrderByTenantIdAsc(String status) | List<Tenant> | derived |
findByStatusInOrderByTenantIdAsc(Collection<String> statuses) | List<Tenant> | derived |
findByStatusAndTrialEndsAtBefore(String status, LocalDateTime cutoff) | List<Tenant> | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over Tenant.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| PublicSignupController | /api/public/signup | 2 | Billing & Platform |
| TenantAdminController | /api/admin/tenants | 7 | Billing & Platform |
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/.