Schema: hr
English table: hr.occupational_diseases
Italian original table: hr.malattie_professionali
Description: Registry of officially recognized occupational diseases and work-related illnesses.
Overview
- Columns: 7
- Primary key: id
- Outgoing foreign keys: 1
- Incoming foreign keys: 0
- Indexes: 2
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Internal unique identifier (surrogate key). |
disease_code_id | malprof_id | integer | NO | | Functional disease identifier, unique within the tenant. |
title | malprof_title | character varying(50) | NO | | Name or title of the occupational disease. |
notes | malprof_note | text | NO | | Detailed notes or clinical descriptions of the disease. |
tenant_id | tenant_id | integer | YES | | Tenant identifier for data isolation. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | Custom metadata fields in JSON format. |
_deleted | _deleted | boolean | YES | false | Technical flag for soft delete. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_occupational_diseases_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_occupational_diseases → id
- Unique:
uk_occupational_diseases_code_tenant → disease_code_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_occupational_diseases_tenant | NO | btree | tenant_id |
idx_od_code_tenant | NO | btree | tenant_id, disease_code_id) WHERE (_deleted = false |
Navigation