hr.work_site_time_terminals
Schema: hr
English table: hr.work_site_time_terminals
Italian original table: hr.sedi_terminali_link
Description: Relational link between operational work sites and time-tracking hardware terminals.
Overview
- Columns: 7
- Primary key: id
- Outgoing foreign keys: 2
- Incoming foreign keys: 0
- Indexes: 4
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Surrogate primary key. |
wstt_id | sedet_id | integer | NO | | Identifier of the related wstt record. |
wstt_work_site_id | sedet_sede_id | integer | NO | | Reference to the work site where the terminal is physically located. |
wstt_terminal_id | sedet_term_id | integer | NO | | Reference to the terminal hardware entity. |
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_sedet_sede_id | wstt_work_site_id, tenant_id | hr.work_sites | sede_id, tenant_id | RESTRICT | RESTRICT |
fk_tenant_id | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_work_site_time_terminals → id
- Unique:
uk_wstt_id_tenant → wstt_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_wstt_id_tenant | NO | btree | tenant_id, wstt_id) WHERE (_deleted = false |
idx_wstt_tenant | NO | btree | tenant_id |
idx_wstt_terminal_tenant | NO | btree | tenant_id, wstt_terminal_id) WHERE (_deleted = false |
idx_wstt_work_site_tenant | NO | btree | tenant_id, wstt_work_site_id) WHERE (_deleted = false |
Navigation