<?php
namespace App\EntityList;

class BspSettlementRecords extends \App\EntityList\GeneralAbstract
{
	/**
	 * (non-PHPdoc)
	 * @see \App\EntityList\GeneralAbstract::loadDbTablesCfgs()
	 */
	protected function loadDbTablesCfgs(): void
	{
		// store the table name
	    global $DBTBspSettlementRecords, $DBTBspRecords, $DBTImportedOrders_services, $DBTBspImportedRefunds;
		$this->setMainTable($DBTBspSettlementRecords, 'bspSettlement');
		$this->addAllowedTable($DBTBspRecords, 'bspRecord', 'bspSettlement.bspRecordId=bspRecord.id', 'LEFT');
		$this->addAllowedTable($DBTImportedOrders_services, 'importedService', 'bspSettlement.importedServiceId=importedService.id', 'LEFT');
		$this->addAllowedTable($DBTBspImportedRefunds, 'bspImportedRefund', 'bspSettlement.key=bspImportedRefund.key', 'LEFT');
	}

	protected function setMainColumns(): void
	{
		$this->setColumn($this->tableAlias.'.key', 'key');
	}

	/**
	 * (non-PHPdoc)
	 * @see \App\EntityList\GeneralAbstract::setDefaultFilters()
	 */
	public function setDefaultFilters(): void
	{
		// don't assume `deleted` actually exists
	}
}
