|
123456789101112131415161718192021222324252627 |
- <?php
-
- namespace common\logic\User\CreditHistory;
-
- use common\logic\AbstractService;
- use common\logic\Order\Order\Order;
- use common\logic\RepositoryInterface;
-
- class CreditHistoryRepository extends AbstractService implements RepositoryInterface
- {
- public function getDefaultOptionsSearch(): array
- {
- return [
- 'with' => [],
- 'join_with' => [],
- 'orderby' => CreditHistory::tableName() . '.date ASc',
- 'attribute_id_producer' => CreditHistory::tableName() . '.id_producer'
- ];
- }
-
- public function getByOrder(Order $order)
- {
- return CreditHistory::find()
- ->where(['id_order' => $order->id])
- ->all();
- }
- }
|