<?php

declare(strict_types=1);

namespace CpCreation\VitiCore\Bridge\Symfony\Bundle\Validator\Constraints;

use Symfony\Component\Validator\Constraint;

#[\Attribute(\Attribute::TARGET_CLASS)]
final class PromoTitleAvailability extends Constraint
{
    public string $message = 'Ce code promo existe déjà.';

    public string $partnerCodeMessage = 'Ce code promo est déjà utilisé comme code partenaire.';

    public function getTargets(): string
    {
        return self::CLASS_CONSTRAINT;
    }

    public function validatedBy(): string
    {
        return static::class.'Validator';
    }
}
