<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\TypepaiementRepository;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity(repositoryClass=TypepaiementRepository::class)
*/
class Typepaiement
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $nom;
/**
* @ORM\OneToMany(targetEntity=Order::class, mappedBy="typepaiement")
*/
private $orders;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name_en;
/**
* @ORM\OneToMany(targetEntity=UserTypepaiement::class, mappedBy="typepaiements")
*/
private $userTypepaiements;
/**
* @ORM\OneToMany(targetEntity=HistoriquePaiement::class, mappedBy="typepaiement")
*/
private $historiquePaiements;
/**
* @ORM\OneToMany(targetEntity=Forecast::class, mappedBy="typepaiement")
*/
private $forecasts;
/**
* @ORM\OneToMany(targetEntity=IctoRemboursement::class, mappedBy="typePaiementDemande")
*/
private $ictoRemboursements;
/**
* @ORM\OneToMany(targetEntity=IctoRemboursement::class, mappedBy="typePaiementObtenue")
*/
private $ictoRemboursementObtenu;
/**
* @ORM\OneToMany(targetEntity=FacturePharmacie::class, mappedBy="typePaiement")
*/
private $facturePharmacies;
/**
* @ORM\OneToMany(targetEntity=FactPcieHistoriquePaiement::class, mappedBy="typePaiement")
*/
private $factPcieHistoriquePaiements;
public function __construct()
{
$this->orders = new ArrayCollection();
$this->userTypepaiements = new ArrayCollection();
$this->historiquePaiements = new ArrayCollection();
$this->forecasts = new ArrayCollection();
$this->ictoRemboursements = new ArrayCollection();
$this->ictoRemboursementObtenu = new ArrayCollection();
$this->facturePharmacies = new ArrayCollection();
$this->factPcieHistoriquePaiements = new ArrayCollection();
}
public function __toString(){
return $this->getName();
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
/**
* @return Collection<int, Order>
*/
public function getOrders(): Collection
{
return $this->orders;
}
public function addOrder(Order $order): self
{
if (!$this->orders->contains($order)) {
$this->orders[] = $order;
$order->setTypepaiement($this);
}
return $this;
}
public function removeOrder(Order $order): self
{
if ($this->orders->removeElement($order)) {
// set the owning side to null (unless already changed)
if ($order->getTypepaiement() === $this) {
$order->setTypepaiement(null);
}
}
return $this;
}
public function getNameEn(): ?string
{
return $this->name_en;
}
public function setNameEn(?string $name_en): self
{
$this->name_en = $name_en;
return $this;
}
/**
* @return Collection<int, UserTypepaiement>
*/
public function getUserTypepaiements(): Collection
{
return $this->userTypepaiements;
}
public function addUserTypepaiement(UserTypepaiement $userTypepaiement): self
{
if (!$this->userTypepaiements->contains($userTypepaiement)) {
$this->userTypepaiements[] = $userTypepaiement;
$userTypepaiement->setTypepaiements($this);
}
return $this;
}
public function removeUserTypepaiement(UserTypepaiement $userTypepaiement): self
{
if ($this->userTypepaiements->removeElement($userTypepaiement)) {
// set the owning side to null (unless already changed)
if ($userTypepaiement->getTypepaiements() === $this) {
$userTypepaiement->setTypepaiements(null);
}
}
return $this;
}
/**
* @return Collection<int, HistoriquePaiement>
*/
public function getHistoriquePaiements(): Collection
{
return $this->historiquePaiements;
}
public function addHistoriquePaiement(HistoriquePaiement $historiquePaiement): self
{
if (!$this->historiquePaiements->contains($historiquePaiement)) {
$this->historiquePaiements[] = $historiquePaiement;
$historiquePaiement->setTypepaiement($this);
}
return $this;
}
public function removeHistoriquePaiement(HistoriquePaiement $historiquePaiement): self
{
if ($this->historiquePaiements->removeElement($historiquePaiement)) {
// set the owning side to null (unless already changed)
if ($historiquePaiement->getTypepaiement() === $this) {
$historiquePaiement->setTypepaiement(null);
}
}
return $this;
}
/**
* @return Collection<int, Forecast>
*/
public function getForecasts(): Collection
{
return $this->forecasts;
}
public function addForecast(Forecast $forecast): self
{
if (!$this->forecasts->contains($forecast)) {
$this->forecasts[] = $forecast;
$forecast->setTypepaiement($this);
}
return $this;
}
public function removeForecast(Forecast $forecast): self
{
if ($this->forecasts->removeElement($forecast)) {
// set the owning side to null (unless already changed)
if ($forecast->getTypepaiement() === $this) {
$forecast->setTypepaiement(null);
}
}
return $this;
}
/**
* @return Collection<int, IctoRemboursement>
*/
public function getIctoRemboursements(): Collection
{
return $this->ictoRemboursements;
}
public function addIctoRemboursement(IctoRemboursement $ictoRemboursement): self
{
if (!$this->ictoRemboursements->contains($ictoRemboursement)) {
$this->ictoRemboursements[] = $ictoRemboursement;
$ictoRemboursement->setTypePaiementDemande($this);
}
return $this;
}
public function removeIctoRemboursement(IctoRemboursement $ictoRemboursement): self
{
if ($this->ictoRemboursements->removeElement($ictoRemboursement)) {
// set the owning side to null (unless already changed)
if ($ictoRemboursement->getTypePaiementDemande() === $this) {
$ictoRemboursement->setTypePaiementDemande(null);
}
}
return $this;
}
/**
* @return Collection<int, IctoRemboursement>
*/
public function getIctoRemboursementObtenu(): Collection
{
return $this->ictoRemboursementObtenu;
}
public function addIctoRemboursementObtenu(IctoRemboursement $ictoRemboursementObtenu): self
{
if (!$this->ictoRemboursementObtenu->contains($ictoRemboursementObtenu)) {
$this->ictoRemboursementObtenu[] = $ictoRemboursementObtenu;
$ictoRemboursementObtenu->setTypePaiementObtenue($this);
}
return $this;
}
public function removeIctoRemboursementObtenu(IctoRemboursement $ictoRemboursementObtenu): self
{
if ($this->ictoRemboursementObtenu->removeElement($ictoRemboursementObtenu)) {
// set the owning side to null (unless already changed)
if ($ictoRemboursementObtenu->getTypePaiementObtenue() === $this) {
$ictoRemboursementObtenu->setTypePaiementObtenue(null);
}
}
return $this;
}
/**
* @return Collection<int, FacturePharmacie>
*/
public function getFacturePharmacies(): Collection
{
return $this->facturePharmacies;
}
public function addFacturePharmacy(FacturePharmacie $facturePharmacy): self
{
if (!$this->facturePharmacies->contains($facturePharmacy)) {
$this->facturePharmacies[] = $facturePharmacy;
$facturePharmacy->setTypePaiement($this);
}
return $this;
}
public function removeFacturePharmacy(FacturePharmacie $facturePharmacy): self
{
if ($this->facturePharmacies->removeElement($facturePharmacy)) {
// set the owning side to null (unless already changed)
if ($facturePharmacy->getTypePaiement() === $this) {
$facturePharmacy->setTypePaiement(null);
}
}
return $this;
}
/**
* @return Collection<int, FactPcieHistoriquePaiement>
*/
public function getFactPcieHistoriquePaiements(): Collection
{
return $this->factPcieHistoriquePaiements;
}
public function addFactPcieHistoriquePaiement(FactPcieHistoriquePaiement $factPcieHistoriquePaiement): self
{
if (!$this->factPcieHistoriquePaiements->contains($factPcieHistoriquePaiement)) {
$this->factPcieHistoriquePaiements[] = $factPcieHistoriquePaiement;
$factPcieHistoriquePaiement->setTypePaiement($this);
}
return $this;
}
public function removeFactPcieHistoriquePaiement(FactPcieHistoriquePaiement $factPcieHistoriquePaiement): self
{
if ($this->factPcieHistoriquePaiements->removeElement($factPcieHistoriquePaiement)) {
// set the owning side to null (unless already changed)
if ($factPcieHistoriquePaiement->getTypePaiement() === $this) {
$factPcieHistoriquePaiement->setTypePaiement(null);
}
}
return $this;
}
}