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; } }