src/Entity/Vetoadom/AppelAnimal.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Vetoadom;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * AppelAnimal
  6.  *
  7.  * @ORM\Table(name="appel_animal", indexes={@ORM\Index(name="FK_appel_animal_animal", columns={"animal_id"}), @ORM\Index(name="FK_appel_animal_secteur_categorie_poids_espece", columns={"secteur_categorie_poids_espece_id"}), @ORM\Index(name="FK_appel_animal_appel", columns={"appel_id"})})
  8.  * @ORM\Entity(repositoryClass="App\Repository\Vetoadom\AppelAnimalRepository")
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class AppelAnimal
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer", nullable=false)
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var bool
  23.      *
  24.      * @ORM\Column(name="active", type="boolean", nullable=false, options={"default"="1"})
  25.      */
  26.     private $active true;
  27.     /**
  28.      * @var \DateTime
  29.      *
  30.      * @ORM\Column(name="date_creation", type="datetime", nullable=false)
  31.      */
  32.     private $dateCreation;
  33.     /**
  34.      * @var \DateTime
  35.      *
  36.      * @ORM\Column(name="date_modification", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP"})
  37.      */
  38.     private $dateModification;
  39.     /**
  40.      * @var \SecteurCategoriePoidsEspece
  41.      *
  42.      * @ORM\ManyToOne(targetEntity="SecteurCategoriePoidsEspece")
  43.      * @ORM\JoinColumns({
  44.      *   @ORM\JoinColumn(name="secteur_categorie_poids_espece_id", referencedColumnName="id")
  45.      * })
  46.      */
  47.     private $secteurCategoriePoidsEspece;
  48.     /**
  49.      * @var \Animal
  50.      *
  51.      * @ORM\ManyToOne(targetEntity="Animal")
  52.      * @ORM\JoinColumns({
  53.      *   @ORM\JoinColumn(name="animal_id", referencedColumnName="id")
  54.      * })
  55.      */
  56.     private $animal;
  57.     /**
  58.      * @var \Appel
  59.      *
  60.      * @ORM\ManyToOne(targetEntity="Appel")
  61.      * @ORM\JoinColumns({
  62.      *   @ORM\JoinColumn(name="appel_id", referencedColumnName="id")
  63.      * })
  64.      */
  65.     private $appel;
  66.     public function getId(): ?int
  67.     {
  68.         return $this->id;
  69.     }
  70.     public function getActive(): ?bool
  71.     {
  72.         return $this->active;
  73.     }
  74.     public function setActive(bool $active): self
  75.     {
  76.         $this->active $active;
  77.         return $this;
  78.     }
  79.     public function getDateCreation(): ?\DateTimeInterface
  80.     {
  81.         return $this->dateCreation;
  82.     }
  83.     public function setDateCreation(\DateTimeInterface $dateCreation): self
  84.     {
  85.         $this->dateCreation $dateCreation;
  86.         return $this;
  87.     }
  88.     public function getDateModification(): ?\DateTimeInterface
  89.     {
  90.         return $this->dateModification;
  91.     }
  92.     public function setDateModification(\DateTimeInterface $dateModification): self
  93.     {
  94.         $this->dateModification $dateModification;
  95.         return $this;
  96.     }
  97.     public function getSecteurCategoriePoidsEspece(): ?SecteurCategoriePoidsEspece
  98.     {
  99.         return $this->secteurCategoriePoidsEspece;
  100.     }
  101.     public function setSecteurCategoriePoidsEspece(?SecteurCategoriePoidsEspece $secteurCategoriePoidsEspece): self
  102.     {
  103.         $this->secteurCategoriePoidsEspece $secteurCategoriePoidsEspece;
  104.         return $this;
  105.     }
  106.     public function getAnimal(): ?Animal
  107.     {
  108.         return $this->animal;
  109.     }
  110.     public function setAnimal(?Animal $animal): self
  111.     {
  112.         $this->animal $animal;
  113.         return $this;
  114.     }
  115.     public function getAppel(): ?Appel
  116.     {
  117.         return $this->appel;
  118.     }
  119.     public function setAppel(?Appel $appel): self
  120.     {
  121.         $this->appel $appel;
  122.         return $this;
  123.     }
  124.     /**
  125.      * @ORM\PrePersist
  126.      */
  127.     public function setCreatedAtValue()
  128.     {
  129.         $this->dateCreation = new \DateTimeImmutable();
  130.     }
  131. }