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.
|
- <?php
-
- namespace domain\PointSale\UserPointSale;
-
- use domain\PointSale\PointSale\PointSale;
- use domain\User\User\User;
- use domain\_\AbstractRepositoryQuery;
-
- class UserPointSaleRepositoryQuery extends AbstractRepositoryQuery
- {
- protected UserPointSaleDefinition $definition;
-
- public function loadDependencies(): void
- {
- $this->loadDefinition(UserPointSaleDefinition::class);
- }
-
- public function joinPointSale(): self
- {
- $this->innerJoinWith('pointSale', true);
- return $this;
- }
-
- public function filterByUser(User $user): self
- {
- $this->andWhere(['user_point_sale.id_user' => $user->id]);
- return $this;
- }
-
- public function filterByPointSale(PointSale $pointSale): self
- {
- $this->andWhere(['id_point_sale' => $pointSale->id]);
- return $this;
- }
- }
|