hr.customer_fixed_activities
Schema: hr
English table: hr.customer_fixed_activities
Italian original table: hr.in_clienti_attivita_fissi
Description: Defines recurring/fixed activity schedules for customers (e.g., standard weekly assignments).
Overview
- Columns: 11
- Primary key: id
- Outgoing foreign keys: 3
- Incoming foreign keys: 0
- Indexes: 5
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Internal surrogate primary key. | |
cfa_id | incliaf_id | integer | NO | Unique identifier from the source scheduling system. | |
activity_plan_id | incliaf_inclia_id | integer | NO | Reference to the general customer activity plan. | |
employment_relationship_id | incliaf_rap_id | integer | NO | Reference to the employee assigned to this recurring slot. | |
start_time | incliaf_dalle | integer | NO | Recurring start time for the activity. | |
end_time | incliaf_alle | integer | NO | Recurring end time for the activity. | |
day_number | incliaf_n_giorno | numeric(1,0) | NO | Day of the week or sequence number for the recurrence. | |
hours_count | incliaf_ore | integer | NO | Total hours for this recurring slot. | |
tenant_id | tenant_id | integer | YES | Multi-tenancy identifier. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON field for custom metadata. |
_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_fixed_activities_activity_plan | activity_plan_id, tenant_id | hr.customer_activity_schedules | cas_id, tenant_id | RESTRICT | RESTRICT |
fk_customer_fixed_activities_employment | employment_relationship_id, tenant_id | hr.employment_relationships | er_id, tenant_id | RESTRICT | CASCADE |
fk_customer_fixed_activities_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_customer_fixed_activities→id - Unique:
uk_customer_fixed_activities_cfa_id→cfa_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_cfa_employment_tenant | NO | btree | tenant_id, employment_relationship_id) WHERE (_deleted = false |
idx_cfa_external_id_tenant | NO | btree | tenant_id, cfa_id) WHERE (_deleted = false |
idx_cfa_full_lookup_tenant | NO | btree | tenant_id, activity_plan_id, employment_relationship_id, day_number) WHERE (_deleted = false |
idx_cfa_plan_tenant | NO | btree | tenant_id, activity_plan_id) WHERE (_deleted = false |
idx_cfa_tenant_base | NO | btree | tenant_id |
Navigation
- Back to main index
- [Back to
hrindex]../)