hr.document_model_justifications
Schema: hr
English table: hr.document_model_justifications
Italian original table: hr.in_docmodel_giustif
Description: Rules and validation settings for leave justifications linked to specific document models.
Overview
- Columns: 16
- 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. | |
dmj_id | dmg_id | integer | NO | Unique identifier for the justification rule within a tenant. | |
dmj_document_model_id | dmg_dm_id | integer | NO | Reference to the parent document model. | |
dmj_description | dmg_descrizione | character varying(100) | NO | Description of the justification rule. | |
dmj_justification_code | dmg_cod_giu | character varying(4) | NO | Reference code for the justification type. | |
dmj_counter_id | dmg_cont_id | integer | NO | Reference to the balance/counter linked to this justification. | |
dmj_type_code | dmg_tipo | numeric(1,0) | NO | Internal classification code for the justification type. | |
dmj_valid_days_mask | dmg_giorni_val | character varying(8) | NO | Bitmask or string representing valid days of the week. | |
dmj_counter_usage_type_id | dmg_xtipucont_id | integer | NO | Reference to the usage type configuration for the counter. | |
dmj_is_hidden_counter_disabled | dmg_hiddencont_disabled | boolean | NO | Flag to disable the hidden counter logic. | |
dmj_hidden_counter_default_value | dmg_hiddencont_value | boolean | NO | Default value for the hidden counter. | |
dmj_has_leave_balance_check | dmg_checkferie | boolean | NO | Flag indicating if a balance check (e.g. for holidays/PTO) is required. | |
dmj_leave_balance_tolerance_days | dmg_checkferie_tollerance | integer | NO | Tolerance in days for negative balances. | |
tenant_id | tenant_id | integer | YES | Tenant identifier for data isolation. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON field for custom data. |
_deleted | _deleted | boolean | YES | false | Technical soft delete flag. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_document_model_justifications_model | dmj_document_model_id, tenant_id | hr.document_models | dmdl_id, tenant_id | RESTRICT | RESTRICT |
fk_document_model_justifications_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
fk_document_model_justifications_usage_type | dmj_counter_usage_type_id, tenant_id | hr.x_counter_usage_types | xcut_id, tenant_id | RESTRICT | RESTRICT |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_document_model_justifications→id - Unique:
uk_document_model_justifications_id→dmj_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_dmj_counter_tenant | NO | btree | tenant_id, dmj_counter_id) WHERE (_deleted = false |
idx_dmj_document_model_tenant | NO | btree | tenant_id, dmj_document_model_id) WHERE (_deleted = false |
idx_dmj_id_tenant | NO | btree | tenant_id, dmj_id) WHERE (_deleted = false |
idx_dmj_tenant | NO | btree | tenant_id |
idx_dmj_usage_type_tenant | NO | btree | tenant_id, dmj_counter_usage_type_id) WHERE (_deleted = false |
Navigation
- Back to main index
- [Back to
hrindex]../)