/var/www/greso.tech/server/nsm/responseModels/zip_code
Edit: /var/www/greso.tech/server/nsm/responseModels/zip_code/zipCodesList.model.js (406B)
module.exports = class ZipCodesListModel {
constructor({ rows, time, page, limit, count }) {
this.list = rows
? rows.map((item) => {
const { id, zip, latitude, longitude } = item
return {
id,
zip,
latitude,
longitude,
}
})
: []
this.count = count || 0
this.page = page ? page : 1
this.limit = limit ? limit : 10
this.time = time ? time : 0
}
}