Skip to main content

hr.attachment_types

Schema: hr
English table: hr.attachment_types
Italian original table: hr.tipi_allegati
Description: Definitions of document categories for attachments (e.g., ID, Contract, Medical Certificate).

Overview

  • Columns: 7
  • Primary key: id
  • Outgoing foreign keys: 2
  • Incoming foreign keys: 1
  • Indexes: 3

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOSurrogate primary key.
atty_idtipall_idintegerNOIdentifier of the related atty record.
atty_descriptiontipall_descrizionecharacter varying(50)NODescription text.
atty_group_idtipall_grall_idintegerNOIdentifier of the related atty group record.
tenant_idtenant_idintegerYESTenant identifier for data isolation.
colcustomcolcustomjsonbYES'{}'::jsonbJSON payload containing additional attributes.
_deleted_deletedbooleanYESfalseFlag indicating whether the record is soft-deleted.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_tenant_idtenant_idcloud.tenantsten_internal_idRESTRICTCASCADE
fk_tipall_grall_idatty_group_id, tenant_idhr.x_attachment_groupsxag_id, tenant_idRESTRICTRESTRICT

Referenced by

From tableForeign keySource columnsTarget columns
hr._document_templatesfk__document_templates_attachment_typedct_attachment_type_id, tenant_idatty_id, tenant_id

Constraints

  • Primary key: pk_attachment_typesid
  • Unique: uk_atty_id_tenantatty_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_atty_group_tenantNObtreetenant_id, atty_group_id) WHERE (_deleted = false
idx_atty_id_tenantNObtreetenant_id, atty_id) WHERE (_deleted = false
idx_atty_tenantNObtreetenant_id