/var/www/greso.tech/server/nsm/responseModels/document
Edit: /var/www/greso.tech/server/nsm/responseModels/document/documentList.model.js (514B)
module.exports = class ProviderListModel {
constructor({ rows, time, page, limit, count }) {
this.list = rows
? rows.map((item) => {
const { id, rootDocumentId, companyId, providerId, emailTemplateId, name, objects } = item
return {
id,
rootDocumentId,
companyId,
providerId,
emailTemplateId,
name,
objects,
}
})
: []
this.count = count || 0
this.page = page ? page : 1
this.limit = limit ? limit : 10
this.time = time ? time : 0
}
}