# Collaboration Entities {#collaboration-entities}


Entities for comments, mentions, reactions, favorites, entity subscriptions, resource links, and shared entities.


## Comment {#comment}


| Column         | Type     | Description              |
| -------------- | -------- | ------------------------ |
| `entity`       | string   | Target entity type       |
| `entityId`     | UUID     | Target entity ID         |
| `comment`      | string   | Comment text (HTML)      |
| `actorType`    | enum?    | `User` or `System`       |
| `resolved`     | boolean? | Resolved flag            |
| `resolvedAt`   | Date?    | Resolution timestamp     |
| `resolvedById` | UUID?    | FK to resolver           |
| `editedAt`     | Date?    | Last edit timestamp      |
| `parentId`     | UUID?    | FK to parent (threading) |
| `creatorId`    | UUID?    | FK to creator            |

**Relations:** `parent` (ManyToOne Comment), `replies` (OneToMany Comment), `members` (ManyToMany Employee)


## Mention {#mention}


| Column             | Type    | Description              |
| ------------------ | ------- | ------------------------ |
| `entityId`         | UUID    | Target entity ID         |
| `entity`           | string  | Entity type              |
| `mentionedUserId`  | UUID    | FK to mentioned user     |
| `mentionById`      | UUID?   | FK to user who mentioned |
| `parentEntityId`   | UUID?   | FK to parent entity      |
| `parentEntityType` | string? | Parent entity type       |


## Reaction {#reaction}


| Column      | Type   | Description     |
| ----------- | ------ | --------------- |
| `entity`    | string | Entity type     |
| `entityId`  | UUID   | Entity ID       |
| `emoji`     | string | Emoji character |
| `creatorId` | UUID   | FK to creator   |


## Favorite {#favorite}


| Column       | Type   | Description    |
| ------------ | ------ | -------------- |
| `entity`     | string | Entity type    |
| `entityId`   | UUID   | Entity ID      |
| `employeeId` | UUID   | FK to employee |


## EntitySubscription {#entitysubscription}


| Column       | Type   | Description       |
| ------------ | ------ | ----------------- |
| `entity`     | string | Entity type       |
| `entityId`   | UUID   | Entity ID         |
| `type`       | enum   | Subscription type |
| `employeeId` | UUID   | FK to subscriber  |


## ResourceLink {#resourcelink}


| Column      | Type   | Description        |
| ----------- | ------ | ------------------ |
| `entity`    | string | Parent entity type |
| `entityId`  | UUID   | Parent entity ID   |
| `title`     | string | Link title         |
| `url`       | string | Link URL           |
| `creatorId` | UUID?  | FK to creator      |


## SharedEntity {#sharedentity}


Entity sharing records for collaborative access.

| Column       | Type   | Description                |
| ------------ | ------ | -------------------------- |
| `entity`     | string | Shared entity type         |
| `entityId`   | UUID   | Shared entity ID           |
| `employeeId` | UUID   | FK to shared-with employee |


## Related Pages {#related-pages}


- [Comment & Mention Endpoints](https://sourcey-gauzy.pages.dev/api/comment-mention-endpoints/index.md) — API reference
- [Favorite Endpoints](https://sourcey-gauzy.pages.dev/api/favorite-endpoints/index.md) — favorites API
- [Entity Subscription Endpoints](https://sourcey-gauzy.pages.dev/api/entity-subscription-endpoints/index.md) — subscriptions API
