hr.customer_profora_assignments
Schema: hr
English table: hr.customer_profora_assignments
Italian original table: hr.in_clienti_profora
Description: Links customers to hour profiles (profora) for specific time periods.
Overview
- Columns: 10
- Primary key: id
- Outgoing foreign keys: 2
- Incoming foreign keys: 0
- Indexes: 6
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Internal surrogate primary key. | |
cha_id | inclipo_id | integer | NO | Unique identifier for the assignment within a tenant. | |
cha_customer_id | inclipo_incli_id | integer | NO | Reference to the customer. | |
cha_hour_profile_id | inclipo_por_id | integer | NO | Reference to the hour profile (profora) configuration. | |
cha_valid_from | inclipo_dal | date | NO | Start date of the assignment. | |
cha_valid_to | inclipo_al | date | NO | End date of the assignment. | |
tenant_id | tenant_id | integer | YES | Tenant identifier for data isolation. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON field for custom data. |
_deleted | _deleted | boolean | YES | false | Technical soft delete flag. |
cha_validity_period | inclipo_periodo | daterange | YES | GENERATED: daterange(cha_valid_from, cha_valid_to, '[]'::text) | Generated daterange for the hour profile validity. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_customer_profora_assignments_customer | cha_customer_id, tenant_id | hr.customers | cust_id, tenant_id | RESTRICT | RESTRICT |
fk_customer_profora_assignments_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_customer_profora_assignments→id - Unique:
uk_customer_profora_assignments_id→cha_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_cha_profora_customer_tenant | NO | btree | tenant_id, cha_customer_id) WHERE (_deleted = false |
idx_cha_profora_id_tenant | NO | btree | tenant_id, cha_id) WHERE (_deleted = false |
idx_cha_profora_profile_tenant | NO | btree | tenant_id, cha_hour_profile_id) WHERE (_deleted = false |
idx_cha_profora_tenant | NO | btree | tenant_id |
idx_cha_profora_tenant_customer_period_gist | NO | gist | tenant_id, cha_customer_id, cha_validity_period) WHERE (_deleted = false |
idx_cha_profora_tenant_period_gist | NO | gist | tenant_id, cha_validity_period) WHERE (_deleted = false |
Navigation
- Back to main index
- [Back to
hrindex]../)