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