<?php
namespace App\Entity\Vetoadom;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* SecteurCategoriePoidsEspece
*
* @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"})})
* @ORM\Entity(repositoryClass="App\Repository\Vetoadom\SecteurCategoriePoidsEspeceRepository")
* @ORM\HasLifecycleCallbacks()
*/
class SecteurCategoriePoidsEspece
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string|null
*
* @ORM\Column(name="min", type="decimal", precision=10, scale=2, nullable=true)
* @Assert\NotBlank(
* groups={"min"},
* message="common.blank"
* )
*/
private $min;
/**
* @var string|null
*
* @ORM\Column(name="max", type="decimal", precision=10, scale=2, nullable=true)
* @Assert\NotBlank(
* groups={"max"},
* message="common.blank"
* )
*/
private $max;
/**
* @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 \Secteur
*
* @ORM\ManyToOne(targetEntity="Secteur", inversedBy="secteurCategoriePoidsEspece")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="secteur_id", referencedColumnName="id")
* })
*/
private $secteur;
/**
* @var \SecteurEspece
*
* @ORM\ManyToOne(targetEntity="SecteurEspece")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="secteur_espece_id", referencedColumnName="id")
* })
*/
private $secteurEspece;
public function getId(): ?int
{
return $this->id;
}
public function getMin(): ?string
{
return $this->min;
}
public function setMin(?string $min): self
{
$this->min = $min;
return $this;
}
public function getMax(): ?string
{
return $this->max;
}
public function setMax(?string $max): self
{
$this->max = $max;
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 getSecteur(): ?Secteur
{
return $this->secteur;
}
public function setSecteur(?Secteur $secteur): self
{
$this->secteur = $secteur;
return $this;
}
public function getSecteurEspece(): ?SecteurEspece
{
return $this->secteurEspece;
}
public function setSecteurEspece(?SecteurEspece $secteurEspece): self
{
$this->secteurEspece = $secteurEspece;
return $this;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAtValue()
{
$this->dateCreation = new \DateTimeImmutable();
}
}