src/Entity/GestionComerciale/TypeMouvementCaisse.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\Entity\GestionComerciale;
  3. use App\Entity\Utilisateur\Utilisateur;
  4. use DateTime;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. use Symfony\Component\Validator\ExecutionContextInterface;
  11. use App\Annotations\SecuredEntity;
  12. /**
  13.  * TypeMouvementCaisse
  14.  *
  15.  * @ORM\Table("commerciale__type_mouvement_caisse")
  16.  * @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\TypeMouvementCaisseRepository")
  17.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  18.  * @SecuredEntity(name="Type de Mouvement de Caisse", group="REGLAGES")
  19.  */
  20. class TypeMouvementCaisse
  21. {
  22.     /**
  23.      * @ORM\Column(name="id", type="integer")
  24.      * @ORM\Id
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      */
  27.     private $id;
  28.     /**
  29.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  30.      * @Assert\NotBlank(message="LibellĂ© obligatoire")
  31.      */
  32.     private $libelle;
  33.     /**
  34.      * @ORM\Column(name="entreeSortie", type="boolean", nullable=true)
  35.      */
  36.     private $entreeSortie;
  37.     /**
  38.      * @ORM\Column(name="comptaAchat", type="string", length=255, nullable=true)
  39.      */
  40.     private $comptaAchat;
  41.     /**
  42.      * @ORM\Column(name="comptaVente", type="string", length=255, nullable=true)
  43.      */
  44.     private $comptaVente;
  45.     /**
  46.      * @ORM\Column(name="compta", type="string", length=255, nullable=true)
  47.      */
  48.     private $compta;
  49.     /**
  50.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="typesMouvementCaisse")
  51.      * @ORM\JoinColumn(nullable=true)
  52.      */
  53.     private $utilisateur;
  54.     /**
  55.      * @ORM\Column(name="date", type="datetime", nullable=true)
  56.      */
  57.     private $date;
  58.     /**
  59.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  60.      */
  61.     private $dateSuppression;
  62.     /**
  63.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  64.      * @Gedmo\Timestampable(on="update")
  65.      */
  66.     private $dateMaj;
  67.     /**
  68.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\MouvementCaisse", cascade={"persist"},mappedBy="typeMouvementCaisse")
  69.      */
  70.     private $mouvementsCaisse;
  71.     public function __construct()
  72.     {
  73.         $this->date             = new Datetime();
  74.         $this->entreeSortie     true;
  75.         $this->mouvementsCaisse = new ArrayCollection();
  76.     }
  77.     public function __toString()
  78.     {
  79.         return $this->getLibelle();
  80.     }
  81.     public function getId(): int
  82.     {
  83.         return $this->id;
  84.     }
  85.     public function setLibelle(?string $libelle): TypeMouvementCaisse
  86.     {
  87.         $this->libelle $libelle;
  88.         return $this;
  89.     }
  90.     public function getLibelle(): ?string
  91.     {
  92.         return $this->libelle;
  93.     }
  94.     public function setEntreeSortie(?bool $entreeSortie): TypeMouvementCaisse
  95.     {
  96.         $this->entreeSortie $entreeSortie;
  97.         return $this;
  98.     }
  99.     public function getEntreeSortie(): ?bool
  100.     {
  101.         return $this->entreeSortie;
  102.     }
  103.     public function setComptaAchat(?string $comptaAchat): TypeMouvementCaisse
  104.     {
  105.         $this->comptaAchat $comptaAchat;
  106.         return $this;
  107.     }
  108.     public function getComptaAchat(): ?string
  109.     {
  110.         return $this->comptaAchat;
  111.     }
  112.     public function setDate(?DateTime $date): TypeMouvementCaisse
  113.     {
  114.         $this->date $date;
  115.         return $this;
  116.     }
  117.     public function getDate(): ?DateTime
  118.     {
  119.         return $this->date;
  120.     }
  121.     public function setDateSuppression(?DateTime $dateSuppression): TypeMouvementCaisse
  122.     {
  123.         $this->dateSuppression $dateSuppression;
  124.         return $this;
  125.     }
  126.     public function getDateSuppression(): ?DateTime
  127.     {
  128.         return $this->dateSuppression;
  129.     }
  130.     public function setDateMaj(?DateTime $dateMaj): TypeMouvementCaisse
  131.     {
  132.         $this->dateMaj $dateMaj;
  133.         return $this;
  134.     }
  135.     public function getDateMaj(): ?DateTime
  136.     {
  137.         return $this->dateMaj;
  138.     }
  139.     public function setUtilisateur(?Utilisateur $utilisateur): TypeMouvementCaisse
  140.     {
  141.         $this->utilisateur $utilisateur;
  142.         return $this;
  143.     }
  144.     public function getUtilisateur(): ?Utilisateur
  145.     {
  146.         return $this->utilisateur;
  147.     }
  148.     public function addMouvementsCaisse(MouvementCaisse $mouvementsCaisse): TypeMouvementCaisse
  149.     {
  150.         $this->mouvementsCaisse[] = $mouvementsCaisse;
  151.         return $this;
  152.     }
  153.     public function removeMouvementsCaisse(MouvementCaisse $mouvementsCaisse)
  154.     {
  155.         $this->mouvementsCaisse->removeElement($mouvementsCaisse);
  156.     }
  157.     public function getMouvementsCaisse(): Collection
  158.     {
  159.         return $this->mouvementsCaisse;
  160.     }
  161.     public function setComptaVente(?string $comptaVente): TypeMouvementCaisse
  162.     {
  163.         $this->comptaVente $comptaVente;
  164.         return $this;
  165.     }
  166.     public function getComptaVente(): ?string
  167.     {
  168.         return $this->comptaVente;
  169.     }
  170.     public function setCompta(?string $compta): TypeMouvementCaisse
  171.     {
  172.         $this->compta $compta;
  173.         return $this;
  174.     }
  175.     public function getCompta(): ?string
  176.     {
  177.         return $this->compta;
  178.     }
  179. }