src/Entity/IctusHistoriquePaiement.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Repository\IctusHistoriquePaiementRepository;
  7. /**
  8.  * @ORM\Entity(repositoryClass=IctusHistoriquePaiementRepository::class)
  9.  */
  10. class IctusHistoriquePaiement
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=IctusCommande::class, inversedBy="ictusHistoriquePaiements")
  20.      * @ORM\JoinColumn(nullable=true)
  21.      */
  22.     private $commande;
  23.     /**
  24.      * @ORM\Column(type="datetime")
  25.      */
  26.     private $createdAt;
  27.     /**
  28.      * @ORM\Column(type="float", nullable=true)
  29.      */
  30.     private $montant;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity=IctusTypePaiement::class, inversedBy="ictusHistoriquePaiements")
  33.      */
  34.     private $ictusTypePaiement;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity=CommandeSpecial::class, inversedBy="ictusHistoriquePaiements")
  37.      */
  38.     private $commandeSpecial;
  39.     /**
  40.      * @ORM\OneToMany(targetEntity=IctusReclamation::class, mappedBy="historiquePaiement")
  41.      */
  42.     private $ictusReclamations;
  43.     public function __construct(){
  44.         $this->createdAt = new \DateTime();
  45.         $this->ictusReclamations = new ArrayCollection();
  46.     }
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getCommande(): ?IctusCommande
  52.     {
  53.         return $this->commande;
  54.     }
  55.     public function setCommande(?IctusCommande $commande): self
  56.     {
  57.         $this->commande $commande;
  58.         return $this;
  59.     }
  60.     public function getCreatedAt(): ?\DateTimeInterface
  61.     {
  62.         return $this->createdAt;
  63.     }
  64.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  65.     {
  66.         $this->createdAt $createdAt;
  67.         return $this;
  68.     }
  69.     public function getMontant(): ?float
  70.     {
  71.         return $this->montant;
  72.     }
  73.     public function setMontant(?float $montant): self
  74.     {
  75.         $this->montant $montant;
  76.         return $this;
  77.     }
  78.     public function getIctusTypePaiement(): ?IctusTypePaiement
  79.     {
  80.         return $this->ictusTypePaiement;
  81.     }
  82.     public function setIctusTypePaiement(?IctusTypePaiement $ictusTypePaiement): self
  83.     {
  84.         $this->ictusTypePaiement $ictusTypePaiement;
  85.         return $this;
  86.     }
  87.     public function getCommandeSpecial(): ?CommandeSpecial
  88.     {
  89.         return $this->commandeSpecial;
  90.     }
  91.     public function setCommandeSpecial(?CommandeSpecial $commandeSpecial): self
  92.     {
  93.         $this->commandeSpecial $commandeSpecial;
  94.         return $this;
  95.     }
  96.     /**
  97.      * @return Collection<int, IctusReclamation>
  98.      */
  99.     public function getIctusReclamations(): Collection
  100.     {
  101.         return $this->ictusReclamations;
  102.     }
  103.     public function addIctusReclamation(IctusReclamation $ictusReclamation): self
  104.     {
  105.         if (!$this->ictusReclamations->contains($ictusReclamation)) {
  106.             $this->ictusReclamations[] = $ictusReclamation;
  107.             $ictusReclamation->setHistoriquePaiement($this);
  108.         }
  109.         return $this;
  110.     }
  111.     public function removeIctusReclamation(IctusReclamation $ictusReclamation): self
  112.     {
  113.         if ($this->ictusReclamations->removeElement($ictusReclamation)) {
  114.             // set the owning side to null (unless already changed)
  115.             if ($ictusReclamation->getHistoriquePaiement() === $this) {
  116.                 $ictusReclamation->setHistoriquePaiement(null);
  117.             }
  118.         }
  119.         return $this;
  120.     }
  121. }