src/Entity/GestionComerciale/RaisonAnomalie.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\GestionComerciale;
  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 Symfony\Component\Validator\ExecutionContextInterface;
  8. use App\Annotations\SecuredEntity;
  9. /**
  10.  * RaisonAnomalie
  11.  *
  12.  * @ORM\Table("commerciale__raison_anomalie")
  13.  * @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\RaisonAnomalieRepository")
  14.  * @SecuredEntity(name="Raison d'anomalie", group="REGLAGES")
  15.  */
  16. class RaisonAnomalie
  17. {
  18.     /**
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  26.      * @Assert\NotBlank(message="Le libellĂ© est obligatoire")
  27.      */
  28.     private $libelle;
  29.     /**
  30.      * @ORM\Column(name="date", type="datetime", nullable=true)
  31.      */
  32.     private $date;
  33.     /**
  34.      * @ORM\Column(name="couleur", type="string", length=255, nullable=true)
  35.      */
  36.     private $couleur;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     private $type;
  41.     public function __construct()
  42.     {
  43.       $this->date = new Datetime();
  44.     }
  45.     public function getId(): int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function setLibelle(?string $libelle): RaisonAnomalie
  50.     {
  51.         $this->libelle $libelle;
  52.         return $this;
  53.     }
  54.     public function getLibelle(): ?string
  55.     {
  56.         return $this->libelle;
  57.     }
  58.     public function setDate(?DateTime $date): RaisonAnomalie
  59.     {
  60.         $this->date $date;
  61.         return $this;
  62.     }
  63.     public function getDate(): ?DateTime
  64.     {
  65.         return $this->date;
  66.     }
  67.     public function setCouleur(?string $couleur): RaisonAnomalie
  68.     {
  69.         $this->couleur $couleur;
  70.         return $this;
  71.     }
  72.     public function getCouleur(): ?string
  73.     {
  74.         return $this->couleur;
  75.     }
  76.     public function getType(): ?string
  77.     {
  78.         return $this->type;
  79.     }
  80.     public function setType(?string $type): self
  81.     {
  82.         $this->type $type;
  83.         return $this;
  84.     }
  85. }