query = $this->loadService(PointSaleDistributionRepositoryQuery::class); } public function getDefaultOptionsSearch(): array { return [ 'with' => ['distribution', 'pointSale'], 'join_with' => [], 'orderby' => '', 'attribute_id_producer' => '' ] ; } public function findOnePointSaleDistribution(Distribution $distribution, PointSale $pointSale): ?PointSaleDistribution { return PointSaleDistribution::searchOne([ 'id_distribution' => $distribution->id, 'id_point_sale' => $pointSale->id ]); } public function findPointSaleDistributionsByDistribution(Distribution $distribution): array { return PointSaleDistribution::searchAll([ 'id_distribution' => $distribution->id ]) ; } public function countPointSaleDistributionsByDistribution(Distribution $distribution): int { return PointSaleDistribution::searchCount([ 'id_distribution' => $distribution->id ]); } }