<?php
namespace App\Entity\GestionComerciale;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\ExecutionContextInterface;
use App\Annotations\SecuredEntity;
/**
* RaisonAnomalie
*
* @ORM\Table("commerciale__raison_anomalie")
* @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\RaisonAnomalieRepository")
* @SecuredEntity(name="Raison d'anomalie", group="REGLAGES")
*/
class RaisonAnomalie
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="libelle", type="string", length=255, nullable=true)
* @Assert\NotBlank(message="Le libellé est obligatoire")
*/
private $libelle;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="couleur", type="string", length=255, nullable=true)
*/
private $couleur;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $type;
public function __construct()
{
$this->date = new Datetime();
}
public function getId(): int
{
return $this->id;
}
public function setLibelle(?string $libelle): RaisonAnomalie
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setDate(?DateTime $date): RaisonAnomalie
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setCouleur(?string $couleur): RaisonAnomalie
{
$this->couleur = $couleur;
return $this;
}
public function getCouleur(): ?string
{
return $this->couleur;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
}