<?php
namespace App\Entity\Vetoadom;
use Doctrine\ORM\Mapping as ORM;
/**
* SecteurConsigne
*
* @ORM\Table(name="secteur_consigne", indexes={@ORM\Index(name="FK_secteur_consigne_secteur", columns={"secteur_id"}), @ORM\Index(name="FK_secteur_consigne_secteur_consigne_type", columns={"secteur_consigne_type_id"})})
* @ORM\Entity(repositoryClass="App\Repository\Vetoadom\SecteurConsigneRepository")
* @ORM\HasLifecycleCallbacks()
*/
class SecteurConsigne
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var int
*
* @ORM\Column(name="saisie_user_id", type="integer", nullable=false)
*/
private $saisieUserId;
/**
* @var int|null
*
* @ORM\Column(name="suppression_user_id", type="integer", nullable=true)
*/
private $suppressionUserId;
/**
* @var string
*
* @ORM\Column(name="consigne", type="text", length=65535, nullable=false)
*/
private $consigne;
/**
* @var \DateTime
*
* @ORM\Column(name="date_debut", type="datetime", nullable=false)
*/
private $dateDebut;
/**
* @var \DateTime
*
* @ORM\Column(name="date_fin", type="datetime", nullable=false)
*/
private $dateFin;
/**
* @var \DateTime|null
*
* @ORM\Column(name="date_suppression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @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="secteurConsigne")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="secteur_id", referencedColumnName="id")
* })
*/
private $secteur;
/**
* @var \SecteurConsigneType
*
* @ORM\ManyToOne(targetEntity="SecteurConsigneType")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="secteur_consigne_type_id", referencedColumnName="id")
* })
*/
private $secteurConsigneType;
public function getId(): ?int
{
return $this->id;
}
public function getConsigne(): ?string
{
return $this->consigne;
}
public function setConsigne(string $consigne): self
{
$this->consigne = $consigne;
return $this;
}
public function getSaisieUserId(): ?int
{
return $this->saisieUserId;
}
public function setSaisieUserId(?int $saisieUserId): self
{
$this->saisieUserId = $saisieUserId;
return $this;
}
public function getSuppressionUserId(): ?int
{
return $this->suppressionUserId;
}
public function setSuppressionUserId(?int $suppressionUserId): self
{
$this->suppressionUserId = $suppressionUserId;
return $this;
}
public function getDateDebut(): ?\DateTimeInterface
{
return $this->dateDebut;
}
public function setDateDebut(\DateTimeInterface $dateDebut): self
{
$this->dateDebut = $dateDebut;
return $this;
}
public function getDateFin(): ?\DateTimeInterface
{
return $this->dateFin;
}
public function setDateFin(\DateTimeInterface $dateFin): self
{
$this->dateFin = $dateFin;
return $this;
}
public function getDateSuppression(): ?\DateTimeInterface
{
return $this->dateSuppression;
}
public function setDateSuppression(?\DateTimeInterface $dateSuppression): self
{
$this->dateSuppression = $dateSuppression;
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 getSecteurConsigneType(): ?SecteurConsigneType
{
return $this->secteurConsigneType;
}
public function setSecteurConsigneType(?SecteurConsigneType $secteurConsigneType): self
{
$this->secteurConsigneType = $secteurConsigneType;
return $this;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAtValue()
{
$this->dateCreation = new \DateTimeImmutable();
}
}