EmailTemplate
Stored in the emailtemplates collection. createdAt and updatedAt are maintained automatically.
Returned by POST /campaign/test/:type, GET /template/email, POST /template/email, GET /template/email/:id, PUT /template/email/:id.
| Field | Type | Notes |
|---|---|---|
name | string | unique |
category | string | |
subject | string | required |
body | string | required |
variables | object[] | default [] |
variables.name | string | required |
variables.required | boolean | default false |
variables.dateType | string | one of dd/mm/yyyy hh:mm a, dd/mm/yyyy |
attachments | ObjectId[] -> File | default [] |
company | ObjectId -> Company | |
createdBy | ObjectId -> Member | |
updatedBy | ObjectId -> Member | |
_id | ObjectId | default "6a95712f932657988a91c08d" |
createdAt | date | set once |
updatedAt | date |