Comment Model
Overview
The comment table stores comments or feedback related to various objects in an application. These comments are associated with specific users, and they may belong to different categories or versions, with the option to be pinned, deleted, or contain historical information.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| id | string | Primary Key – Unique identifier for the comment (UUID). | ❌ |
| objectId | string | Identifier of the object (e.g., task, document, project) that the comment is associated with. | ✅ |
| userId | string | Identifier of the user who created the comment. | ✅ |
| comment | string | The content of the comment. | ✅ |
| category | string | The category or type of the comment (e.g., "feedback", "issue", "discussion"). | ✅ |
| version | number | The version number associated with the object being commented on. | ✅ |
| pinned | boolean | Indicates whether the comment is pinned or highlighted. A value of 1 means pinned, 0 means not pinned. | ❌ |
| history | array | Stores any historical changes to the comment, possibly in a serialized or JSON format. | ❌ |
| metadata | object | Additional metadata related to the comment (e.g., creation context, tags). | ✅ |
| attachedDocumentIds | array | A list of document IDs attached to the comment, likely in a serialized or JSON format. | ❌ |
| created_at | date | Timestamp when the comment was created. | ❌ |
| modified_at | date | Timestamp when the comment was last modified. | ❌ |
| isDeleted | boolean | Indicates whether the comment has been deleted. A value of 1 means deleted, 0 means not deleted. | ❌ |
Sample JSON
{
"id": "example_value",
"objectId": "example_value",
"userId": "example_value",
"comment": "example_value",
"category": "example_value",
"version": "example_value",
"pinned": "example_value",
"history": "example_value",
"metadata": "example_value",
"attachedDocumentIds": "example_value",
"created_at": "example_value",
"modified_at": "example_value",
"isDeleted": "example_value"
}