Schema: hr
English table: hr.attachment_types
Italian original table: hr.tipi_allegati
Description: Definitions of document categories for attachments (e.g., ID, Contract, Medical Certificate).
Overview
- Columns: 7
- Primary key: id
- Outgoing foreign keys: 2
- Incoming foreign keys: 1
- Indexes: 3
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Surrogate primary key. |
atty_id | tipall_id | integer | NO | | Identifier of the related atty record. |
atty_description | tipall_descrizione | character varying(50) | NO | | Description text. |
atty_group_id | tipall_grall_id | integer | NO | | Identifier of the related atty group record. |
tenant_id | tenant_id | integer | YES | | Tenant identifier for data isolation. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON payload containing additional attributes. |
_deleted | _deleted | boolean | YES | false | Flag indicating whether the record is soft-deleted. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_tenant_id | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
fk_tipall_grall_id | atty_group_id, tenant_id | hr.x_attachment_groups | xag_id, tenant_id | RESTRICT | RESTRICT |
Referenced by
| From table | Foreign key | Source columns | Target columns |
|---|
hr._document_templates | fk__document_templates_attachment_type | dct_attachment_type_id, tenant_id | atty_id, tenant_id |
Constraints
- Primary key:
pk_attachment_types → id
- Unique:
uk_atty_id_tenant → atty_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_atty_group_tenant | NO | btree | tenant_id, atty_group_id) WHERE (_deleted = false |
idx_atty_id_tenant | NO | btree | tenant_id, atty_id) WHERE (_deleted = false |
idx_atty_tenant | NO | btree | tenant_id |
Navigation