Add supervisor and associated getter and setter

This commit is contained in:
Ryan Prather 2024-11-30 19:58:48 -05:00
parent 3dfd8712cf
commit 20b67f86e5

View File

@ -71,8 +71,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
#[ORM\Column(enumType: CaseLevel::class)] #[ORM\Column(enumType: CaseLevel::class)]
private ?CaseLevel $level = null; private ?CaseLevel $level = null;
#[ORM\ManyToOne(inversedBy: 'supervisor')] private ?User $supervisor = null;
private ?Supervision $supervisor = null;
public function __construct() public function __construct()
{ {
@ -298,12 +297,12 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
]; ];
} }
public function getSupervisor(): ?Supervision public function getSupervisor(): ?User
{ {
return $this->supervisor; return $this->supervisor;
} }
public function setSupervisor(?Supervision $supervisor): static public function setSupervisor(?User $supervisor): static
{ {
$this->supervisor = $supervisor; $this->supervisor = $supervisor;