src/Entity/Articles/RaisonMouvementStock.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Articles;
  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.  * RaisonMouvementStock
  11.  *
  12.  * @ORM\Table("article__raison_mouvement_stock") 
  13.  * @ORM\Entity(repositoryClass="App\Repository\Articles\RaisonMouvementStockRepository")
  14.  * @SecuredEntity(name="Raison mouvement de stock", group="ARTICLES")
  15.  */
  16. class RaisonMouvementStock
  17. {
  18.     /**
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="raisonMouvementStock")
  26.      * @ORM\JoinColumn(nullable=true)
  27.      */
  28.     private $utilisateur;
  29.     
  30.     /**
  31.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  32.      * @Assert\NotBlank(message="LibellĂ© obligatoire")
  33.      */
  34.     private $libelle;
  35.     /**
  36.      * @ORM\Column(name="date", type="datetime", nullable=true)
  37.      */
  38.     private $date
  39.     /**
  40.      * @ORM\Column(name="action", type="string", length=255, nullable=true)
  41.      */
  42.     private $action;
  43.     
  44.     /**
  45.      * @ORM\Column(name="type_regulation", type="boolean", nullable=true)
  46.      */
  47.     private $typeRegulation;
  48.     public function __construct()
  49.     {
  50.         $this->date = new Datetime();
  51.     }
  52.     public function getId(): int
  53.     {
  54.         return $this->id;
  55.     }
  56.     public function setLibelle(?string $libelle): RaisonMouvementStock
  57.     {
  58.         $this->libelle $libelle;
  59.         return $this;
  60.     }
  61.     public function getLibelle(): ?string
  62.     {
  63.         return $this->libelle;
  64.     }
  65.     public function setDate(?DateTime $date): RaisonMouvementStock
  66.     {
  67.         $this->date $date;
  68.         return $this;
  69.     }
  70.     public function getDate(): ?DateTime
  71.     {
  72.         return $this->date;
  73.     }
  74.     public function setAction(?string $action): RaisonMouvementStock
  75.     {
  76.         $this->action $action;
  77.         return $this;
  78.     }
  79.     public function getAction(): ?string
  80.     {
  81.         return $this->action;
  82.     }
  83.     
  84.     public function __toString() {
  85.         return $this->libelle;
  86.     }
  87.     public function setUtilisateur(?Utilisateur $utilisateur): RaisonMouvementStock
  88.     {
  89.         $this->utilisateur $utilisateur;
  90.         return $this;
  91.     }
  92.     public function getUtilisateur(): ?Utilisateur
  93.     {
  94.         return $this->utilisateur;
  95.     }
  96.     public function setTypeRegulation(?bool $typeRegulation): RaisonMouvementStock
  97.     {
  98.         $this->typeRegulation $typeRegulation;
  99.         return $this;
  100.     }
  101.     public function getTypeRegulation(): ?bool
  102.     {
  103.         return $this->typeRegulation;
  104.     }
  105. }