isJoinUserMerchants) { $this->isJoinUserMerchants = true; return $this ->innerJoin('.userMerchant', 'um'); } return $this; } public function filterByJoinUserMerchant(Merchant $merchant): self { $this->joinUserMerchant(); return $this ->andWhere('um.merchant = :merchant') ->setParameter('merchant', $merchant); } public function filterByUserMerchant(UserMerchant $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); } }