Skip to main content

hr.contact_details

Schema: hr
English table: hr.contact_details
Italian original table: hr.recapiti_tel
Description: Polymorphic table storing contact information (phone, email, social) for various entities with temporal validity.

Overview

  • Columns: 14
  • Primary key: id
  • Outgoing foreign keys: 1
  • Incoming foreign keys: 0
  • Indexes: 7

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOSurrogate primary key.
cd_idrect_idintegerNOIdentifier of the related cd record.
cd_source_tablerect_tabellacharacter varying(10)NOThe target table name for this contact (polymorphic reference).
cd_source_idrect_tabella_idintegerNOThe ID of the record in the target table.
cd_type_idrect_tipointegerNOIdentifier of the related cd type record.
cd_labelrect_descrizionecharacter varying(50)NOFriendly label for the contact, e.g., "Personal Mobile" or "Work Email".
cd_contact_valuerect_telefonocharacter varying(80)NOThe actual phone number, email address, or handle.
cd_valid_fromrect_daldateNOBoundary value used for range filtering (start/end).
cd_notesrect_notetextNOFree-form notes.
tenant_idtenant_idintegerYESTenant identifier for data isolation.
colcustomcolcustomjsonbYES'{}'::jsonbJSON payload containing additional attributes.
_deleted_deletedbooleanYESfalseFlag indicating whether the record is soft-deleted.
cd_valid_torect_aldateYESBoundary value used for range filtering (start/end).
cd_periodrect_periododaterangeYESGENERATED: daterange(cd_valid_from, cd_valid_to, '[]'::text)Temporal range of validity (daterange) for this contact detail.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_cd_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_cdid
  • Unique: uk_cd_id_tenantcd_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_cd_id_tenantNObtreetenant_id, cd_id) WHERE (_deleted = false
idx_cd_period_gistNOgisttenant_id, cd_period) WHERE (_deleted = false
idx_cd_polymorphic_tenantNObtreetenant_id, cd_source_table, cd_source_id) WHERE (_deleted = false
idx_cd_polymorphic_type_tenantNObtreetenant_id, cd_source_table, cd_source_id, cd_type_id) WHERE (_deleted = false
idx_cd_source_id_tenantNObtreetenant_id, cd_source_id) WHERE (_deleted = false
idx_cd_source_period_gistNOgisttenant_id, cd_source_table, cd_source_id, cd_period) WHERE (_deleted = false
idx_cd_tenantNObtreetenant_id