Skip to main content

Conversation

The Conversation entity, mapped to the conversation table.

Tableconversation
Tenant-scopedYes — extends TenantOwned
Columns4
Relationships2
Sourcebackend/src/main/java/com/motorph/payroll/model/Conversation.java

Columns​

FieldTypeColumnNullNotes
conversationIdIntegerconversation_id—primary key, generated
lastMessageTimestampLocalDateTimelast_message_timestamp——
lastMessageContentStringlast_message_content——
unreadCountIntegerunread_count——

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
participant1@ManyToOneEmployeeparticipant1_employee_idYes
participant2@ManyToOneEmployeeparticipant2_employee_idYes

Referenced by​

EntityFieldKind
ChatMessageconversation@ManyToOne

Neighbourhood​

Repository​

ConversationRepository​

Declared over Conversation with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/ConversationRepository.java

MethodReturnsNotes
findAllByParticipant(@Param("empId") Integer empId)List<Conversation>explicit @Query
findBetween(@Param("id1") Integer id1, @Param("id2") Integer id2)Optional<Conversation>explicit @Query
existsByIdAndParticipant(@Param("conversationId") Integer conversationId, @Param("employeeId") Integer employeeId)booleanexplicit @Query

Reached by​

These controllers hold — directly or through a service they depend on — a repository over Conversation.

ControllerBase pathEndpointsModule
ConversationController/api/conversations5Platform Misc

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