src/Entity/Vetoadom/SecteurCategoriePoidsEspece.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Vetoadom;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * SecteurCategoriePoidsEspece
  7.  *
  8.  * @ORM\Table(name="secteur_categorie_poids_espece", indexes={@ORM\Index(name="FK_secteur_categorie_poids_espece_secteur", columns={"secteur_id"}), @ORM\Index(name="FK_secteur_categorie_poids_espece_secteur_espece", columns={"secteur_espece_id"})})
  9.  * @ORM\Entity(repositoryClass="App\Repository\Vetoadom\SecteurCategoriePoidsEspeceRepository")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  */
  12. class SecteurCategoriePoidsEspece
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer", nullable=false)
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="IDENTITY")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string|null
  24.      *
  25.      * @ORM\Column(name="min", type="decimal", precision=10, scale=2, nullable=true)
  26.      * @Assert\NotBlank(
  27.      *       groups={"min"},
  28.      *       message="common.blank"
  29.      *    )
  30.      */
  31.     private $min;
  32.     /**
  33.      * @var string|null
  34.      *
  35.      * @ORM\Column(name="max", type="decimal", precision=10, scale=2, nullable=true)
  36.      * @Assert\NotBlank(
  37.      *       groups={"max"},
  38.      *       message="common.blank"
  39.      *    )
  40.      */
  41.     private $max;
  42.     /**
  43.      * @var \DateTime
  44.      *
  45.      * @ORM\Column(name="date_creation", type="datetime", nullable=false)
  46.      */
  47.     private $dateCreation;
  48.     /**
  49.      * @var \DateTime
  50.      *
  51.      * @ORM\Column(name="date_modification", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP"})
  52.      */
  53.     private $dateModification;
  54.     /**
  55.      * @var \Secteur
  56.      *
  57.      * @ORM\ManyToOne(targetEntity="Secteur", inversedBy="secteurCategoriePoidsEspece")
  58.      * @ORM\JoinColumns({
  59.      *   @ORM\JoinColumn(name="secteur_id", referencedColumnName="id")
  60.      * })
  61.      */
  62.     private $secteur;
  63.     /**
  64.      * @var \SecteurEspece
  65.      *
  66.      * @ORM\ManyToOne(targetEntity="SecteurEspece")
  67.      * @ORM\JoinColumns({
  68.      *   @ORM\JoinColumn(name="secteur_espece_id", referencedColumnName="id")
  69.      * })
  70.      */
  71.     private $secteurEspece;
  72.     public function getId(): ?int
  73.     {
  74.         return $this->id;
  75.     }
  76.     public function getMin(): ?string
  77.     {
  78.         return $this->min;
  79.     }
  80.     public function setMin(?string $min): self
  81.     {
  82.         $this->min $min;
  83.         return $this;
  84.     }
  85.     public function getMax(): ?string
  86.     {
  87.         return $this->max;
  88.     }
  89.     public function setMax(?string $max): self
  90.     {
  91.         $this->max $max;
  92.         return $this;
  93.     }
  94.     public function getDateCreation(): ?\DateTimeInterface
  95.     {
  96.         return $this->dateCreation;
  97.     }
  98.     public function setDateCreation(\DateTimeInterface $dateCreation): self
  99.     {
  100.         $this->dateCreation $dateCreation;
  101.         return $this;
  102.     }
  103.     public function getDateModification(): ?\DateTimeInterface
  104.     {
  105.         return $this->dateModification;
  106.     }
  107.     public function setDateModification(\DateTimeInterface $dateModification): self
  108.     {
  109.         $this->dateModification $dateModification;
  110.         return $this;
  111.     }
  112.     public function getSecteur(): ?Secteur
  113.     {
  114.         return $this->secteur;
  115.     }
  116.     public function setSecteur(?Secteur $secteur): self
  117.     {
  118.         $this->secteur $secteur;
  119.         return $this;
  120.     }
  121.     public function getSecteurEspece(): ?SecteurEspece
  122.     {
  123.         return $this->secteurEspece;
  124.     }
  125.     public function setSecteurEspece(?SecteurEspece $secteurEspece): self
  126.     {
  127.         $this->secteurEspece $secteurEspece;
  128.         return $this;
  129.     }
  130.     /**
  131.      * @ORM\PrePersist
  132.      */
  133.     public function setCreatedAtValue()
  134.     {
  135.         $this->dateCreation = new \DateTimeImmutable();
  136.     }
  137. }