|
- <?php
-
- namespace common\logic\PointSale\UserPointSale;
-
- use common\logic\BaseService;
- use common\logic\BuilderInterface;
- use common\logic\PointSale\PointSale\PointSale;
- use common\logic\PointSale\UserPointSale\UserPointSale;
- use common\logic\RepositoryInterface;
- use common\logic\User\User\User;
-
- class UserPointSaleRepository extends BaseService implements RepositoryInterface
- {
- public function defaultOptionsSearch(): array
- {
- return [
- 'with' => [],
- 'join_with' => [],
- 'orderby' => '',
- 'attribute_id_producer' => ''
- ] ;
- }
-
- public function getOne(User $user, PointSale $pointSale)
- {
- return UserPointSale::find()
- ->where([
- 'id_user' => $user->id,
- 'id_point_sale' => $pointSale->id
- ])->one();
- }
- }
|