eventmailermailconfiguration

-1 rows


Description

Module: Communications & Engagement
Purpose: Stores master templates and configurations for automated milestone emails (birthdays, work anniversaries, etc.).
Data: One row per company (tenant), holding their unique branding, images, and text for all event mailers.
Process Usage: Queried by a daily background job using companyid when an employee event (e.g., birthday) is detected. The service fetches the correct subject, text, and image path to build and send the email.
Key Points: This is a configuration table (stores templates), not a log table (sent emails). It distinguishes between templates for the employee (e.g., birthdaytext) and templates for staff/manager notifications (e.g., birthdaystafftext).
Business Impact: Central to automating employee recognition. Misconfiguration (e.g., broken image path) directly impacts employee engagement and internal company brand.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigserial 19 nextval('eventmailermailconfiguration_id_seq'::regclass)

Meaning: A unique identifier for the configuration record.
Format: bigint, Primary Key, Auto-incrementing.
Logic: Automatically generated by the sequence eventmailermailconfiguration_id_seq.

birthdayimagepath varchar 500 null

Meaning: The server file path or full URL to the banner image used in birthday emails.
Format: character varying(500)
Usage: Inserted into the src attribute of an <img> tag in the HTML email template.

birthdaysubject varchar 50 null
birthdaytext text 2147483647 null
birthdaystafftext text 2147483647 null
anniversaryimagepath varchar 500 null
anniversarysubject varchar 50 null
anniversarytext text 2147483647 null
anniversarystafftext text 2147483647 null
wedanniversaryimagepath varchar 500 null
wedanniversarysubject varchar 50 null
wedanniversarytext text 2147483647 null
wedanniversarystafftext text 2147483647 null
companyid int4 10 null
tbl_companymaster.companyid Implied Constraint R

Meaning: The unique identifier for the company (tenant) that this configuration belongs to.
Format: integer
FK: References the primary key of a company table (e.g., tbl_company.id).
Usage: This is the key field used to ensure the mailer service fetches the correct set of templates for a given employee.

Indexes

Constraint Name Type Sort Column(s)
eventmailermailconfiguration_pkey Primary key Asc id

Relationships