<?php
namespace App\Entity\Vetoadom;
use Doctrine\ORM\Mapping as ORM;
/**
* AppelAnimal
*
* @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"})})
* @ORM\Entity(repositoryClass="App\Repository\Vetoadom\AppelAnimalRepository")
* @ORM\HasLifecycleCallbacks()
*/
class AppelAnimal
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var bool
*
* @ORM\Column(name="active", type="boolean", nullable=false, options={"default"="1"})
*/
private $active = true;
/**
* @var \DateTime
*
* @ORM\Column(name="date_creation", type="datetime", nullable=false)
*/
private $dateCreation;
/**
* @var \DateTime
*
* @ORM\Column(name="date_modification", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP"})
*/
private $dateModification;
/**
* @var \SecteurCategoriePoidsEspece
*
* @ORM\ManyToOne(targetEntity="SecteurCategoriePoidsEspece")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="secteur_categorie_poids_espece_id", referencedColumnName="id")
* })
*/
private $secteurCategoriePoidsEspece;
/**
* @var \Animal
*
* @ORM\ManyToOne(targetEntity="Animal")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="animal_id", referencedColumnName="id")
* })
*/
private $animal;
/**
* @var \Appel
*
* @ORM\ManyToOne(targetEntity="Appel")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="appel_id", referencedColumnName="id")
* })
*/
private $appel;
public function getId(): ?int
{
return $this->id;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getDateCreation(): ?\DateTimeInterface
{
return $this->dateCreation;
}
public function setDateCreation(\DateTimeInterface $dateCreation): self
{
$this->dateCreation = $dateCreation;
return $this;
}
public function getDateModification(): ?\DateTimeInterface
{
return $this->dateModification;
}
public function setDateModification(\DateTimeInterface $dateModification): self
{
$this->dateModification = $dateModification;
return $this;
}
public function getSecteurCategoriePoidsEspece(): ?SecteurCategoriePoidsEspece
{
return $this->secteurCategoriePoidsEspece;
}
public function setSecteurCategoriePoidsEspece(?SecteurCategoriePoidsEspece $secteurCategoriePoidsEspece): self
{
$this->secteurCategoriePoidsEspece = $secteurCategoriePoidsEspece;
return $this;
}
public function getAnimal(): ?Animal
{
return $this->animal;
}
public function setAnimal(?Animal $animal): self
{
$this->animal = $animal;
return $this;
}
public function getAppel(): ?Appel
{
return $this->appel;
}
public function setAppel(?Appel $appel): self
{
$this->appel = $appel;
return $this;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAtValue()
{
$this->dateCreation = new \DateTimeImmutable();
}
}