diff --git a/src/Entity/UserCase.php b/src/Entity/UserCase.php index fca3f60..d7580a5 100644 --- a/src/Entity/UserCase.php +++ b/src/Entity/UserCase.php @@ -2,6 +2,7 @@ namespace App\Entity; +use App\Enums\CaseLevel; use App\Repository\UserCaseRepository; use Doctrine\ORM\Mapping as ORM; @@ -49,4 +50,9 @@ class UserCase return $this; } + + public static function checkLevel(User $user, MemberCase $case): bool + { + return ($user->getLevel()->value >= $case->getLevel()->value); + } }