Skip to main content

Tenant

One customer company.

Tabletenant
Tenant-scopedNo — global table
Columns11
Relationships0
Sourcebackend/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​

FieldTypeColumnNullNotes
tenantIdIntegertenant_id—primary key, generated
slugStringslug—unique; DNS-safe identifier: public careers URLs today, subdomain routing later.
nameStringname——
statusStringstatus——
timezoneStringtimezone——
adminEmailStringadmin_emailYes—
trialEndsAtLocalDateTimetrial_ends_atYesWhen a self-serve workspace stops being served.
createdAtLocalDateTimecreated_at——
createdByStringcreated_byYes—
updatedAtLocalDateTimeupdated_atYes—
updatedByStringupdated_byYes—

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

MethodReturnsNotes
findBySlugIgnoreCase(String slug)Optional<Tenant>derived
existsBySlugIgnoreCase(String slug)booleanderived
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.

ControllerBase pathEndpointsModule
PublicSignupController/api/public/signup2Billing & Platform
TenantAdminController/api/admin/tenants7Billing & 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/.