Conversation (v1.0.0)
Conversation domain entity, encapsulates conversation information and business rules
Overview
The Conversation
entity represents a conversation in the chat service. It encapsulates the information and business rules related to a conversation, such as its unique identifier, name, user ownership, creation date, last modified date, and version for optimistic concurrency control.
Entity Properties
Name | Type | Required | Description |
---|---|---|---|
id | UUID | Required | Unique identifier for the conversation |
name | string | Required | A name of the conversation |
userId | UUID | Required | Unique identifier for the user who owns the conversation |
createdAt | DateTime | Required | The date and time the conversation was created |
lastModifiedAt | DateTime | Optional | The date and time the conversation was updated |
version | UUID | Required | Version of the record for optimistic concurrency control |
Entity Relationships
- A conversation is owned by one user.
- A conversation can have multiple messages.