Schema: hr
English table: hr.company_entity_links
Italian original table: hr.azienda_enti_link
Description: Links a company to related external entities (e.g., institutions or counterparties).
Overview
- Columns: 8
- Primary key: id
- Outgoing foreign keys: 1
- Incoming foreign keys: 0
- Indexes: 4
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Surrogate primary key. |
cel_id | aze_id | integer | NO | | Company-entity link internal identifier, unique per tenant. |
cel_company_id | aze_az_id | integer | NO | | Reference to the company. |
cel_entity_id | aze_sog_id | integer | NO | | Reference to the related external entity. |
cel_description | aze_description | character varying(50) | NO | | Short description of the company-entity relationship. |
tenant_id | tenant_id | integer | YES | | Tenant identifier. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | Custom fields in JSON format. |
_deleted | _deleted | boolean | YES | false | Soft delete flag. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_cmpentlk_tenant_id | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_company_entity_links → id
- Unique:
uk_cmpentlk_cel_id_tenant → cel_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_cmpentlk_tenant | NO | btree | tenant_id |
idx_cmpentlk_tenant_cel | NO | btree | tenant_id, cel_id) WHERE (_deleted = false |
idx_cmpentlk_tenant_company | NO | btree | tenant_id, cel_company_id) WHERE (_deleted = false |
idx_cmpentlk_tenant_entity | NO | btree | tenant_id, cel_entity_id) WHERE (_deleted = false |
Navigation