src/Entity/Notes/Categorie.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Notes;
  3. use App\Entity\Utilisateur\Utilisateur;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use App\Annotations\SecuredEntity;
  9. /**
  10.  * Categorie
  11.  *
  12.  * @ORM\Table("note__categorie")
  13.  * @ORM\Entity(repositoryClass="App\Repository\Notes\CategorieRepository")
  14.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  15.  * @SecuredEntity(name="Catégorie de Note", group="OUTILS")
  16.  */
  17. class Categorie
  18. {
  19.     /**
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     private $id;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="categorieNote")
  27.      * @ORM\JoinColumn(nullable=true)
  28.      */
  29.     private $utilisateur;
  30.     /**
  31.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  32.      */
  33.     private $libelle;
  34.     /**
  35.      * @ORM\Column(name="couleur", type="string", length=255, nullable=true)
  36.      */
  37.     private $couleur;
  38.     /**
  39.      * @ORM\Column(name="icone", type="string", length=255, nullable=true)
  40.      */
  41.     private $icone;
  42.     /**
  43.      * @ORM\Column(name="temps", type="integer", length=255, nullable=true)
  44.      */
  45.     private $temps;
  46.     /**
  47.      * @ORM\Column(name="visible_agenda", type="boolean", nullable=true, options={"default": true})
  48.      */
  49.     private $visibleAgenda;    
  50.     /**
  51.      * @ORM\Column(name="date", type="datetime", nullable=true)
  52.      */
  53.     private $date;
  54.     /**
  55.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  56.      */
  57.     private $dateSuppression;
  58.     public function __construct()
  59.     {
  60.         $this->date = new Datetime();
  61.     }
  62.     public function __toString() {
  63.         return $this->libelle;
  64.     }
  65.     public function getId(): int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function setLibelle(?string $libelle): Categorie
  70.     {
  71.         $this->libelle $libelle;
  72.         return $this;
  73.     }
  74.     public function getLibelle(): ?string
  75.     {
  76.         return $this->libelle;
  77.     }
  78.     public function setCouleur(?string $couleur): Categorie
  79.     {
  80.         $this->couleur $couleur;
  81.         return $this;
  82.     }
  83.     public function getCouleur(): ?string
  84.     {
  85.         return $this->couleur;
  86.     }
  87.     public function setDate(?DateTime $date): Categorie
  88.     {
  89.         $this->date $date;
  90.         return $this;
  91.     }
  92.     public function getDate(): ?DateTime
  93.     {
  94.         return $this->date;
  95.     }
  96.     public function setDateSuppression(?DateTime $dateSuppression): Categorie
  97.     {
  98.         $this->dateSuppression $dateSuppression;
  99.         return $this;
  100.     }
  101.     public function getDateSuppression(): ?DateTime
  102.     {
  103.         return $this->dateSuppression;
  104.     }
  105.     public function setUtilisateur(?Utilisateur $utilisateur): Categorie
  106.     {
  107.         $this->utilisateur $utilisateur;
  108.         return $this;
  109.     }
  110.     public function getUtilisateur(): ?Utilisateur
  111.     {
  112.         return $this->utilisateur;
  113.     }
  114.     public function setIcone(?string $icone): Categorie
  115.     {
  116.         $this->icone $icone;
  117.         return $this;
  118.     }
  119.     public function getIcone(): ?string
  120.     {
  121.         return $this->icone;
  122.     }
  123.     public function setTemps($temps): int
  124.     {
  125.         $this->temps $temps;
  126.         return $temps;
  127.     }
  128.     public function getTemps(): ?string
  129.     {
  130.         return $this->temps;
  131.     }
  132.     public function setVisibleAgenda(?bool $visibleAgenda): Categorie
  133.     {
  134.         $this->visibleAgenda $visibleAgenda;
  135.         return $this;
  136.     }
  137.     public function getVisibleAgenda(): ?bool
  138.     {
  139.         return $this->visibleAgenda;
  140.     }
  141. }