src/Entity/Numeracion.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NumeracionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=NumeracionRepository::class)
  7.  * @ORM\Table(name="numeracion",indexes={@ORM\Index(name="numero_idx", columns={"numero"})}))
  8.  */
  9. class Numeracion
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=5)
  19.      */
  20.     private $numero;
  21.     /**
  22.      * @ORM\Column(type="integer")
  23.      */
  24.     private $stock;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Sorteo::class, inversedBy="numeraciones")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $sorteo;
  30.     public function __construct()
  31.     {
  32.     }
  33.     public function __toString(): string
  34.     {
  35.         return $this->getSorteo() . ': ' $this->getNumero();
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getNumero(): ?string
  42.     {
  43.         return $this->numero;
  44.     }
  45.     public function setNumero(string $numero): self
  46.     {
  47.         $this->numero $numero;
  48.         return $this;
  49.     }
  50.     public function getStock(): ?int
  51.     {
  52.         return $this->stock;
  53.     }
  54.     public function setStock(int $stock): self
  55.     {
  56.         $this->stock $stock;
  57.         return $this;
  58.     }
  59.     public function getSorteo(): ?Sorteo
  60.     {
  61.         return $this->sorteo;
  62.     }
  63.     public function setSorteo(?Sorteo $sorteo): self
  64.     {
  65.         $this->sorteo $sorteo;
  66.         return $this;
  67.     }
  68. }