src/Entity/Unit.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UnitRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=UnitRepository::class)
  7.  */
  8. class Unit
  9. {
  10.     const UNIT_BUC 1;
  11.     const UNIT_ORA 2;
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $name;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getName(): ?string
  27.     {
  28.         return $this->name;
  29.     }
  30.     public function setName(string $name): self
  31.     {
  32.         $this->name $name;
  33.         return $this;
  34.     }
  35. }