documents
Document records with versioning support.
| Name | Type | Nullable | Default Value | Notes |
|---|---|---|---|---|
PKID | integer | Document ID | ||
fork forks.ID | integer | Fork ID (`null` for base module) | ||
owneruser users.ID | integer | Owner user ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`) | ||
ownergroup groups.ID | integer | Owner group ID (PUBLIC if `owneruser`=`null` and `ownergroup`=`null`) | ||
creator | integer | Creator user ID (defaults to authenticated user on creation) | ||
assigneduser users.ID | integer | Assigned user ID | ||
creationdate | bigint | EXTRACT(epoch FROM now()) | Creation date and time as a Unix timestamp (defaults to current date and time on creation) | |
lastmodified | bigint | EXTRACT(epoch FROM now()) | Last modification date and time as a Unix timestamp (auto-reset on modification) | |
binfile binfiles.ID | integer | Binary file ID; is read-only (not for `PUT` or `PATCH`) | ||
visibility | smallint | 0 | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) | |
name | text | Name | ||
documentnum | text | '' | Document number | |
status | smallint | 0 | Status (`0`=DRAFT, `1`=FEEDBACKREQUIRED, `2`=INREVISION, `3`=AWAITINGAPPROVAL, `4`=FINAL, `5`=OBSOLETE) | |
filename | text | '' | Filename | |
mimetype | text | 'application/octet-stream' | MIME type (RFC 2045) | |
public | smallint | 0 | Publicly accessible | |
description | text | '' | Detailed general description |
| Name | Unique | Nulls Distinct | Primary | Partial | Method | Keys |
|---|---|---|---|---|---|---|
| fk_documents_assigneduser | gin | assigneduser | ||||
| fk_documents_binfile | btree | binfile | ||||
| fk_documents_fork | gin | fork | ||||
| fk_documents_ownergroup | gin | ownergroup | ||||
| fk_documents_owneruser | gin | owneruser | ||||
| i_documents_nofork | gin | fork | ||||
| i_documents_noowner | gin | ownergroup | ||||
| pk_documents | btree | ID | ||||
| s_documents_documentnum | gin | documentnum | ||||
| s_documents_filename | gin | filename | ||||
| s_documents_name | gin | name |
| Name | Type |
|---|---|
| c_documents_owner | check |
| dc_documents_description | check |
| dc_documents_documentnum | check |
| dc_documents_filename | check |
| dc_documents_name | check |
| dc_documents_status | check |
| dc_documents_visibility | check |
| dc_files_mimetype | check |
| fk_documents_assigneduser | foreign_key |
| fk_documents_binfile | foreign_key |
| fk_documents_fork | foreign_key |
| fk_documents_ownergroup | foreign_key |
| fk_documents_owneruser | foreign_key |
| pk_documents | primary_key |
Loading...