Skip to main content

hr.attachments

Schema: hr
English table: hr.attachments
Italian original table: hr.allegati
Description: Attachments linked to HR entities (people, employments, events and document types), with soft-delete support.

Overview

  • Columns: 20
  • Primary key: id
  • Outgoing foreign keys: 1
  • Incoming foreign keys: 0
  • Indexes: 12

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOSurrogate primary key.
att_attachment_idal_idintegerNOLogical attachment identifier (unique per tenant).
att_reference_table_idal_id_tabella_riferimentointegerNOIdentifier of the referenced table/entity the attachment belongs to.
att_descriptional_descrizionetextNOAttachment description.
att_pathsal_pathnamestextNOStored paths or locations associated with the attachment.
att_file_nameal_nome_filecharacter varying(250)NOOriginal file name of the attachment.
att_type_codeal_tipocharacter varying(4)NOAttachment type code.
att_uploaded_onal_data_uploaddateNOUpload date.
att_notesal_notetextNOAdditional notes about the attachment.
att_employment_relationship_idal_rap_idintegerNOEmployment relationship identifier associated with the attachment.
att_is_confirmedal_confermatobooleanNOIndicates whether the attachment has been confirmed/validated.
att_is_printedal_stampatobooleanNOIndicates whether the attachment has been printed.
att_event_idal_eve_idintegerNOEvent identifier associated with the attachment.
att_person_idal_ana_idintegerNOPerson identifier associated with the attachment.
att_expires_onal_data_scadenzadateNOExpiration date of the attachment, if applicable.
att_document_type_idal_doc_idintegerNODocument type identifier associated with the attachment.
al_inclia_idtenant_idintegerNOIdentifier of the related al inclia record.
tenant_idcolcustomintegerYESTenant identifier for row-level security and data partitioning.
colcustom_deletedjsonbYES'{}'::jsonbCustom fields in JSON format.
_deleted``booleanYESfalseSoft-delete flag.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_att_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_attachmentsid
  • Unique: uk_att_id_tenantatt_attachment_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_att_tenantNObtreetenant_id
idx_att_tenant_attNObtreetenant_id, att_attachment_id) WHERE (_deleted = false
idx_att_tenant_doc_typeNObtreetenant_id, att_document_type_id) WHERE (_deleted = false
idx_att_tenant_empNObtreetenant_id, att_employment_relationship_id) WHERE (_deleted = false
idx_att_tenant_emp_person_refNObtreetenant_id, att_employment_relationship_id, att_person_id, att_reference_table_id) WHERE (_deleted = false
idx_att_tenant_emp_person_ref_docNObtreetenant_id, att_employment_relationship_id, att_person_id, att_reference_table_id, att_document_type_id) WHERE (_deleted = false
idx_att_tenant_eventNObtreetenant_id, att_event_id) WHERE (_deleted = false
idx_att_tenant_expiresNObtreetenant_id, att_expires_on) WHERE (_deleted = false
idx_att_tenant_expires_empNObtreetenant_id, att_expires_on, att_employment_relationship_id) WHERE (_deleted = false
idx_att_tenant_personNObtreetenant_id, att_person_id) WHERE (_deleted = false
idx_att_tenant_typeNObtreetenant_id, att_type_code) WHERE (_deleted = false
idx_att_tenant_type_refNObtreetenant_id, att_type_code, att_reference_table_id) WHERE (_deleted = false