<?php

namespace App\Validator\Constraints;

use App\Model\UserGroupPermissions;
use Symfony\Component\Validator\Constraint;

#[\Attribute]
class OrganizationalUnitParent extends Constraint
{
    public string $message;

    public function __construct(mixed $options = null, ?array $groups = null, mixed $payload = null)
    {
        parent::__construct($options, $groups, $payload);

        $this->message = 'Only the root organizational unit can not have a parent.';
    }

    public function getTargets(): array|string
    {
        return parent::CLASS_CONSTRAINT;
    }
}