hr.person_availability_slots
Schema: hr
English table: hr.person_availability_slots
Italian original table: hr.ana_fasce_disponibilita
Description: Defines recurring availability time slots for persons (employees), including daily time windows, weekdays, and date ranges.
Overview
- Columns: 22
- Primary key: id
- Outgoing foreign keys: 1
- Incoming foreign keys: 0
- Indexes: 19
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Primary key identifier for the availability slot record. | |
person_availability_slot_id | anaf_id | integer | NO | Internal reference ID for the availability slot. | |
person_availability_person_id | anaf_ana_id | integer | NO | Foreign key referencing the person (employee) whose availability is defined. | |
person_availability_from_time1 | anaf_dalle1 | integer | NO | First daily availability start time (minutes from midnight). | |
person_availability_to_time1 | anaf_alle1 | integer | NO | First daily availability end time (minutes from midnight). | |
person_availability_from_time2 | anaf_dalle2 | integer | NO | Second daily availability start time (minutes from midnight). | |
person_availability_to_time2 | anaf_alle2 | integer | NO | Second daily availability end time (minutes from midnight). | |
person_availability_is_monday | anaf_lun | boolean | NO | Availability applies to Mondays. | |
person_availability_is_tuesday | anaf_mar | boolean | NO | Availability applies to Tuesdays. | |
person_availability_is_wednesday | anaf_mer | boolean | NO | Availability applies to Wednesdays. | |
person_availability_is_thursday | anaf_gio | boolean | NO | Availability applies to Thursdays. | |
person_availability_is_friday | anaf_ven | boolean | NO | Availability applies to Fridays. | |
person_availability_is_saturday | anaf_sab | boolean | NO | Availability applies to Saturdays. | |
person_availability_is_sunday | anaf_dom | boolean | NO | Availability applies to Sundays. | |
person_availability_is_holiday | anaf_fest | boolean | NO | Availability applies to holidays. | |
person_availability_from_date | anaf_dal | date | NO | Start date of the availability period. | |
person_availability_to_date | anaf_al | date | NO | End date of the availability period. | |
person_availability_is_unavailable | anaf_non_disponibile | boolean | NO | Flag indicating the person is unavailable during this slot (negative availability). | |
tenant_id | tenant_id | integer | YES | Multi‑tenant isolation column. References cloud._tenant. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSONB field for custom, tenant‑specific extensions. |
_deleted | _deleted | boolean | YES | false | Soft‑delete flag. When true, the record is considered logically deleted. |
person_availability_period | anaf_periodo | daterange | YES | GENERATED: daterange(person_availability_from_date, person_availability_to_date, '[]'::text) | Generated daterange column combining from_date and to_date for efficient range queries. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_person_availability_slots_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_person_availability_slots→id - Unique:
uk_person_availability_slots_slot_tenant→person_availability_slot_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_pas_tenant | NO | btree | tenant_id |
idx_pas_tenant_friday | NO | btree | tenant_id, person_availability_is_friday) WHERE (_deleted = false |
idx_pas_tenant_from_time1 | NO | btree | tenant_id, person_availability_from_time1) WHERE (_deleted = false |
idx_pas_tenant_from_time2 | NO | btree | tenant_id, person_availability_from_time2) WHERE (_deleted = false |
idx_pas_tenant_holiday | NO | btree | tenant_id, person_availability_is_holiday) WHERE (_deleted = false |
idx_pas_tenant_monday | NO | btree | tenant_id, person_availability_is_monday) WHERE (_deleted = false |
idx_pas_tenant_period_gist | NO | gist | tenant_id, person_availability_period) WHERE (_deleted = false |
idx_pas_tenant_person | NO | btree | tenant_id, person_availability_person_id) WHERE (_deleted = false |
idx_pas_tenant_person_period_gist | NO | gist | tenant_id, person_availability_person_id, person_availability_period) WHERE (_deleted = false |
idx_pas_tenant_saturday | NO | btree | tenant_id, person_availability_is_saturday) WHERE (_deleted = false |
idx_pas_tenant_slot | NO | btree | tenant_id, person_availability_slot_id) WHERE (_deleted = false |
idx_pas_tenant_sunday | NO | btree | tenant_id, person_availability_is_sunday) WHERE (_deleted = false |
idx_pas_tenant_thursday | NO | btree | tenant_id, person_availability_is_thursday) WHERE (_deleted = false |
idx_pas_tenant_time_range1 | NO | btree | tenant_id, person_availability_from_time1, person_availability_to_time1) WHERE (_deleted = false |
idx_pas_tenant_time_range2 | NO | btree | tenant_id, person_availability_from_time2, person_availability_to_time2) WHERE (_deleted = false |
idx_pas_tenant_to_time1 | NO | btree | tenant_id, person_availability_to_time1) WHERE (_deleted = false |
idx_pas_tenant_to_time2 | NO | btree | tenant_id, person_availability_to_time2) WHERE (_deleted = false |
idx_pas_tenant_tuesday | NO | btree | tenant_id, person_availability_is_tuesday) WHERE (_deleted = false |
idx_pas_tenant_wednesday | NO | btree | tenant_id, person_availability_is_wednesday) WHERE (_deleted = false |
Navigation
- Back to main index
- [Back to
hrindex]../)