src/Entity/Localisation/SecteurGeographique.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Localisation;
  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.  * SecteurGeographique
  10.  *
  11.  * @ORM\Table(name="localisation__secteur_geographique")
  12.  * @ORM\Entity(repositoryClass="App\Repository\Localisation\SecteurGeographiqueRepository")
  13.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  14.  * @SecuredEntity(name="Secteur GĂ©ographique", group="REGLAGES")
  15.  */
  16. class SecteurGeographique
  17. {
  18.     /**
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     
  25.     /**
  26.      * @ORM\OneToMany(targetEntity="App\Entity\Utilisateur\UtilisateurZoneGeographique", mappedBy="secteurGeographique")
  27.      */
  28.     private $utilisateurSecteurGeographique;
  29.     /**
  30.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  31.      * @Assert\NotBlank(message="LibellĂ© obligatoire")     
  32.      */
  33.     private $libelle;
  34.     /**
  35.      * @ORM\Column(name="date", type="datetime", nullable=true)
  36.      */
  37.     private $date;
  38.     /**
  39.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  40.      * @Gedmo\Timestampable(on="update")     
  41.      */
  42.     private $dateMaj;
  43.     /**
  44.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  45.      */
  46.     private $dateSuppression;
  47.     
  48.     
  49.     public function __construct()
  50.     {
  51.         $this->date = new Datetime();
  52.     }      
  53.     public function __toString() {
  54.         return $this->libelle;
  55.     }
  56.     public function getId(): int
  57.     {
  58.         return $this->id;
  59.     }
  60.     public function setLibelle(?string $libelle): SecteurGeographique
  61.     {
  62.         $this->libelle $libelle;
  63.         return $this;
  64.     }
  65.     public function getLibelle(): ?string
  66.     {
  67.         return $this->libelle;
  68.     }
  69.     public function setDate(?DateTime $date): SecteurGeographique
  70.     {
  71.         $this->date $date;
  72.         return $this;
  73.     }
  74.     public function getDate(): ?DateTime
  75.     {
  76.         return $this->date;
  77.     }
  78.     public function setDateMaj(?DateTime $dateMaj): SecteurGeographique
  79.     {
  80.         $this->dateMaj $dateMaj;
  81.         return $this;
  82.     }
  83.     public function getDateMaj(): ?DateTime
  84.     {
  85.         return $this->dateMaj;
  86.     }
  87.     public function setDateSuppression(?DateTime $dateSuppression): SecteurGeographique
  88.     {
  89.         $this->dateSuppression $dateSuppression;
  90.         return $this;
  91.     }
  92.     public function getDateSuppression(): ?DateTime
  93.     {
  94.         return $this->dateSuppression;
  95.     }
  96. }