Schema: hr
English table: hr.external_entities
Italian original table: hr.soggetti
Description: Table for external subjects, organizations, or individuals interacting with the system (e.g., vendors, partners).
Overview
- Columns: 12
- Primary key: id
- Outgoing foreign keys: 1
- Incoming foreign keys: 0
- Indexes: 2
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Surrogate primary key. |
exe_id | sog_id | integer | NO | | Business identifier for the external entity, unique per tenant. |
exe_type | sog_tipo | character varying(10) | NO | | Category of the entity (Individual vs Organization). |
exe_last_name | sog_cognome | character varying(30) | NO | | Display name for exe last. |
exe_first_name | sog_nome | character varying(20) | NO | | Display name for exe first. |
exe_business_name | sog_ragione_sociale | character varying(50) | NO | | Display name for exe business. |
exe_tax_code | sog_codice_fiscale | character varying(16) | NO | | Code for exe tax. |
exe_vat_number | sog_partita_iva | character varying(11) | NO | | Text value. |
exe_notes | sog_note | text | NO | | Free-form notes. |
tenant_id | tenant_id | integer | YES | | Tenant identifier for data isolation. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON payload containing additional attributes. |
_deleted | _deleted | boolean | YES | false | Flag indicating whether the record is soft-deleted. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_tenant_id | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_external_entities → id
- Unique:
uk_exe_id_tenant → exe_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_exe_id_tenant | NO | btree | tenant_id, exe_id) WHERE (_deleted = false |
idx_exe_tenant | NO | btree | tenant_id |
Navigation