hr.collective_agreements
Schema: hr
English table: hr.collective_agreements
Italian original table: hr.contratti
Description: Master table for National Collective Labor Agreements (CCNL) and their general regulatory parameters.
Overview
- Columns: 14
- Primary key: id
- Outgoing foreign keys: 1
- Incoming foreign keys: 3
- Indexes: 3
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Internal surrogate primary key. | |
ca_code | con_id | integer | NO | Business identifier of the contract definition, unique per tenant. | |
ca_name | con_denominazione | character varying(40) | NO | Contract definition name/label. | |
ca_valid_from | con_valid_dal | date | NO | Start date of validity for the contract definition. | |
ca_valid_to | con_valid_al | date | NO | End date of validity for the contract definition. | |
ca_sync_code | con_code_syncro | character varying(10) | NO | External synchronization code for integrations. | |
ca_monthly_payments_count | con_number_monthly | numeric(2,0) | NO | Number of monthly payments (monthly installments) associated with this contract definition. | |
ca_extension_count | con_num_proroga | numeric(2,0) | NO | Number of extensions (proroghe) configured/allowed for this contract definition. | |
ca_max_extension_months | con_max_month_proroga | numeric(2,0) | NO | Maximum months allowed for extensions (proroghe) for this contract definition. | |
ca_full_time_hours | con_ore_full_time | numeric(2,0) | NO | Reference full-time working hours for this contract definition. | |
tenant_id | tenant_id | integer | YES | Tenant identifier for multi-tenant partitioning. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | Custom fields in JSON format. |
_deleted | _deleted | boolean | YES | false | Soft-delete flag. True means the record is logically deleted. |
ca_period | con_periodo | daterange | YES | GENERATED: daterange(ca_valid_from, ca_valid_to, '[]'::text) | Validity period as a daterange generated from valid_from and valid_to (inclusive). |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_ca_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
| From table | Foreign key | Source columns | Target columns |
|---|---|---|---|
hr.agreement_qualifications | fk_aq_collective_agreement | aq_agreement_code, tenant_id | ca_code, tenant_id |
hr.employment_agreement_assignments | fk_eaa_collective_agreement | eaa_agreement_code, tenant_id | ca_code, tenant_id |
hr.medical_exam_type_parameters | fk_metp_contract_id | metp_contract_id, tenant_id | ca_code, tenant_id |
Constraints
- Primary key:
pk_ca→id - Unique:
uk_ca_code_tenant→ca_code, tenant_id - Unique:
uk_ca_tenant_code_alt→tenant_id, ca_code
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_ca_code_tenant | NO | btree | tenant_id, ca_code) WHERE (_deleted = false |
idx_ca_period_gist | NO | gist | tenant_id, ca_period) WHERE (_deleted = false |
idx_ca_tenant_old_ref | NO | btree | tenant_id |
Navigation
- Back to main index
- [Back to
hrindex]../)