<?php
 namespace App\ReportsData\Populate\Entity; class SupplierProduct extends \App\ReportsData\Populate\GeneralAbstract { protected function getDbTableName() { global $DBTRd_supplierProducts; return $DBTRd_supplierProducts; } protected function getEntityFields() { $entity = \Entity\SupplierProduct::select($this->id); if (!$entity->recordExists()) { return null; } $return = [ 'id' => $this->id, 'deleted' => $entity->deleted, 'serviceCode' => $entity->serviceCode, 'category' => $entity->category, 'productName' => $entity->productName, 'chainCode' => $entity->chainCode, 'localization' => $entity->localization, 'address' => $entity->address, 'zipCode' => $entity->zipCode, 'departureCountryCode' => $entity->departureCountryCode, 'departureCityId' => $entity->departureCityId, 'destinationCountryCode'=> $entity->destinationCountryCode, 'destinationCityId' => $entity->destinationCityId, 'telephone' => $entity->telephone, 'fax' => $entity->fax, 'email' => $entity->email, 'website' => $entity->website, 'comments' => $entity->comments, 'remarks' => $entity->remarks, 'processedRemarks' => ( $entity->processedRemarks ? json_encode($entity->processedRemarks) : '' ), 'idRealSupplierProduct' => $entity->idRealSupplierProduct, 'addTime' => \Engine\DateTime::createFromTimestamp($entity->addTime)->formatDatetimeIso(), 'idAddUser' => $entity->idAddUser, 'lastUpdateTime' => ( $entity->lastUpdateTime ? \Engine\DateTime::createFromTimestamp($entity->lastUpdateTime)->formatDatetimeIso() : null ), 'idUpdateUser' => $entity->idUpdateUser, 'updatesCount' => $entity->updatesCount, ]; return $return; } } 