src/Entity/ReportJobCategory.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\ReportJobCategoryRepository")
  8.  */
  9. class ReportJobCategory
  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.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getName(): ?string
  35.     {
  36.         return $this->name;
  37.     }
  38.     public function setName(string $name): self
  39.     {
  40.         $this->name $name;
  41.         return $this;
  42.     }
  43.     public function getPosition(): ?int
  44.     {
  45.         return $this->position;
  46.     }
  47.     public function setPosition(int $position): self
  48.     {
  49.         $this->position $position;
  50.         return $this;
  51.     }
  52. }