<?php

namespace App\ReportsData\EntityList;

class Orders extends GeneralAbstract
{

	/**
	 * {@inheritDoc}
	 * @see \App\EntityList\GeneralAbstract::loadDbTablesCfgs()
	 */
	protected function loadDbTablesCfgs(): void
	{
		// store the table name
		global $DBTRd_orders, $DBTRd_users, $DBTRd_offices, $DBTRd_services, $DBTRd_customers, $DBTRd_corporates;
		$this->setMainTable($DBTRd_orders, 'ord');
        $this->addAllowedTable($DBTRd_users, 'user', 'ord.idUser=user.id', 'INNER');
        $this->addAllowedTable($DBTRd_offices, 'office', 'ord.idOffice=office.id', 'INNER');
        $this->addAllowedTable($DBTRd_services, 'serv', 'serv.idOrder=ord.id', 'INNER');
        $this->addAllowedTable($DBTRd_customers, 'cust', 'ord.idCustomerOwner=cust.id', 'INNER');
        $this->addAllowedTable($DBTRd_corporates, 'corp', 'ord.idCorporateOwner=corp.id', 'INNER');
	}

	public function setDefaultFilters(): void
	{
	}

}

