# Hierarchy

Following is a description of entities and their hierarchy within Digitoo.

### Organization

Organization is created when there is a new finished registration. it is the top entity where user is able to create workspaces and invite new users. Organization can have multiple workspaces.

### Workspace

Workspace is connected to specific ERP (Pohoda, Xero, etc.). Each workspace has 1 organization.

### Queue

Queue refers to document type which can be uploaded eg. received-invoices. There are 3 types of queues:

| Type               | System enum        | Description                                        |
| ------------------ | ------------------ | -------------------------------------------------- |
| Received invoices  | `received-invoice` | Queue for any received invoices, credit notes etc. |
| Issued invoices    | `issued-invoice`   | Queue for any issued invoices                      |
| Receipts           | `receipt`          | Queue for receipts                                 |
| Orders & Contracts | `contract-order`   | Queue for contract and orders                      |
| Other              | `other`            | Queue for other documents                          |
