feat: improved promotional and purchase vouchers

This commit is contained in:
Björn Fromme
2026-03-16 11:59:11 +01:00
parent 7df99521c4
commit fb983f23dd
15 changed files with 357 additions and 137 deletions
@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace App\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
/**
* Validates purchase voucher codes via BPN API.
*
* Checks that the voucher exists and has remaining balance.
* Applied at ParticipantEditDto level to access booking context.
*/
#[\Attribute]
class PurchaseVoucher extends Constraint
{
public string $message = 'Gutschein ungültig: {{ error }}';
public function getTargets(): array|string
{
return static::CLASS_CONSTRAINT;
}
}