> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# doc_document table

> This table contains documents.

## doc\_document Table (280)

This table contains documents.

## Fields

| Name           | Description                                                         | Type                               | Nullable |
| -------------- | ------------------------------------------------------------------- | ---------------------------------- | :------: |
| id             | The primary key (auto-incremented)                                  | PK                                 |    No    |
| folder\_id     | The id of the document folder this entry is located in.             | FK [doc\_folder](./doc-folder.mdx) |    No    |
| attachment\_id | The attachment.id for the attachment associated with this document. | FK [attachment](./attachment.mdx)  |    No    |
| title          | The title for the document                                          | String(255)                        |    No    |
| created\_at    | When the document was created                                       | DateTime                           |    Yes   |
| created\_by    | Who created the document                                            | FK [ejuser](./ejuser.mdx)          |    No    |
| last\_changed  | When the document last was changed                                  | DateTime                           |    Yes   |
| changed\_by    | Who last changed the document                                       | FK [ejuser](./ejuser.mdx)          |    Yes   |
| status         | The status of the document                                          | status                             |    Yes   |
| access\_level  | The access level of the document                                    | access\_level                      |    Yes   |
| description    | A descriptive text for the document                                 | Clob                               |    Yes   |
| id\_string     | A field for an id\_string which may be used to access the document  | String(255)                        |    No    |

<img src="https://mintcdn.com/superofficeas/i6M2qZmvMNH7UTeu/media/loc/en/database/tables/doc_document.png?fit=max&auto=format&n=i6M2qZmvMNH7UTeu&q=85&s=98b4bbaa64788ac4e5b8b61da936f9ee" alt="doc_document table relationship diagram" width="657" height="651" data-path="media/loc/en/database/tables/doc_document.png" />

## Indexes

| Fields         | Types       | Description |
| -------------- | ----------- | ----------- |
| folder\_id     | FK          | Index       |
| attachment\_id | FK          | Index       |
| title          | String(255) | Index       |
| created\_by    | FK          | Index       |
| changed\_by    | FK          | Index       |

## Relationships

| Table                       | Description                                                                                                                                                   |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [attachment](./attachment)  | This table contains metadata for attachments. The actual attachments are stored directly on disk, with filenames based on the the primary key for this table. |
| [doc\_folder](./doc-folder) | A document folder.                                                                                                                                            |
| [ejuser](./ejuser)          | This table contains entries for the users of the system.                                                                                                      |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [doc_folder table](/en/database/tables/doc-folder.md)
- [Document table](/en/api/bulk-operations/bulk-update/reference/document-table.md)
- [document table](/en/database/tables/document.md)
- [external_document table](/en/database/tables/external-document.md)
- [SuggestedDocument table](/en/database/tables/suggesteddocument.md)
- [DocTmpl table](/en/database/tables/doctmpl.md)
