<?php
namespace App\Entity\Notes;
use App\Entity\Utilisateur\Utilisateur;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use App\Annotations\SecuredEntity;
/**
* Categorie
*
* @ORM\Table("note__categorie")
* @ORM\Entity(repositoryClass="App\Repository\Notes\CategorieRepository")
* @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
* @SecuredEntity(name="Catégorie de Note", group="OUTILS")
*/
class Categorie
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="categorieNote")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\Column(name="libelle", type="string", length=255, nullable=true)
*/
private $libelle;
/**
* @ORM\Column(name="couleur", type="string", length=255, nullable=true)
*/
private $couleur;
/**
* @ORM\Column(name="icone", type="string", length=255, nullable=true)
*/
private $icone;
/**
* @ORM\Column(name="temps", type="integer", length=255, nullable=true)
*/
private $temps;
/**
* @ORM\Column(name="visible_agenda", type="boolean", nullable=true, options={"default": true})
*/
private $visibleAgenda;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
*/
private $dateSuppression;
public function __construct()
{
$this->date = new Datetime();
}
public function __toString() {
return $this->libelle;
}
public function getId(): int
{
return $this->id;
}
public function setLibelle(?string $libelle): Categorie
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setCouleur(?string $couleur): Categorie
{
$this->couleur = $couleur;
return $this;
}
public function getCouleur(): ?string
{
return $this->couleur;
}
public function setDate(?DateTime $date): Categorie
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setDateSuppression(?DateTime $dateSuppression): Categorie
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setUtilisateur(?Utilisateur $utilisateur): Categorie
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function setIcone(?string $icone): Categorie
{
$this->icone = $icone;
return $this;
}
public function getIcone(): ?string
{
return $this->icone;
}
public function setTemps($temps): int
{
$this->temps = $temps;
return $temps;
}
public function getTemps(): ?string
{
return $this->temps;
}
public function setVisibleAgenda(?bool $visibleAgenda): Categorie
{
$this->visibleAgenda = $visibleAgenda;
return $this;
}
public function getVisibleAgenda(): ?bool
{
return $this->visibleAgenda;
}
}