> ## Documentation Index
> Fetch the complete documentation index at: https://superofficeas-bugfix-ty-screen-designer-paradox.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# external_document table

> This table stores documents which can be viewed externaly, through the customer module

## external\_document Table (401)

This table stores documents which can be viewed externaly, through the customer module

## Fields

| Name           | Description                                                                  | Type                              | Nullable |
| -------------- | ---------------------------------------------------------------------------- | --------------------------------- | :------: |
| id             | Primary key                                                                  | PK                                |    No    |
| hierarchy\_id  | This document belongs to the following folder                                | FK [hierarchy](./hierarchy.mdx)   |    No    |
| attachment\_id | The attachment.id for the attachment associated with this external document. | FK [attachment](./attachment.mdx) |    No    |
| title          | The title for the document                                                   | String(255)                       |    No    |
| description    | The description of the external document                                     | Clob                              |    Yes   |
| 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   |
| deleted        | A boolean telling if the external document is to be treated as deleted       | Bool                              |    No    |
| s\_message     | Relation to s\_message if this document is an image in a newsletter          | FK [s\_message](./s-message.mdx)  |    Yes   |

<img src="https://mintcdn.com/superofficeas-bugfix-ty-screen-designer-paradox/bBv7ep-d5A4oaYwj/media/loc/en/database/tables/external_document.png?fit=max&auto=format&n=bBv7ep-d5A4oaYwj&q=85&s=52e233c82a23efb41e91b938920c51ed" alt="external_document table relationship diagram" width="848" height="794" data-path="media/loc/en/database/tables/external_document.png" />

## Indexes

| Fields         | Types       | Description |
| -------------- | ----------- | ----------- |
| hierarchy\_id  | FK          | Index       |
| attachment\_id | FK          | Index       |
| title          | String(255) | Index       |
| created\_by    | FK          | Index       |
| changed\_by    | FK          | Index       |
| s\_message     | 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. |
| [ejuser](./ejuser)         | This table contains entries for the users of the system.                                                                                                      |
| [hierarchy](./hierarchy)   | This table contains folders used to group the extra tables in the system.                                                                                     |
| [s\_message](./s-message)  | A message used in a shipment. Can be html and/or plain text                                                                                                   |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.
