loadQuery(PaymentRepositoryQuery::class); } public function getDefaultOptionsSearch(): array { return [ self::WITH => [ 'user' ], self::JOIN_WITH => [], self::ORDER_BY => Payment::tableName() . '.date ASc', self::ATTRIBUTE_ID_PRODUCER => Payment::tableName() . '.id_producer' ]; } public function getByOrder(Order $order) { return $this->createDefaultQuery() ->filterByOrder($order) ->find(); } }