<?php
namespace App\Entity\Articles;
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;
/**
* RaisonMouvementStock
*
* @ORM\Table("article__raison_mouvement_stock")
* @ORM\Entity(repositoryClass="App\Repository\Articles\RaisonMouvementStockRepository")
* @SecuredEntity(name="Raison mouvement de stock", group="ARTICLES")
*/
class RaisonMouvementStock
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="raisonMouvementStock")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\Column(name="libelle", type="string", length=255, nullable=true)
* @Assert\NotBlank(message="Libellé obligatoire")
*/
private $libelle;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="action", type="string", length=255, nullable=true)
*/
private $action;
/**
* @ORM\Column(name="type_regulation", type="boolean", nullable=true)
*/
private $typeRegulation;
public function __construct()
{
$this->date = new Datetime();
}
public function getId(): int
{
return $this->id;
}
public function setLibelle(?string $libelle): RaisonMouvementStock
{
$this->libelle = $libelle;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setDate(?DateTime $date): RaisonMouvementStock
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setAction(?string $action): RaisonMouvementStock
{
$this->action = $action;
return $this;
}
public function getAction(): ?string
{
return $this->action;
}
public function __toString() {
return $this->libelle;
}
public function setUtilisateur(?Utilisateur $utilisateur): RaisonMouvementStock
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function setTypeRegulation(?bool $typeRegulation): RaisonMouvementStock
{
$this->typeRegulation = $typeRegulation;
return $this;
}
public function getTypeRegulation(): ?bool
{
return $this->typeRegulation;
}
}