pres.weekly_shift_schemas
Schema: pres
English table: pres.weekly_shift_schemas
Italian original table: pres.profora
Description: Weekly shift schemas defining cyclic work schedules.
Overview
- Columns: 18
- Primary key: id
- Outgoing foreign keys: 1
- Incoming foreign keys: 3
- Indexes: 1
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Surrogate primary key. | |
wss_id | por_id | integer | NO | Logical identifier of the weekly shift schema (unique per tenant). | |
tenant_id | tenant_id | integer | NO | Tenant identifier for data isolation. | |
wss_code | cod_por | character(4) | NO | ''::bpchar | Schema code. |
wss_description | por_descrizione | character varying(40) | NO | ''::character varying | Schema description. |
wss_weeks | por_settimane | numeric(4,2) | NO | 0 | Number of weeks in the cycle. |
wss_start_week | por_sett_partenza | numeric(2,0) | NO | 0 | Starting week of the cycle. |
wss_start_date | por_data_partenza | date | NO | Start date of the schema. | |
wss_include_holidays | por_festiv_infra | boolean | NO | false | Indicates whether holidays are included. |
wss_respect_calendar | por_rispetta_calen | boolean | NO | false | Indicates whether the calendar must be respected. |
wss_time_type | por_tipo_tempo | numeric(1,0) | NO | 0 | Type of time calculation. |
wss_days_count | por_n_giorni | numeric(1,0) | NO | 0 | Number of working days. |
wss_close_weeks | por_chiudi_settimane | boolean | NO | false | Indicates whether weeks are closed. |
wss_week_expression | por_expr_settimana | text | NO | ''::text | Expression defining weekly pattern. |
wss_start_set | por_set_partenza | numeric(2,0) | YES | 1 | Starting set index. |
wss_variable_rest_days | por_riposi_variabili | boolean | YES | false | Indicates variable rest days. |
wss_rest_code | por_codice_riposo | character varying(4) | YES | ''::character varying | Code for rest days. |
_deleted | _deleted | boolean | NO | false | Flag indicating whether the record is soft-deleted. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_profora_tenant_id_to_tenant | tenant_id | cloud.tenants | ten_internal_id | CASCADE | CASCADE |
Referenced by
| From table | Foreign key | Source columns | Target columns |
|---|---|---|---|
pres.employee_shift_assignments | fk_esa_shift_schema | tenant_id, esa_shift_schema_code | tenant_id, wss_code |
pres.weekly_schedule_details | fk_wsd_parent_schema | tenant_id, wsd_schema_code | tenant_id, wss_code |
pres.weekly_shift_schema_profiles | fk_wssp_weekly_shift_schemas | tenant_id, wssp_schema_code | tenant_id, wss_code |
Constraints
- Primary key:
weekly_shift_schemas_pkey→id - Unique:
profora_cod_por_key→tenant_id, wss_code - Unique:
profora_por_id_key→tenant_id, wss_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_weekly_shift_schemas_wss_id | NO | btree | tenant_id, wss_id) WHERE (_deleted = false |
Navigation
- Back to main index
- [Back to
presindex]../)