hr.customer_project_links
Schema: hr
English table: hr.customer_project_links
Italian original table: hr.in_commesse_link
Description: Detailed links or sub-entities associated with customer projects.
Overview
- Columns: 10
- Primary key: id
- Outgoing foreign keys: 2
- Incoming foreign keys: 2
- Indexes: 4
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Technical primary key (surrogate). | |
cpl_id | coml_id | integer | NO | Functional identifier for the project link. | |
cpl_cpr_id | coml_com_id | integer | NO | Reference to the parent customer project (cpr_id). | |
cpl_code | coml_code | character varying(50) | NO | Unique alphanumeric code for the link. | |
cpl_description | coml_description | character varying(250) | NO | Full description of the project link. | |
cpl_is_enabled | coml_enabled | boolean | NO | Flag indicating if this link is active. | |
cpl_short_description | coml_short_descr | character varying(100) | NO | Short description of the project link. | |
tenant_id | tenant_id | integer | YES | Tenant identifier for data isolation. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON structure for custom fields. |
_deleted | _deleted | boolean | YES | false | Technical soft delete flag. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_customer_project_links_cpr_id | cpl_cpr_id, tenant_id | hr.customer_projects | cpr_id, tenant_id | RESTRICT | RESTRICT |
fk_customer_project_links_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
| From table | Foreign key | Source columns | Target columns |
|---|---|---|---|
hr.business_trips | fk_intra_coml_id | btr_cpl_id, tenant_id | cpl_id, tenant_id |
hr.customer_project_activities | fk_customer_project_activities_cpl_id | cpa_cpl_id, tenant_id | cpl_id, tenant_id |
Constraints
- Primary key:
pk_customer_project_links→id - Unique:
uk_customer_project_links_cpl_id→cpl_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_cpl_cpr_id_enabled_tenant | NO | btree | tenant_id, cpl_cpr_id) WHERE ((_deleted = false) AND (cpl_is_enabled = true) |
idx_cpl_cpr_id_tenant | NO | btree | tenant_id, cpl_cpr_id) WHERE (_deleted = false |
idx_cpl_id_tenant | NO | btree | tenant_id, cpl_id) WHERE (_deleted = false |
idx_cpl_tenant | NO | btree | tenant_id |
Navigation
- Back to main index
- [Back to
hrindex]../)