pres.overtime_and_premium_rules
Schema: pres
English table: pres.overtime_and_premium_rules
Italian original table: pres.tabstra
Description: Configuration for automatic overtime and shift premium calculations based on time bands and progressive thresholds.
Overview
- Columns: 23
- Primary key: id
- Outgoing foreign keys: 2
- Incoming foreign keys: 0
- Indexes: 0
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Internal surrogate primary key. | |
opr_rule_id | str_id | integer | NO | Unique internal identifier for the rule entry. | |
opr_code | cod_str | character(4) | NO | ''::bpchar | Unique mnemonic code for the rule set. |
tenant_id | tenant_id | integer | NO | Tenant identifier for multi-tenancy isolation. | |
opr_description | str_descrizione | character(40) | NO | ''::bpchar | Extended description of the overtime/premium rule. |
opr_group_id | str_regola | numeric(1,0) | NO | 0 | Identifier to group multiple lines into a single logical rule. |
opr_sequence_order | str_riga | numeric(2,0) | NO | 0 | Priority/Execution order of the rule line within the group. |
opr_calculation_type | str_tipo | character(1) | NO | ''::bpchar | Type of rule: S=Overtime (Straordinario), M=Premium (Maggiorazione), etc. |
opr_progressive_threshold_hours | str_prog_ore | numeric(5,2) | NO | 0 | Hours threshold after which this rule applies (progressive overtime). |
opr_start_time_hhmm | str_dalle_ore | numeric(4,0) | NO | 0 | Start of the time band for validity (expressed as HHMM). |
opr_end_time_hhmm | str_alle_ore | numeric(4,0) | NO | 0 | End of the time band for validity (expressed as HHMM). |
opr_target_reason_code | str_causale | character(4) | NO | ''::bpchar | The justification code (attendance_reasons) to be generated. |
opr_valid_days_mask | str_giorni | character(10) | NO | ''::bpchar | String mask representing valid days (e.g., 1234567 for Mon-Sun). |
opr_application_mode | str_modo | numeric(1,0) | NO | 0 | Calculation logic mode (e.g., daily total, band-based, etc.). |
opr_ignore_intervals | str_ignora_inter | numeric(1,0) | NO | 0 | Flag to ignore specific break intervals during calculation. |
opr_auth_overtime_reason_code | str_caus_aut_strao | character(4) | NO | ''::bpchar | Reason code to use if the overtime is formally authorized. |
opr_auth_surplus_reason_code | str_caus_aut_esubero | character(4) | NO | ''::bpchar | Reason code applied to unauthorized extra time (surplus). |
opr_valid_from_week | str_sett_dal | integer | NO | 0 | Starting week of validity for the rule (used in cyclical rotations). |
opr_valid_to_week | str_sett_al | integer | NO | 0 | Ending week of validity for the rule. |
opr_shift_type_filter | str_turni | integer | YES | 3 | Filter for specific shift types (e.g., morning, afternoon, night). |
opr_use_custom_expression | str_use_expr | boolean | YES | false | Boolean flag to enable script-based calculation logic. |
opr_custom_expression | str_expression | text | YES | ''::text | The actual script or expression for advanced calculation logic. |
_deleted | _deleted | boolean | NO | false | Soft delete flag. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_opr_target_attendance_reason | tenant_id, opr_target_reason_code | pres.attendance_reasons | tenant_id, ar_code | CASCADE | RESTRICT |
fk_opr_tenant | tenant_id | cloud.tenants | ten_internal_id | CASCADE | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_overtime_and_premium_rules→id - Unique:
c_uk_opr_tenant_rule_id→tenant_id, opr_rule_id
Indexes
No indexes detected.
Navigation
- Back to main index
- [Back to
presindex]../)