src/Entity/FO/TacheCron.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\FO;
  3. use App\Entity\Clients\Client;
  4. use App\Entity\Utilisateur\Utilisateur;
  5. use DateTime;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. use Symfony\Component\Validator\ExecutionContextInterface;
  12. use App\Annotations\SecuredEntity;
  13. /**
  14.  * TacheCron
  15.  *
  16.  * @ORM\Table("cron__tache_cron")
  17.  * @ORM\Entity(repositoryClass="App\Repository\FO\TacheCronRepository")
  18.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  19.  * @SecuredEntity (name="Tâche Cron", group="REGLAGES")
  20.  */
  21. class TacheCron
  22. {
  23.     /**
  24.      * @ORM\Column(name="id", type="integer")
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="AUTO")
  27.      */
  28.     private $id;
  29.     
  30.     /**
  31.      * @ORM\OneToMany(targetEntity="App\Entity\FO\Cron", mappedBy="tacheCron")
  32.      */
  33.     private $crons;
  34.     
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="tacheCron")
  37.      * @ORM\JoinColumn(nullable=true)
  38.      */
  39.     private $utilisateur;
  40.     /**
  41.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  42.      * @Assert\NotBlank(message="Libellé obligatoire")     
  43.      */
  44.     private $libelle;
  45.     /**
  46.      * @ORM\Column(name="frequence", type="integer", nullable=true)
  47.      */
  48.     private $frequence;
  49.     
  50.     /**
  51.      * @ORM\Column(name="statut", type="boolean", nullable=true)
  52.      */
  53.     private $statut;
  54.     /**
  55.      * @ORM\Column(name="date", type="datetime", nullable=true)
  56.      */
  57.     private $date;
  58.     /**
  59.      * @ORM\Column(name="date_suppression", type="datetime", nullable=true)
  60.      */
  61.     private $dateSuppression;
  62.     /**
  63.      * @ORM\Column(name="date_maj", type="datetime", nullable=true)
  64.      * @Gedmo\Timestampable(on="update")     
  65.      */
  66.     private $dateMaj;
  67.     /**
  68.      * @ORM\Column(name="commande", type="string", length=255, nullable=true)
  69.      */
  70.     private $commande;
  71.     /**
  72.      * @ORM\Column(name="description", type="text", nullable=true)
  73.      */
  74.     private $description;
  75.     public function __construct()
  76.                 {
  77.                     $this->date  = new Datetime();
  78.                     $this->crons = new ArrayCollection();
  79.                 }
  80.     public function getId(): int
  81.     {
  82.         return $this->id;
  83.     }
  84.     public function setLibelle(?string $libelle): TacheCron
  85.     {
  86.         $this->libelle $libelle;
  87.         return $this;
  88.     }
  89.     public function getLibelle(): ?string
  90.     {
  91.         return $this->libelle;
  92.     }
  93.     public function setDate(?DateTime $date): TacheCron
  94.     {
  95.         $this->date $date;
  96.         return $this;
  97.     }
  98.     public function getDate(): ?DateTime
  99.     {
  100.         return $this->date;
  101.     }
  102.     public function setDateSuppression(?DateTime $dateSuppression): TacheCron
  103.     {
  104.         $this->dateSuppression $dateSuppression;
  105.         return $this;
  106.     }
  107.     public function getDateSuppression(): ?DateTime
  108.     {
  109.         return $this->dateSuppression;
  110.     }
  111.     public function setDateMaj(?DateTime $dateMaj): TacheCron
  112.     {
  113.         $this->dateMaj $dateMaj;
  114.         return $this;
  115.     }
  116.     public function getDateMaj(): ?DateTime
  117.     {
  118.         return $this->dateMaj;
  119.     }
  120.     public function setCommande(?string $commande): TacheCron
  121.     {
  122.         $this->commande $commande;
  123.         return $this;
  124.     }
  125.     public function getCommande(): ?string
  126.     {
  127.         return $this->commande;
  128.     }
  129.     public function setDescription(?string $description): TacheCron
  130.     {
  131.         $this->description $description;
  132.         return $this;
  133.     }
  134.     public function getDescription(): ?string
  135.     {
  136.         return $this->description;
  137.     }
  138.     public function setUtilisateur(?Utilisateur $utilisateur): TacheCron
  139.     {
  140.         $this->utilisateur $utilisateur;
  141.         return $this;
  142.     }
  143.     public function getUtilisateur(): ?Utilisateur
  144.     {
  145.         return $this->utilisateur;
  146.     }
  147.     public function addCron(Cron $crons): TacheCron
  148.     {
  149.         $this->crons[] = $crons;
  150.         return $this;
  151.     }
  152.     public function removeCron(Cron $crons)
  153.     {
  154.         $this->crons->removeElement($crons);
  155.     }
  156.     public function getCrons(): Collection
  157.     {
  158.         return $this->crons;
  159.     }
  160.     public function setFrequence(?int $frequence): TacheCron
  161.     {
  162.         $this->frequence $frequence;
  163.         return $this;
  164.     }
  165.     public function getFrequence(): ?int
  166.     {
  167.         return $this->frequence;
  168.     }
  169.     public function setStatut(?bool $statut): TacheCron
  170.     {
  171.         $this->statut $statut;
  172.         return $this;
  173.     }
  174.     public function getStatut(): ?bool
  175.     {
  176.         return $this->statut;
  177.     }
  178.     public function isStatut(): ?bool
  179.     {
  180.         return $this->statut;
  181.     }
  182. }