<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use JMS\Serializer\Annotation as Serializer;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="walkinn_dossier_etat")
* @ORM\Entity(repositoryClass="App\Repository\DossierEtatRepository")
* @Serializer\ExclusionPolicy("all")
*/
class DossierEtat
{
use \App\Traits\Timestampable;
use \App\Traits\Blameable;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $libelle;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $icone;
/**
*
* @ORM\Column(name="color", type="string", length=255, nullable=true)
*/
private $color;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $actif = 1;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Dossier", mappedBy="dossierEtat")
*/
private $dossiers;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isValide;
public function __construct()
{
$this->dossiers = new ArrayCollection();
}
public function __toString()
{
return $this->libelle;
}
public function getId(): ?int
{
return $this->id;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setLibelle(?string $libelle): self
{
$this->libelle = $libelle;
return $this;
}
public function getIcone(): ?string
{
return $this->icone;
}
public function setIcone(?string $icone): self
{
$this->icone = $icone;
return $this;
}
public function getActif(): ?bool
{
return $this->actif;
}
public function setActif(?bool $actif): self
{
$this->actif = $actif;
return $this;
}
/**
* @return Collection|Dossier[]
*/
public function getDossiers(): Collection
{
return $this->dossiers;
}
public function addDossier(Dossier $dossier): self
{
if (!$this->dossiers->contains($dossier)) {
$this->dossiers[] = $dossier;
$dossier->setDossierEtat($this);
}
return $this;
}
public function removeDossier(Dossier $dossier): self
{
if ($this->dossiers->contains($dossier)) {
$this->dossiers->removeElement($dossier);
// set the owning side to null (unless already changed)
if ($dossier->getDossierEtat() === $this) {
$dossier->setDossierEtat(null);
}
}
return $this;
}
public function getColor(): ?string
{
return $this->color;
}
public function setColor(?string $color): self
{
$this->color = $color;
return $this;
}
public function getIsValide(): ?bool
{
return $this->isValide;
}
public function setIsValide(?bool $isValide): self
{
$this->isValide = $isValide;
return $this;
}
}