pres.weekly_schedule_details
Schema: pres
English table: pres.weekly_schedule_details
Italian original table: pres.tabsett
Description: Detailed daily breakdown of weekly or multi-weekly shift rotation schemas.
Overview
- Columns: 9
- Primary key: id
- Outgoing foreign keys: 3
- Incoming foreign keys: 0
- Indexes: 3
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Technical surrogate primary key. | |
wsd_detail_id | set_id | integer | NO | Unique identifier for the schedule detail within the tenant. | |
tenant_id | tenant_id | integer | NO | Tenant identifier for data isolation. | |
wsd_schema_code | cod_por | character(4) | NO | ''::bpchar | Reference to the parent weekly shift schema (wss_code). |
wsd_week_number | set_settimana | numeric(2,0) | NO | 0 | Week index for multi-week rotations (e.g., 1, 2 for bi-weekly cycles). |
wsd_day_of_week | set_giorno | numeric(1,0) | NO | 0 | Day of the week (typically 1=Monday, 7=Sunday). |
wsd_shift_code | set_cod_orario | character(4) | NO | ''::bpchar | The specific daily shift (orari) assigned to this day. |
wsd_sort_order | set_order | integer | NO | 0 | Ordering index for display purposes. |
wsd_is_absence_day | set_assenza | boolean | NO | false | If true, indicates a day where no work is expected (rest day). |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_wsd_parent_schema | tenant_id, wsd_schema_code | pres.profora | tenant_id, cod_por | CASCADE | CASCADE |
fk_wsd_shift_definition | tenant_id, wsd_shift_code | pres.shift_definitions | tenant_id, shd_code | CASCADE | RESTRICT |
fk_wsd_tenant | tenant_id | cloud.tenants | ten_internal_id | CASCADE | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_weekly_schedule_details→id - Unique:
c_uk_wsd_tenant_detail_id→tenant_id, wsd_detail_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_wsd_tenant_detail_id | NO | btree | tenant_id, wsd_detail_id |
idx_wsd_tenant_schema_code | NO | btree | tenant_id, wsd_schema_code |
idx_wsd_tenant_shift_code | NO | btree | tenant_id, wsd_shift_code |
Navigation
- Back to main index
- [Back to
presindex]../)