<?php

namespace App\ReportsData\EntityFields;

class CashBookDocuments extends \App\ReportsData\EntityFields\GeneralAbstract
{

	/**
	 * Returns the table name that will store the current entity queue.
	 * @return string
	 */
	protected function getDbTableName()
	{
		global $DBTRd_cashbookDocuments;
		return $DBTRd_cashbookDocuments;
	}

	/**
	 * {@inheritDoc}
	 * @see \App\ReportsData\EntityFields\GeneralAbstract::getCustomValues()
	 */
	protected function getCustomValues($fieldName)
	{
		switch ($fieldName) {
			case 'agencyBankAccount':
				return new AgencyBankAccount($this->values['idBankAccount']);

			case 'user':
				return new User($this->values['idUser']);
			case 'office':
				return new Office($this->values['idOffice']);
			case 'issueUser':
				return new User($this->values['idIssueUser']);
			case 'blockUser':
				return new User($this->values['idBlockUser']);
			case 'addUser':
				return new User($this->values['idAddUser']);
			case 'updateUser':
				return new User($this->values['idUpdateUser']);

			default:
				return parent::getCustomValues($fieldName);
		}

	}

}
