/var/www/p4ela.kz/server/delivery/api/responseModels/company
NameSizeModeActions
company.model.js20750644editdlrm
companyClientsList.model.js5910644editdlrm
companyList.model.js15650644editdlrm
companyUsersList.model.js8420644editdlrm
companyUsersShort.model.js2650644editdlrm
Edit: /var/www/p4ela.kz/server/delivery/api/responseModels/company/companyList.model.js (1565B)
let { BranchModel } = {} module.exports = class CompanyListModel { constructor({ companies, count, page, time }) { BranchModel = require('../branch/branch.model') this.count = count || 0 this.list = companies ? companies.map((company) => { var companyImages = company.companyImages ? company.companyImages.map((i) => { const { uid, enabled, active, image, icon, imageSmall, imageLarge, isDefault } = i return { uid, enabled, active, image, icon, imageSmall, imageLarge, isDefault } }) : [] let { id, uid, name, tag, description, enabled, active, rating, branches, image, planId, createdAt, billingAt, planExpiredAt, countClients, countCompanyReviews, countBranchReviews, countProductReviews, ordersCreated, ordersCompleted, ordersCanceled, } = company if (branches) { branches = branches.map((branch) => { return new BranchModel(branch) }) } return { id, uid, name, image, tag, description, enabled, active, rating, companyImages, branches, planId, createdAt, billingAt, planExpiredAt, countClients, countCompanyReviews, countBranchReviews, countProductReviews, ordersCreated, ordersCompleted, ordersCanceled, } }) : [] this.page = page ? page : 1 this.time = time ? time : 0 } }