# Annotations

<a id="database.annotations"></a>

## annotations

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Holds annotations (e.g. markings, stamps, notes) on individual pages of documents. One row per annotation with image and XML data.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `annotation_id` | `int` | — | Annotation ID (primary key). |
| `object_id` | `int` | — | ID of the affected document. References `objectX.id`. |
| `page` | `int` | — | Page number in the document. |
| `user_id` | `int` | — | ID of the creator. References [benutzer.id](users_and_groups.md#database.benutzer). |
| `flag` | `int` | — | Status flags (bitmask). |
| `zeitstempel` | `int` | — | Timestamp of the last change (UNIX time). |
| `timeout` | `int` | — | Expiry / timeout timestamp. |
| `annotation` | `image` | — | Annotation as image data (BLOB). |
| `pdfresolution` | `int` | — | PDF resolution in DPI (for vector-based / PDF annotations). |
| `annotationxml` | `image` | — | Annotation as XML representation (BLOB). |

### Related tables

* [ann_groups](annotations.md#database.ann_groups) — assignment to user groups.

### Usage by Server-API jobs

* [cnv.CreateSlide](../cnv.md#cnv.CreateSlide) — creates slide annotations.
* [cnv.AddAnnotations](../cnv.md#cnv.AddAnnotations) — burns annotations into image files.

<a id="database.ann_groups"></a>

## ann_groups

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Mapping table assigning one or more user groups to an annotation. Controls which groups may see/edit the respective annotation.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `gruppen_id` | `int` | — | ID of the user group. References [gruppen.id](users_and_groups.md#database.gruppen). |
| `annotation_id` | `int` | — | ID of the annotation. References [annotations.annotation_id](annotations.md#database.annotations). |

### Related tables

* [annotations](annotations.md#database.annotations) — the annotation objects themselves.
* [gruppen](users_and_groups.md#database.gruppen) — the assigned user groups.
