<?php

namespace App\EntityMatch;

class ImportedDocumentsSystem 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\ImportedDocumentsSystem';

	/**
	 * (non-PHPdoc)
	 * @see \App\EntityMatch\BaseAbstract::setTableName()
	 */
	protected function setTableName()
	{
		global $DBTImportedDocuments_systems;
		$this->tableName = $DBTImportedDocuments_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);
    }

}

