/var/www/greso.tech/server/nsm/responseModels/email_template
Edit: /var/www/greso.tech/server/nsm/responseModels/email_template/emailTemplateList.model.js (467B)
module.exports = class EmailTemplateListModel {
constructor({ rows, time, page, limit, count }) {
this.list = rows
? rows.map((item) => {
const { id, companyId, rootTemplateId, name, subject, body } = item
return {
id,
companyId,
rootTemplateId,
name,
subject,
body,
}
})
: []
this.count = count || 0
this.page = page ? page : 1
this.limit = limit ? limit : 10
this.time = time ? time : 0
}
}