src/Entity/Vetoadom/AnimalRace.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Vetoadom;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * AnimalRace
  6.  *
  7.  * @ORM\Table(name="animal_race", indexes={@ORM\Index(name="FK_animal_race_animal_espece", columns={"animal_espece_id"})})
  8.  * @ORM\Entity(repositoryClass="App\Repository\Vetoadom\AnimalRaceRepository")
  9.  */
  10. class AnimalRace
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      * @ORM\Column(name="id", type="integer", nullable=false)
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="IDENTITY")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var string
  22.      *
  23.      * @ORM\Column(name="code", type="string", length=50, nullable=false)
  24.      */
  25.     private $code;
  26.     /**
  27.      * @var \AnimalEspece
  28.      *
  29.      * @ORM\ManyToOne(targetEntity="AnimalEspece")
  30.      * @ORM\JoinColumns({
  31.      *   @ORM\JoinColumn(name="animal_espece_id", referencedColumnName="id")
  32.      * })
  33.      */
  34.     private $animalEspece;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getCode(): ?string
  40.     {
  41.         return $this->code;
  42.     }
  43.     public function setCode(string $code): self
  44.     {
  45.         $this->code $code;
  46.         return $this;
  47.     }
  48.     public function getAnimalEspece(): ?AnimalEspece
  49.     {
  50.         return $this->animalEspece;
  51.     }
  52.     public function setAnimalEspece(?AnimalEspece $animalEspece): self
  53.     {
  54.         $this->animalEspece $animalEspece;
  55.         return $this;
  56.     }
  57. }