<?php

namespace AutoAdmin\Bundle\Content\Validator;

use Attribute;
use Symfony\Component\Validator\Constraint;

/** @internal */
#[Attribute]
class UniqueSlug extends Constraint
{
    public string $message = 'La propriété {{ property }} "{{ value }}" existe déjà sur ce site';

    public function __construct(?string $message = null, ?array $groups = null, $payload = null)
    {
        parent::__construct([], $groups, $payload);

        $this->message = $message ?? $this->message;
    }
}
