mail_template

Description

Mail template data.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID. (shop.username)
type TEXT Identifier.
from TEXT NOT NULL Mail address of sender.
reply_to TEXT NOT NULL Mail address to reply.
disabled INTEGER NOT NULL Disabled or not.
  • 0: This type of mail will be sent.
  • 1: It doesn't send this type of mail.

Related tables

Query

CREATE TABLE mail_template(
shop      TEXT,
type      TEXT,
"from"    TEXT     NOT NULL,
reply_to  TEXT     NOT NULL,
disabled  INTEGER  NOT NULL,
PRIMARY KEY(shop, type)
);

mail_template_content

Description

Multilingualized subject, header and footer of mail_template.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID. (shop.username)
template_id TEXT Template ID. (mail_template.type)
lang TEXT Language key.
subject TEXT NOT NULL Mail subject.
header TEXT NOT NULL Body header.
footer TEXT NOT NULL Body footer.

Query

CREATE TABLE mail_template_content(
shop         TEXT,
template_id  TEXT,
lang         TEXT,
subject      TEXT    NOT NULL,
header       TEXT    NOT NULL,
footer       TEXT    NOT NULL,
PRIMARY KEY(shop, template_id, lang)
);