Schema: hr
English table: hr.work_report_details
Italian original table: hr.in_rapportino_det
Description: Detail lines for work reports, linking them to specific accounting entries or service items.
Overview
- Columns: 9
- Primary key: id
- Outgoing foreign keys: 2
- Incoming foreign keys: 0
- Indexes: 5
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Internal surrogate primary key. |
wrd_id | irendrapd_id | integer | NO | | Unique detail identifier within a tenant. |
wrd_work_report_id | irendrapd_irendrap_id | integer | NO | | Reference to the parent work report. |
wrd_accounting_entry_id | irendrapd_rendcont_id | integer | NO | | Reference to the specific accounting or reporting entry. |
wrd_service_detail_id | irendrapd_nsd_id | integer | NO | | Reference to the service or expense detail line. |
irendrapd_rendcont_id_colleghi | tenant_id | integer | NO | | Numeric value. |
tenant_id | colcustom | integer | YES | | Tenant identifier for data isolation. |
colcustom | _deleted | jsonb | YES | '{}'::jsonb | JSON field for custom data. |
_deleted | `` | boolean | YES | false | Technical soft delete flag. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_work_report_details_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
fk_work_report_details_work_report | wrd_work_report_id, tenant_id | hr.work_reports | wr_id, tenant_id | RESTRICT | RESTRICT |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_work_report_details → id
- Unique:
uk_work_report_details_id → wrd_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_wrd_accounting_entry_tenant | NO | btree | tenant_id, wrd_accounting_entry_id) WHERE (_deleted = false |
idx_wrd_id_tenant | NO | btree | tenant_id, wrd_id) WHERE (_deleted = false |
idx_wrd_service_detail_tenant | NO | btree | tenant_id, wrd_service_detail_id) WHERE (_deleted = false |
idx_wrd_tenant | NO | btree | tenant_id |
idx_wrd_work_report_tenant | NO | btree | tenant_id, wrd_work_report_id) WHERE (_deleted = false |
Navigation