<?php
namespace Modules\RemoteData\EntityManagementWs\Model\Entity\Balance;

class Select extends \Modules\RemoteData\EntityManagementWs\Model\Entity\SelectAbstract
{
	protected $entityClass = 'Balance';

	protected $responseFields = [];

	/**
	 * {@inheritDoc}
	 * @see \Modules\RemoteData\EntityManagementWs\Model\Entity\SelectAbstract::getResponseFieldsFromEntity()
	 */
	protected function getResponseFieldsFromEntity(\App\Entity\SelectAbstract $entityObj) : \stdClass
	{
		$outputFields = parent::getResponseFieldsFromEntity($entityObj);

		$outputFields->balanceType 				= $entityObj->balanceType;
		$outputFields->balanceStatus 			= $entityObj->balanceStatus;
		$outputFields->balanceNumber 			= $entityObj->balanceNumber;
		$outputFields->balanceDate 				= $entityObj->balanceDate;
		$outputFields->balanceCode 				= $entityObj->balanceCode;
		$outputFields->balanceName 				= $entityObj->balanceName;
		$outputFields->generation 				= $entityObj->generation;
		$outputFields->comments 				= $entityObj->comments;
		$outputFields->servicesList 			= $entityObj->orderServicesListSimple;
		$outputFields->supplierInvoiceRowsList 	= $entityObj->supplierInvoiceRowsList;
		$outputFields->remarks 					= $entityObj->remarks;
		$outputFields->processedRemarks 		= $entityObj->processedRemarks;
		$outputFields->idUser 					= $entityObj->idUser;
		$outputFields->idOffice 				= $entityObj->idOffice;
		$outputFields->addTime 					= \Engine\DateTime::createFromTimestamp($entityObj->addTime)->formatDatetimeIso();

		return $outputFields;
	}
}