Skip to main content

CrmNote

The CrmNote entity, mapped to the crm_note table.

Tablecrm_note
Tenant-scopedYes — extends TenantOwned
Columns3
Relationships5
Sourcebackend/src/main/java/com/motorph/payroll/model/CrmNote.java

Columns​

FieldTypeColumnNullNotes
noteIdIntegernote_id—primary key, generated
contentStringcontent——
createdAtLocalDateTimecreated_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​

FieldKindTargetJoin columnRequired
deal@ManyToOneCrmDealdeal_id—
contact@ManyToOneCrmContactcontact_id—
organization@ManyToOneCrmOrganizationorg_id—
lead@ManyToOneCrmLeadlead_id—
createdBy@ManyToOneEmployeecreated_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

MethodReturnsNotes
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.

ControllerBase pathEndpointsModule
CrmDealController/api/crm/deals11CRM

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/.