src/Entity/Utilisateur/Civilite.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Utilisateur;
  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. use App\Annotations\SecuredEntity;
  8. /**
  9.  * Civilite
  10.  *
  11.  * @ORM\Table("utilisateur__civilite")
  12.  * @ORM\Entity(repositoryClass="App\Repository\Utilisateur\CiviliteRepository")
  13.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  14.  * @SecuredEntity(name="Civilité", group="REGLAGES")
  15.  */
  16. class Civilite
  17. {
  18.     /**
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  26.      * @Assert\NotBlank(message="Libellé obligatoire")      
  27.      */
  28.     private $libelle;
  29.     /**
  30.      * @ORM\Column(name="date", type="datetime", nullable=true)
  31.      */
  32.     private $date;
  33.     /**
  34.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  35.      */
  36.     private $dateSuppression;
  37.     public function __construct()
  38.     {
  39.         $this->date = new Datetime();
  40.         
  41.     }
  42.     public function getId(): int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function setLibelle(?string $libelle): Civilite
  47.     {
  48.         $this->libelle $libelle;
  49.         return $this;
  50.     }
  51.     public function getLibelle(): ?string
  52.     {
  53.         return $this->libelle;
  54.     }
  55.     public function setDate(?DateTime $date): Civilite
  56.     {
  57.         $this->date $date;
  58.         return $this;
  59.     }
  60.     public function getDate(): ?DateTime
  61.     {
  62.         return $this->date;
  63.     }
  64.     public function setDateSuppression(?DateTime $dateSuppression): Civilite
  65.     {
  66.         $this->dateSuppression $dateSuppression;
  67.         return $this;
  68.     }
  69.     public function getDateSuppression(): ?DateTime
  70.     {
  71.         return $this->dateSuppression;
  72.     }
  73.     
  74.     public function __toString() {
  75.         return $this->libelle;
  76.     }    
  77.     
  78. }