CrmSettings
Single-row table of configurable CRM behavior flags, following the payroll_settings pattern.
| Table | crm_settings |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 12 |
| Relationships | 0 |
| Source | backend/src/main/java/com/motorph/payroll/model/CrmSettings.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
crmSettingsId | Integer | crm_settings_id | — | primary key, generated |
useStageDefaultProbability | Boolean | use_stage_default_probability | — | — |
defaultDealProbability | Integer | default_deal_probability | — | — |
autoCloseDateOnWonLost | Boolean | auto_close_date_on_won_lost | — | — |
requireLostReason | Boolean | require_lost_reason | — | — |
defaultLeadSource | String | default_lead_source | Yes | — |
version | Integer | version | — | — |
isLocked | Boolean | is_locked | — | — |
approvedBy | String | approved_by | Yes | — |
createdDate | LocalDateTime | created_date | — | — |
lastModifiedBy | String | last_modified_by | Yes | — |
lastModifiedDate | LocalDateTime | last_modified_date | Yes | — |
Plus tenant_id, inherited from TenantOwned. Hibernate stamps it on insert and adds where tenant_id = ? to every query, so it is never written or read by application code.
Referenced by
| Entity | Field | Kind |
|---|---|---|
| CrmSettingsChange | crmSettings | @ManyToOne |
Neighbourhood
Repository
CrmSettingsRepository
Declared over CrmSettings with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/CrmSettingsRepository.java
| Method | Returns | Notes |
|---|---|---|
findFirstByOrderByCrmSettingsIdAsc() | Optional<CrmSettings> | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over CrmSettings.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| CrmDealController | /api/crm/deals | 11 | CRM |
| CrmPicklistController | /api/crm/picklists | 4 | CRM |
| CrmSettingsController | /api/crm/settings | 3 | CRM |
| 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/.