src/Entity/Clients/Classification.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Clients;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * Classification
  9.  *
  10.  * @ORM\Table("client__classification")
  11.  * @ORM\Entity(repositoryClass="App\Repository\Clients\ClassificationRepository")
  12.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false) 
  13.  */
  14. class Classification
  15. {
  16.     /**
  17.      * @ORM\Column(name="id", type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  24.      * @Assert\NotBlank(message="LibellĂ© obligatoire")
  25.      
  26.      */
  27.     private $libelle;
  28.     /**
  29.      * @ORM\Column(name="date", type="datetime", nullable=true)
  30.      */
  31.     private $date;
  32.     /**
  33.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  34.      * @Gedmo\Timestampable(on="update")     
  35.      */
  36.     private $dateMaj;
  37.     /**
  38.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  39.      */
  40.     private $dateSuppression;
  41.     public function __construct()
  42.     {
  43.         $this->date = new Datetime();
  44.     }
  45.     public function getId(): int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function setLibelle(?string $libelle): Classification
  50.     {
  51.         $this->libelle $libelle;
  52.         return $this;
  53.     }
  54.     public function getLibelle(): ?string
  55.     {
  56.         return $this->libelle;
  57.     }
  58.     public function setDate(?DateTime $date): Classification
  59.     {
  60.         $this->date $date;
  61.         return $this;
  62.     }
  63.     public function getDate(): ?DateTime
  64.     {
  65.         return $this->date;
  66.     }
  67.     public function setDateMaj(?DateTime $dateMaj): Classification
  68.     {
  69.         $this->dateMaj $dateMaj;
  70.         return $this;
  71.     }
  72.     public function getDateMaj(): ?DateTime
  73.     {
  74.         return $this->dateMaj;
  75.     }
  76.     public function setDateSuppression(?DateTime $dateSuppression): Classification
  77.     {
  78.         $this->dateSuppression $dateSuppression;
  79.         return $this;
  80.     }
  81.     public function getDateSuppression(): ?DateTime
  82.     {
  83.         return $this->dateSuppression;
  84.     }
  85.     
  86.     public function __toString() {
  87.         return $this->libelle;
  88.     }    
  89.     
  90. }