src/Entity/Profile.php line 13
<?phpnamespace App\Entity;use ApiPlatform\Metadata\ApiResource;use App\Repository\ProfileRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ProfileRepository::class)]#[ApiResource]class Profile{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 50)]private ?string $profileName = null;#[ORM\OneToMany(mappedBy: 'profile', targetEntity: Users::class, orphanRemoval: true)]private Collection $users;#[ORM\OneToMany(mappedBy: 'profile', targetEntity: ProfileMenu::class, orphanRemoval: true)]private Collection $profileMenus;public function __construct(){$this->users = new ArrayCollection();$this->profileMenus = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getProfileName(): ?string{return $this->profileName;}public function setProfileName(string $profileName): self{$this->profileName = $profileName;return $this;}/*** @return Collection<int, Users>*/public function getUsers(): Collection{return $this->users;}public function addUser(Users $user): self{if (!$this->users->contains($user)) {$this->users->add($user);$user->setProfile($this);}return $this;}public function removeUser(Users $user): self{if ($this->users->removeElement($user)) {// set the owning side to null (unless already changed)if ($user->getProfile() === $this) {$user->setProfile(null);}}return $this;}/*** @return Collection<int, ProfileMenu>*/public function getProfileMenus(): Collection{return $this->profileMenus;}public function addProfileMenu(ProfileMenu $profileMenu): self{if (!$this->profileMenus->contains($profileMenu)) {$this->profileMenus->add($profileMenu);$profileMenu->setProfile($this);}return $this;}public function removeProfileMenu(ProfileMenu $profileMenu): self{if ($this->profileMenus->removeElement($profileMenu)) {// set the owning side to null (unless already changed)if ($profileMenu->getProfile() === $this) {$profileMenu->setProfile(null);}}return $this;}}