<?php

namespace App\EntityMatch;

class ImportedOrdersSystem extends \App\EntityMatch\BaseAbstract
{

	/**
	 * The export fields for external reservation systems.
	 * @var array
	 */
	protected $exportFields = ['code', 'name'];

	/**
	 * The class name which will instantiate the Entity - used for primaryKey search.
	 * @var String
	 */
	protected $entityClassName = '\Entity\ExtResSystem';

	/**
	 * (non-PHPdoc)
	 * @see \App\EntityMatch\BaseAbstract::setTableName()
	 */
	protected function setTableName()
	{
		global $DBTImportedOrders_systems;
		$this->tableName = $DBTImportedOrders_systems;
	}

	/**
	 * Sets a search by external system code.
	 * @param String $value - the external system code.
	 */
	public function setCode($code)
	{
		$this->setSearchCriterion('code', $code, false);
	}

    /**
     * Sets a search by external system name.
     * @param String $name - the external system name.
     */
    public function setName($name)
    {
        $this->setSearchCriterion('name', $name, true);
    }

}

