src/Entity/ReportGender.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\ReportGenderRepository")
  8.  */
  9. class ReportGender
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=64)
  19.      * @Assert\Length(max="64")
  20.      * @Assert\NotBlank()
  21.      */
  22.     private $name;
  23.     /**
  24.      * @ORM\Column(type="integer")
  25.      * @Assert\NotBlank()
  26.      * @Assert\Type(type="integer")
  27.      * @Gedmo\SortablePosition()
  28.      */
  29.     private $position;
  30.     /**
  31.      * @ORM\Column(type="boolean")
  32.      * @Assert\Type("bool")
  33.      */
  34.     private $governingBoard;
  35.     public function __construct()
  36.     {
  37.         $this->governingBoard false;
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getName(): ?string
  44.     {
  45.         return $this->name;
  46.     }
  47.     public function setName(string $name): self
  48.     {
  49.         $this->name $name;
  50.         return $this;
  51.     }
  52.     public function getPosition(): ?int
  53.     {
  54.         return $this->position;
  55.     }
  56.     public function setPosition(int $position): self
  57.     {
  58.         $this->position $position;
  59.         return $this;
  60.     }
  61.     public function __toString(): string
  62.     {
  63.         return $this->getName();
  64.     }
  65.     public function getGoverningBoard(): ?bool
  66.     {
  67.         return $this->governingBoard;
  68.     }
  69.     public function setGoverningBoard(bool $governingBoard): self
  70.     {
  71.         $this->governingBoard $governingBoard;
  72.         return $this;
  73.     }
  74. }