/var/www/greso.tech/server/nsm/responseModels/warehouse
Edit: /var/www/greso.tech/server/nsm/responseModels/warehouse/warehouseList.model.js (503B)
module.exports = class WarehouseListModel {
constructor({ rows, time, page, limit, count }) {
this.list = rows
? rows.map((item) => {
const { id, companyId, name, own, temporary, comment, address, addressId } = item
return {
id,
companyId,
name,
comment,
own,
temporary,
address,
addressId,
}
})
: []
this.count = count || 0
this.page = page ? page : 1
this.limit = limit ? limit : 10
this.time = time ? time : 0
}
}