<?php

namespace App\ReportsData\EntityFields;

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

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

	/**
	 * {@inheritDoc}
	 * @see \App\ReportsData\EntityFields\GeneralAbstract::getCustomValues()
	 */
	protected function getCustomValues($fieldName)
	{
		switch ($fieldName) {

			case 'externalSystem':
				return new ImportedOrderSystem($this->values['idSystem']);

			case 'customerOwner':
				return new Customer($this->values['idCustomerOwner']);
			case 'corporateOwner':
				return new Corporate($this->values['idCorporateOwner']);
			case 'miceProject':
				return new MiceProject($this->values['idMiceProject']);

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

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

	}

}
