<?php

namespace App\ReportsData\EntityFields;

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

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

	/**
	 * {@inheritDoc}
	 * @see \App\ReportsData\EntityFields\GeneralAbstract::getCustomValues()
	 */
	protected function getCustomValues($fieldName)
	{
		switch ($fieldName) {
			case 'corporate':
				return new Corporate($this->values['idCorporate']);
			case 'user':
				return new User($this->values['idResponsibleUser']);
			case 'addUser':
				return new User($this->values['idAddUser']);
			case 'updateUser':
				return new User($this->values['idUpdateUser']);

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

	}

}
