feat: improved promotional and purchase vouchers

This commit is contained in:
Björn Fromme committed 2026-03-16 11:59:11 +01:00
1 parent 7df99521c4
commit fb983f23dd
15 files changed
+357 -137

No files matched your search

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace App\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
/**
* Validates promotional voucher codes via BPN API.
*
* Checks code validity, travel applicability, and minimum price threshold.
* Requires participant pricing calculation and travel context.
* Applied at ParticipantEditDto level to access booking context.
*/
#[\Attribute]
class PromoVoucher extends Constraint
{
public string $message = 'Aktionscode ungültig: {{ error }}';
public function getTargets(): array|string
{
return static::CLASS_CONSTRAINT;
}
}