/var/www/greso.tech/server/nsm/responseModels/package
Edit: /var/www/greso.tech/server/nsm/responseModels/package/packageList.model.js (481B)
module.exports = class PackageListModel {
constructor({ rows, time, page, limit, count }) {
this.list = rows
? rows.map((item) => {
const { id, companyId, name, itemPrice, packingPrice, unpackingPrice } = item
return {
id,
companyId,
name,
itemPrice,
packingPrice,
unpackingPrice,
}
})
: []
this.count = count || 0
this.page = page ? page : 1
this.limit = limit ? limit : 10
this.time = time ? time : 0
}
}