<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

namespace Kufer\Web\Classes\Dbfilter;


class HLBuchungskreiseIntSQLFilter extends BasicSQLFilter
{
  protected function __construct()
  {
    parent::__construct();

    $this->registerDb('Id', 'id', static::TYPE_INTEGER);
    $this->registerDb('Bezeichnung', 'bezeichnung', static::TYPE_STRING);
    $this->registerDb('Von', 'von', static::TYPE_STRING);
    $this->registerDb('Bis', 'bis', static::TYPE_STRING);
    $this->registerDb('Bemerkung', 'bemerkung', static::TYPE_STRING);
  }

  public function getTablePraeffix(): string
  {
    return 'hlbuchungskreis_int';
  }

  public function equalsId($id): IFilter
  {
    $this->applyFilterCurrent(
      static::FILTER_OPTION_ID,
      SQLFilterUtils::filterEqualsIdInt('id', $id)
    );

    return $this;
  }

  public function inId(iterable $ids): IFilter
  {
    $this->applyFilterCurrent(
      static::FILTER_OPTION_ID,
      SQLFilterUtils::filterInIdInt('id', $ids)
    );

    return $this;
  }
}