Database Schema Mapping
This document provides a comprehensive mapping between the Italian and English versions of the HRStudio database.
1. Core & Multi-Tenant (Schema: cloud)
These tables manage the fundamental multi-tenant infrastructure and authentication.
Tenants / Clienti (_tenant → tenants)
Master table for multi-tenant isolation. Each row represents a client organization instance.
| Field (ITA) | Field (ENG) | Comment |
|---|---|---|
tenant_id | ten_internal_id | Integer ID used system-wide for row-level security (RLS) and foreign keys. |
ten_id | ten_uuid | Global unique identifier (UUID) for the tenant. |
ten_code | ten_code | Unique mnemonic code for the tenant (e.g., "ACME-INC"). |
ten_name | ten_name | Full descriptive name of the tenant organization. |
ten_status | ten_status_code | Status flag: 1 for Active, 0 for Disabled/Suspended. |
ten_license | ten_license_key | Identifier for the subscription plan or license type. |
ten_master_email | ten_admin_email | Main contact email for the tenant administrator. |
Languages / Lingue (_language → languages)
System-wide lookup table for supported languages in the application interface.
| Field (ITA) | Field (ENG) | Comment |
|---|---|---|
lng_id | lng_language_id | Unique identifier for the language. |
lng_description | lng_name | Full display name of the language. |
lng_flag_img | lng_icon_url | URL or path to the flag icon. |
Translations / Traduzioni (_translate → dictionary_translations)
System dictionary for UI multi-language support.
| Field (ITA) | Field (ENG) | Comment |
|---|---|---|
trans_id | tr_translation_id | Unique identifier for the translation entry. |
trans_context | tr_context_code | Namespace or module context (e.g., "ERRORS", "MENU"). |
trans_base_string | tr_source_key | The base string or key to be translated. |
trans_ms | tr_value_masculine_singular | Translated value: Masculine Singular. |
2. Human Resources Management (Schema: hr)
Tables related to employees, contracts, and certifications.
Employment Relationships / Rapporti (rapporti_det → employment_relationship_details)
Detailed information about the employment relationship.
| Field (ITA) | Field (ENG) | Comment |
|---|---|---|
id | id | Surrogate primary key. |
rapd_id | erd_code | Unique business identifier for the detail record. |
tenant_id | tenant_id | Tenant identifier for data isolation. |
Certifications / Certificazioni (corsi_certificazioni → training_certifications)
Master data for training and professional certifications.
| Field (ITA) | Field (ENG) | Comment |
|---|---|---|
tc_id | tc_id | Business identifier of the certification. |
tc_description | tc_description | Certification description or name. |
tc_abbr | tc_abbr | Certification abbreviation. |
Performance Evaluations / Valutazioni (scheda_valutazione → performance_evaluation_forms)
Forms and templates used for employee performance reviews.
| Field (ITA) | Field (ENG) | Comment |
|---|---|---|
id | id | Surrogate primary key. |
scva_id | scva_id | Identifier of the evaluation form record. |
3. Operational Tables & Logs (Schema: hr / cloud)
Tables for tracking events, history, and system configurations.
Tenant History / Storia Tenant (_tenant_history → tenant_history_log)
Audit log of all lifecycle events and state changes for tenants.
| Field (ITA) | Field (ENG) | Comment |
|---|---|---|
th_tenant_id | thl_tenant_uuid | UUID of the tenant this event refers to. |
th_timestamp | thl_event_timestamp | The exact date and time when the event was recorded. |
th_event_type | thl_event_type | Category of the event (e.g., "STATUS_CHANGE"). |
th_description | thl_event_description | Detailed notes associated with the event. |
Integration Tokens / Token Integrazioni (integration_tokens → external_integration_tokens)
Storage for API tokens used by external applications.
| Field (ITA) | Field (ENG) | Comment |
|---|---|---|
client_app | eit_client_application_name | Name of the external system (e.g., "MobileApp"). |
token | eit_token_value | The actual secure token string. |
is_revoked | eit_is_revoked | Boolean flag to manually invalidate the token. |