src/Entity/Clients/Origine.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.  * Origine
  9.  *
  10.  * @ORM\Table("client__origine")
  11.  * @ORM\Entity(repositoryClass="App\Repository\Clients\OrigineRepository")
  12.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false) 
  13.  */
  14. class Origine
  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="date", type="datetime", nullable=true)
  24.      */
  25.     private $date;
  26.     /**
  27.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  28.      * @Assert\NotBlank(message="LibellĂ© obligatoire")     
  29.      */
  30.     private $libelle;
  31.     
  32.     /**
  33.      * @ORM\Column(name="date_maj", type="datetime", nullable=true)
  34.      * @Gedmo\Timestampable(on="update")
  35.      */
  36.     private $dateMaj;
  37.     
  38.     /**
  39.      * @ORM\Column(name="date_supression", type="datetime", nullable=true)
  40.      */
  41.     private $dateSuppression;        
  42.     
  43.     
  44.     public function __construct()
  45.     {
  46.         $this->date = new Datetime();
  47.     }    
  48.     public function getId(): int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function setDate(?DateTime $date): Origine
  53.     {
  54.         $this->date $date;
  55.         return $this;
  56.     }
  57.     public function getDate(): ?DateTime
  58.     {
  59.         return $this->date;
  60.     }
  61.     public function setLibelle(?string $libelle): Origine
  62.     {
  63.         $this->libelle $libelle;
  64.         return $this;
  65.     }
  66.     public function getLibelle(): ?string
  67.     {
  68.         return $this->libelle;
  69.     }
  70.     public function setDateSuppression(?DateTime $dateSuppression): Origine
  71.     {
  72.         $this->dateSuppression $dateSuppression;
  73.         return $this;
  74.     }
  75.     public function getDateSuppression(): ?DateTime
  76.     {
  77.         return $this->dateSuppression;
  78.     }
  79.     public function setDateMaj(?DateTime $dateMaj): Origine
  80.     {
  81.         $this->dateMaj $dateMaj;
  82.         return $this;
  83.     }
  84.     public function getDateMaj(): ?DateTime
  85.     {
  86.         return $this->dateMaj;
  87.     }
  88.     
  89.     public function __toString() {
  90.         return $this->libelle;
  91.     }
  92. }