/var/www/greso.tech/server/nsm/responseModels/report
Edit: /var/www/greso.tech/server/nsm/responseModels/report/leadsSourceList.model.js (699B)
module.exports = class LaedsSourceListModel {
constructor({ rows, time, page, limit, count }) {
this.cols = {
id: "",
name: "Provider",
totalIn: "Total in",
leads: "New",
followUps: "Follow Ups",
estimated: "Estimated",
booked: "Booked",
canceled: "",
}
this.list = rows
? rows.map((item) => {
const { id, name, totalIn, leads, followUps, estimated, booked, canceled } = item
return {
id,
name,
totalIn,
leads,
followUps,
estimated,
booked,
canceled,
}
})
: []
this.count = count || 0
this.page = page ? page : 1
this.limit = limit ? limit : 1
this.time = time ? time : 0
}
}