Files
new.rybstock.ru/app/Repositories/PromocodeRepository.php
T
2026-06-04 00:27:17 +03:00

26 lines
649 B
PHP

<?php
declare(strict_types=1);
namespace App\Repositories;
final class PromocodeRepository extends BaseRepository
{
/**
* @return array<int, array<string, mixed>>
*/
public function priceTiers(): array
{
$statement = $this->pdo()->query(
'SELECT code, title, discount_type, discount_value, min_order_amount, price_tier_label, payment_note
FROM promocodes
WHERE is_active = 1
AND show_in_price_tiers = 1
AND discount_type = "percent"
ORDER BY min_order_amount, discount_value'
);
return $statement->fetchAll();
}
}