src/Entity/ProfileMenu.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\ProfileMenuRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassProfileMenuRepository::class)]
  7. #[ApiResource]
  8. class ProfileMenu
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column]
  15.     private ?int $menuOrder null;
  16.     #[ORM\ManyToOne(inversedBy'profileMenus')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?Profile $profile null;
  19.     #[ORM\ManyToOne(inversedBy'profileMenus')]
  20.     #[ORM\JoinColumn(nullablefalse)]
  21.     private ?Menu $menu null;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getMenuOrder(): ?int
  27.     {
  28.         return $this->menuOrder;
  29.     }
  30.     public function setMenuOrder(int $menuOrder): self
  31.     {
  32.         $this->menuOrder $menuOrder;
  33.         return $this;
  34.     }
  35.     public function getProfile(): ?Profile
  36.     {
  37.         return $this->profile;
  38.     }
  39.     public function setProfile(?Profile $profile): self
  40.     {
  41.         $this->profile $profile;
  42.         return $this;
  43.     }
  44.     public function getMenu(): ?Menu
  45.     {
  46.         return $this->menu;
  47.     }
  48.     public function setMenu(?Menu $menu): self
  49.     {
  50.         $this->menu $menu;
  51.         return $this;
  52.     }
  53. }