src/Entity/AdminSection.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AdminSectionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassAdminSectionRepository::class)]
  6. class AdminSection
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'adminSections')]
  13.     #[ORM\JoinColumn(nullablefalse)]
  14.     private $user;
  15.     #[ORM\ManyToOne(targetEntitySection::class, inversedBy'adminSections')]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private $section;
  18.     #[ORM\Column(type'array')]
  19.     private $capabilities = [];
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getUser(): ?User
  25.     {
  26.         return $this->user;
  27.     }
  28.     public function setUser(?User $user): self
  29.     {
  30.         $this->user $user;
  31.         return $this;
  32.     }
  33.     
  34.     public function getCapabilities(): ?array
  35.     {
  36.         return $this->capabilities;
  37.     }
  38.     public function setCapabilities(array $capabilities): self
  39.     {
  40.         $this->capabilities $capabilities;
  41.         return $this;
  42.     }
  43.     public function getSection(): ?Section
  44.     {
  45.         return $this->section;
  46.     }
  47.     public function setSection(?Section $section): self
  48.     {
  49.         $this->section $section;
  50.         return $this;
  51.     }
  52. }