loadQuery(UserPointSaleRepositoryQuery::class); } public function getDefaultOptionsSearch(): array { return [ self::WITH => [], self::JOIN_WITH => [], self::ORDER_BY => '', self::ATTRIBUTE_ID_PRODUCER => 'point_sale.id_producer' ] ; } public function findUserPointSalesByUser(User $user): array { return $this->createDefaultQuery() ->joinPointSale() ->filterByUser($user) ->find(); } public function findOneUserPointSale(User $user = null, PointSale $pointSale = null) { if(!$user || !$pointSale) { return null; } return $this->createDefaultQuery() ->joinPointSale() ->filterByUser($user) ->filterByPointSale($pointSale) ->findOne(); } }