src/Entity/Role.php line 15

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * Role
  7.  *
  8.  * @ORM\Table(name="role", uniqueConstraints={@ORM\UniqueConstraint(name="UNIQ_B63E2EC757698A6A", columns={"role"})})
  9.  * @ORM\Entity
  10.  */
  11. class Role
  12. {
  13.     public const ROLE_ADMIN 1;
  14.     public const ROLE_USER 2;
  15.     public const ROLE_UPDATE 3;
  16.     public const ROLE_EX_UPDATE 4;
  17.     public const ROLE_SALES 5;
  18.     public const ROLE_PM 6;
  19.     public const ROLE_EDM 9;
  20.     public const ROLE_EPA 10;
  21.     /**
  22.      * @var int
  23.      *
  24.      * @ORM\Column(name="id", type="smallint", nullable=false)
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="IDENTITY")
  27.      */
  28.     private $id;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="name", type="string", length=40, nullable=false)
  33.      */
  34.     private $name;
  35.     /**
  36.      * @var string
  37.      *
  38.      * @ORM\Column(name="role", type="string", length=20, nullable=false)
  39.      */
  40.     private $role;
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getName(): ?string
  46.     {
  47.         return $this->name;
  48.     }
  49.     public function setName(string $name): self
  50.     {
  51.         $this->name $name;
  52.         return $this;
  53.     }
  54.     public function getRole(): ?string
  55.     {
  56.         return $this->role;
  57.     }
  58.     public function setRole(string $role): self
  59.     {
  60.         $this->role $role;
  61.         return $this;
  62.     }
  63. }