isJoinUserMerchants) { $this->isJoinUserMerchants = true; return $this ->innerJoin('.userMerchant', 'userMerchant'); } return $this; } public function filterByMerchant(MerchantInterface $merchant): self { $this->joinUserMerchant(); return $this ->andWhereMerchant('userMerchant', $merchant); } public function filterByUserMerchant(UserMerchantInterface $userMerchant): self { return $this ->andWhere('.userMerchant = :userMerchant') ->setParameter('userMerchant', $userMerchant); } public function filterByDateStart(DateTime $dateStart): self { return $this ->andWhere('.createdAt >= :dateStart') ->setParameter(':dateStart', $dateStart); } public function filterByDateEnd(DateTime $dateEnd): self { return $this ->andWhere('.createdAt <= :dateEnd') ->setParameter(':dateEnd', $dateEnd); } }