CrmNote
The CrmNote entity, mapped to the crm_note table.
| Table | crm_note |
| Tenant-scoped | Yes — extends TenantOwned |
| Columns | 3 |
| Relationships | 5 |
| Source | backend/src/main/java/com/motorph/payroll/model/CrmNote.java |
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
noteId | Integer | note_id | — | primary key, generated |
content | String | content | — | — |
createdAt | LocalDateTime | created_at | — | — |
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.
Relationships
| Field | Kind | Target | Join column | Required |
|---|---|---|---|---|
deal | @ManyToOne | CrmDeal | deal_id | — |
contact | @ManyToOne | CrmContact | contact_id | — |
organization | @ManyToOne | CrmOrganization | org_id | — |
lead | @ManyToOne | CrmLead | lead_id | — |
createdBy | @ManyToOne | Employee | created_by | — |
Neighbourhood
Repository
CrmNoteRepository
Declared over CrmNote with id type Integer, with JpaSpecificationExecutor for dynamic filtering. Source: backend/src/main/java/com/motorph/payroll/repository/CrmNoteRepository.java
| Method | Returns | Notes |
|---|---|---|
findAllByDeal_DealIdOrderByCreatedAtDesc(Integer dealId) | List<CrmNote> | derived |
findAllByContact_ContactIdOrderByCreatedAtDesc(Integer contactId) | List<CrmNote> | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over CrmNote.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| CrmDealController | /api/crm/deals | 11 | CRM |
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/.