Schema: hr
English table: hr._email_templates
Italian original table: hr._email_template
Description: Email templates used for system notifications and communications (tenant-scoped).
Overview
- Columns: 7
- Primary key: id
- Outgoing foreign keys: 3
- Incoming foreign keys: 0
- Indexes: 4
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Primary key. |
emt_template_id | et_id | integer | NO | | Business identifier of the email template. |
emt_language_id | et_lng_id | integer | NO | | Language identifier for the template content. |
emt_email_type_id | et_xte_id | integer | NO | | Email type identifier associated with the template. |
emt_subject | et_subject | character varying(150) | NO | | Email subject. |
emt_body | et_text | text | NO | | Email body content. |
tenant_id | tenant_id | integer | YES | | Tenant identifier. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk__email_templates_email_type | emt_email_type_id, tenant_id | hr.x_email_types | xet_id, tenant_id | RESTRICT | RESTRICT |
fk__email_templates_language | emt_language_id, tenant_id | hr.languages | language_code_id, tenant_id | RESTRICT | RESTRICT |
fk__email_templates_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk__email_templates → id
- Unique:
uk_emt_template_id_tenant → emt_template_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_emt_tenant | NO | btree | tenant_id |
idx_emt_tenant_email_type | NO | btree | tenant_id, emt_email_type_id |
idx_emt_tenant_email_type_lng | NO | btree | tenant_id, emt_email_type_id, emt_language_id |
idx_emt_tenant_template | NO | btree | tenant_id, emt_template_id |
Navigation