<?php

namespace App\Validator\Constraints;

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

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

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

        $this->message = 'validators.organizational_unit.parent.required';
        $this->selfParentMessage = 'validators.organizational_unit.parent.self_parent';
    }

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