Template

Email templates and version history.

Source: packages/db/src/schema/template.ts

Enums

EnumValues
template_statusdraft, published, archived
template_block_typeheading, text, button, image, divider, spacer, section, container, columns, html

template

ColumnTypeNotes
idtextPK, prefix tmpl_
namevarchar(255)NOT NULL
descriptiontext
subjectvarchar(500)
from_emailvarchar(255)
reply_tovarchar(255)
preview_texttext
organization_idtextFK → organization.id, CASCADE
created_by_user_idtextFK → user.id, CASCADE
statustemplate_statusdefault draft
contentjsonbblock tree, default []
variablesjsonbextracted variables
current_versionintegerdefault 1
thumbnail_urltext
is_defaultbooleandefault false
deleted_attimestamp
created_attimestamp
updated_attimestamp

template_version

ColumnTypeNotes
idtextPK, prefix tmpl_ver_
template_idtextFK → template.id, CASCADE
versionintegerNOT NULL
namevarchar(255)
is_majorbooleandefault false
subjectvarchar(500)
from_emailvarchar(255)
reply_tovarchar(255)
preview_texttext
descriptiontext
contentjsonbNOT NULL
variablesjsonb
rendered_htmltextcached HTML
created_by_user_idtextFK → user.id, CASCADE
created_attimestamp

Was this page helpful?

Edit this page