src/Entity/GestionComerciale/ModeEncaissement.php line 23

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.  * ModeEncaissement
  14.  *
  15.  * @ORM\Table("commerciale__mode_encaissement")
  16.  * @ORM\Entity(repositoryClass="App\Repository\GestionComerciale\ModeEncaissementRepository")
  17.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  18.  * @SecuredEntity(name="Mode d'encaissement", group="REGLAGES")
  19.  *
  20.  */
  21.  class ModeEncaissement
  22. {
  23.     /**
  24.      * @ORM\Column(name="id", type="integer")
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="AUTO")
  27.      */
  28.     private $id;
  29.     
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="modeEncaissement")
  32.      * @ORM\JoinColumn(nullable=true)
  33.      */
  34.     private $utilisateur;
  35.     /**
  36.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  37.      * @Assert\NotBlank(message="LibellĂ© obligatoire") 
  38.      */
  39.     private $libelle;
  40.     /**
  41.      * @ORM\Column(name="date", type="datetime", nullable=true)
  42.      */
  43.     private $date;
  44.     /**
  45.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  46.      */
  47.     private $dateSuppression;
  48.     /**
  49.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  50.      * @Gedmo\Timestampable(on="update")
  51.      */
  52.     private $dateMaj;
  53.     
  54.     /**
  55.     * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\BordereauLCR",mappedBy="modeEncaissement")
  56.     */
  57.     private $bordereauxLCR;
  58.     
  59.     /**
  60.     * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Bordereau",mappedBy="modeEncaissement")
  61.     */
  62.     private $bordereaux;
  63.     public function __construct()
  64.     {
  65.         $this->date             = new Datetime();
  66.         $this->bordereauxLCR    = new ArrayCollection();
  67.     }
  68.     public function getId(): int
  69.     {
  70.         return $this->id;
  71.     }
  72.     public function setLibelle(?string $libelle): ModeEncaissement
  73.     {
  74.         $this->libelle $libelle;
  75.         return $this;
  76.     }
  77.     public function getLibelle(): ?string
  78.     {
  79.         return $this->libelle;
  80.     }
  81.     public function setDate(?DateTime $date): ModeEncaissement
  82.     {
  83.         $this->date $date;
  84.         return $this;
  85.     }
  86.     public function getDate(): ?DateTime
  87.     {
  88.         return $this->date;
  89.     }
  90.     public function setDateSuppression(?DateTime $dateSuppression): ModeEncaissement
  91.     {
  92.         $this->dateSuppression $dateSuppression;
  93.         return $this;
  94.     }
  95.     public function getDateSuppression(): ?DateTime
  96.     {
  97.         return $this->dateSuppression;
  98.     }
  99.     public function setDateMaj(?DateTime $dateMaj): ModeEncaissement
  100.     {
  101.         $this->dateMaj $dateMaj;
  102.         return $this;
  103.     }
  104.     public function getDateMaj(): ?DateTime
  105.     {
  106.         return $this->dateMaj;
  107.     }
  108.     public function setUtilisateur(?Utilisateur $utilisateur): ModeEncaissement
  109.     {
  110.         $this->utilisateur $utilisateur;
  111.         return $this;
  112.     }
  113.     public function getUtilisateur(): ?Utilisateur
  114.     {
  115.         return $this->utilisateur;
  116.     }
  117.     public function __toString() {
  118.         return $this->libelle;
  119.     }
  120.     public function addBordereauxLCR(BordereauLCR $bordereauxLCR): ModeEncaissement
  121.     {
  122.         $this->bordereauxLCR[] = $bordereauxLCR;
  123.         return $this;
  124.     }
  125.     public function removeBordereauxLCR(BordereauLCR $bordereauxLCR)
  126.     {
  127.         $this->bordereauxLCR->removeElement($bordereauxLCR);
  128.     }
  129.     public function getBordereauxLCR(): Collection
  130.     {
  131.         return $this->bordereauxLCR;
  132.     }
  133. }