/var/www/greso.tech/server/nsm/responseModels/provider
Edit: /var/www/greso.tech/server/nsm/responseModels/provider/providerList.model.js (441B)
module.exports = class ProviderListModel {
constructor({ rows, time, page, limit, count, isSu }) {
this.list = rows
? rows.map((item) => {
const { id, companyId, name, key, own } = item
return {
id,
companyId,
name,
key: isSu ? key??'' : '',
own,
}
})
: []
this.count = count || 0
this.page = page ? page : 1
this.limit = limit ? limit : 10
this.time = time ? time : 0
}
}