---
sidebar:
  hidden: true
title: roboto.domain.comments.record
---
## Module Contents

### CommentEntityType

```python
class roboto.domain.comments.record.CommentEntityType
```

`from roboto import CommentEntityType`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/comments/record.py#L14-L33)

Bases: `roboto.compat.StrEnum`

Kind of Roboto resource a comment is on.

**Attributes**

- **CommentEntityType.Action** = `'action'`: Actions ([`Action`](/docs/reference/python-sdk/roboto/domain/actions/action#roboto.domain.actions.action.Action)).
- **CommentEntityType.Collection** = `'collection'`: Collections ([`Collection`](/docs/reference/python-sdk/roboto/domain/collections/collection#roboto.domain.collections.collection.Collection)).
- **CommentEntityType.Dataset** = `'dataset'`: Datasets ([`Dataset`](/docs/reference/python-sdk/roboto/domain/datasets/dataset#roboto.domain.datasets.dataset.Dataset)).
- **CommentEntityType.File** = `'file'`: Files ([`File`](/docs/reference/python-sdk/roboto/domain/files/file#roboto.domain.files.file.File)).
- **CommentEntityType.Invocation** = `'invocation'`: Invocations ([`Invocation`](/docs/reference/python-sdk/roboto/domain/actions/invocation#roboto.domain.actions.invocation.Invocation)).
- **CommentEntityType.Trigger** = `'trigger'`: Triggers ([`Trigger`](/docs/reference/python-sdk/roboto/domain/triggers/trigger#roboto.domain.triggers.trigger.Trigger)).

### CommentRecord

```python
class roboto.domain.comments.record.CommentRecord(/, **data: Any)
```

`from roboto import CommentRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/comments/record.py#L36-L82)

Bases: `pydantic.BaseModel`

Data record of a comment, as the Roboto API returns it.

A comment is text a user writes on an action, collection, dataset, file, invocation, or trigger, and it can mention other users in the organization. [`Comment`](/docs/reference/python-sdk/roboto/domain/comments/comment#roboto.domain.comments.comment.Comment) wraps this record with methods that act on the comment, and exposes it as [`record`](/docs/reference/python-sdk/roboto/domain/comments/comment#roboto.domain.comments.comment.Comment.record).

**Parameters**

- **data** (`Any`)

**Attributes**

- **CommentRecord.comment_id** (`str`): Unique ID of the comment, beginning with `cm_`.

- **CommentRecord.comment_text** (`str`): Text of the comment, in which each mention of a user is written `@[<display_name>](<user_id>)`.

- **CommentRecord.created** (`datetime.datetime`): Time the comment was created.

- **CommentRecord.created_by** (`str`): ID of the user who wrote the comment.

- **CommentRecord.entity_id** (`str`): ID of the resource the comment is on.

  For example, a dataset's `ds_` ID when `entity_type` is `CommentEntityType.Dataset`.

- **CommentRecord.entity_type** (`CommentEntityType`): Kind of resource the comment is on.

- **CommentRecord.mentions** (`list[str]`) = `None`: IDs of the users `comment_text` mentions, in the order they appear.

  Roboto reads them from the `@[<display_name>](<user_id>)` mentions in the text when the comment is created or edited.

- **CommentRecord.modified** (`datetime.datetime`): Time the comment was last modified.

- **CommentRecord.modified_by** (`str`): ID of the user who wrote the comment.

  Roboto sets it to `created_by` and does not change it when the comment is edited.

- **CommentRecord.org_id** (`str`): ID of the organization that owns the comment.
