You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 satır
846B

  1. <?php
  2. namespace common\logic\PointSale\UserPointSale;
  3. use common\logic\BaseService;
  4. use common\logic\BuilderInterface;
  5. use common\logic\PointSale\PointSale\PointSale;
  6. use common\logic\PointSale\UserPointSale\UserPointSale;
  7. use common\logic\RepositoryInterface;
  8. use common\logic\User\User\User;
  9. class UserPointSaleRepository extends BaseService implements RepositoryInterface
  10. {
  11. public function defaultOptionsSearch(): array
  12. {
  13. return [
  14. 'with' => [],
  15. 'join_with' => [],
  16. 'orderby' => '',
  17. 'attribute_id_producer' => ''
  18. ] ;
  19. }
  20. public function getOne(User $user, PointSale $pointSale)
  21. {
  22. return UserPointSale::find()
  23. ->where([
  24. 'id_user' => $user->id,
  25. 'id_point_sale' => $pointSale->id
  26. ])->one();
  27. }
  28. }