Skip to main content

hr.work_reports

Schema: hr
English table: hr.work_reports
Italian original table: hr.in_rapportino
Description: Header table for work reports, interventions, and project-based activity summaries.

Overview

  • Columns: 22
  • Primary key: id
  • Outgoing foreign keys: 2
  • Incoming foreign keys: 1
  • Indexes: 8

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOInternal surrogate primary key.
wr_idirendrap_idintegerNOUnique report identifier within a tenant.
wr_employment_idirendrap_rap_idintegerNOReference to the employment/employee who filed the report.
wr_project_idirendrap_com_idintegerYESReference to the project (commessa) associated with the work.
wr_project_line_idirendrap_coml_idintegerYESReference to the specific project line or task.
wr_created_atirendrap_dt_creatodateNOThe date when the report was officially created in the system.
wr_is_acceptedirendrap_accettatobooleanNOFlag indicating if the customer has accepted the report.
wr_is_closedirendrap_chiusobooleanNOFlag indicating if the report is finalized and closed.
wr_customer_notesirendrap_note_clientetextNONotes or feedback provided by the customer.
wr_customer_emailirendrap_email_clientecharacter varying(200)NOEmail address of the customer representative for report delivery.
wr_status_codeirendrap_statusnumeric(1,0)NOStatus of the report (e.g., Draft, Sent, Approved).
wr_contact_personirendrap_referentecharacter varying(100)NOName of the reference person for the customer.
wr_signature_file_pathirendrap_file_firmacharacter varying(100)NOPath or reference to the digital signature file.
wr_customer_idirendrap_incli_idintegerYESReference to the customer entity.
wr_customer_site_idirendrap_inclise_idintegerYESReference to the specific customer site or location.
wr_custom_payloadirendrap_customtextNOAdditional custom data or text fields.
wr_report_dateirendrap_daldateNOThe actual date of the work being reported.
irendrap_templatetenant_idcharacter varying(250)NOText value.
irendrap_numerocolcustomcharacter varying(15)NOText value.
tenant_id_deletedintegerYESTenant identifier for data isolation.
colcustom``jsonbYES'{}'::jsonbJSON field for custom data.
_deleted``booleanYESfalseTechnical soft delete flag.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_work_reports_employmentwr_employment_id, tenant_idhr.employment_relationshipser_id, tenant_idRESTRICTCASCADE
fk_work_reports_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

From tableForeign keySource columnsTarget columns
hr.work_report_detailsfk_work_report_details_work_reportwrd_work_report_id, tenant_idwr_id, tenant_id

Constraints

  • Primary key: pk_work_reportsid
  • Unique: uk_work_reports_idwr_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_in_rapportino_irendrap_coml_id_tenantNObtreetenant_id, wr_project_line_id) WHERE (_deleted = false
idx_in_rapportino_irendrap_inclise_id_tenantNObtreetenant_id, wr_customer_site_id) WHERE (_deleted = false
idx_wr_customer_tenantNObtreetenant_id, wr_customer_id) WHERE (_deleted = false
idx_wr_employment_tenantNObtreetenant_id, wr_employment_id) WHERE (_deleted = false
idx_wr_full_lookup_tenantNObtreetenant_id, wr_employment_id, wr_project_id, wr_project_line_id, wr_customer_id, wr_customer_site_id) WHERE (_deleted = false
idx_wr_id_tenantNObtreetenant_id, wr_id) WHERE (_deleted = false
idx_wr_project_tenantNObtreetenant_id, wr_project_id) WHERE (_deleted = false
idx_wr_tenantNObtreetenant_id