# Comment model

A comment on an image or a folder, or a reply to one (`parentId`), with its like count.

## Fields

| Field | Type | Present | Notes |
|---|---|---|---|
| `id` | `integer` |  |  |
| `userId` | `integer` |  |  |
| `createdAt` | `date-time` |  |  |
| `updatedAt` | `date-time` |  |  |
| `referenceType` | `enum` |  | One of `User`, `Image`, `File`, `Paste`, `Short`, `Bio`, `Folder`, `Comment`. |
| `referenceId` | `integer` |  |  |
| `content` | `string` |  |  |
| `parentId` | `integer \| null` |  |  |
| `offlineAt` | `date-time \| null` |  |  |
| `likeCount` | `number` |  |  |

## Returned by

The endpoints whose `data` holds a Comment as it is, and where.

- [`POST /comments`](https://hematite.gg/docs/developers/reference/comments#post-comments), in `data`
- [`GET /comments/:commentId`](https://hematite.gg/docs/developers/reference/comments#get-comments-commentid), in `data`
- [`PATCH /comments/:commentId`](https://hematite.gg/docs/developers/reference/comments#patch-comments-commentid), in `data`
- [`GET /folders/:folderId/comments`](https://hematite.gg/docs/developers/reference/folders#get-folders-folderid-comments), in `data[]`
- [`GET /images/:imageId/comments`](https://hematite.gg/docs/developers/reference/images#get-images-imageid-comments), in `data[]`
- [`GET /users/:userId/comments`](https://hematite.gg/docs/developers/reference/users#get-users-userid-comments), in `data[]`

## Example

```json
{
  "id": 1,
  "userId": 1,
  "createdAt": "2026-11-10T18:24:00.000Z",
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "referenceType": "Image",
  "referenceId": 1,
  "content": "That last round",
  "parentId": null,
  "offlineAt": "2026-11-10T18:24:00.000Z",
  "likeCount": 0
}
```
