<?php
namespace App\Entity;
use App\Repository\IctusTypePaiementRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=IctusTypePaiementRepository::class)
*/
class IctusTypePaiement
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $designation;
/**
* @ORM\OneToMany(targetEntity=IctusPaiementPharmacie::class, mappedBy="ictusTypePaiement")
*/
private $ictusPaiementPharmacies;
/**
* @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="typePaiement")
*/
private $ictusCommandes;
/**
* @ORM\OneToMany(targetEntity=IctusHistoriquePaiement::class, mappedBy="ictusTypePaiement")
*/
private $ictusHistoriquePaiements;
/**
* @ORM\OneToMany(targetEntity=CommandeSpecial::class, mappedBy="typePaiement")
*/
private $commandeSpecials;
/**
* @ORM\OneToMany(targetEntity=User::class, mappedBy="lastTypePaiement")
*/
private $users;
public function __construct()
{
$this->ictusPaiementPharmacies = new ArrayCollection();
$this->ictusCommandes = new ArrayCollection();
$this->ictusHistoriquePaiements = new ArrayCollection();
$this->commandeSpecials = new ArrayCollection();
$this->users = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getDesignation(): ?string
{
return $this->designation;
}
public function setDesignation(string $designation): self
{
$this->designation = $designation;
return $this;
}
/**
* @return Collection<int, IctusPaiementPharmacie>
*/
public function getIctusPaiementPharmacies(): Collection
{
return $this->ictusPaiementPharmacies;
}
public function addIctusPaiementPharmacy(IctusPaiementPharmacie $ictusPaiementPharmacy): self
{
if (!$this->ictusPaiementPharmacies->contains($ictusPaiementPharmacy)) {
$this->ictusPaiementPharmacies[] = $ictusPaiementPharmacy;
$ictusPaiementPharmacy->setIctusTypePaiement($this);
}
return $this;
}
public function removeIctusPaiementPharmacy(IctusPaiementPharmacie $ictusPaiementPharmacy): self
{
if ($this->ictusPaiementPharmacies->removeElement($ictusPaiementPharmacy)) {
// set the owning side to null (unless already changed)
if ($ictusPaiementPharmacy->getIctusTypePaiement() === $this) {
$ictusPaiementPharmacy->setIctusTypePaiement(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusCommande>
*/
public function getIctusCommandes(): Collection
{
return $this->ictusCommandes;
}
public function addIctusCommande(IctusCommande $ictusCommande): self
{
if (!$this->ictusCommandes->contains($ictusCommande)) {
$this->ictusCommandes[] = $ictusCommande;
$ictusCommande->setTypePaiement($this);
}
return $this;
}
public function removeIctusCommande(IctusCommande $ictusCommande): self
{
if ($this->ictusCommandes->removeElement($ictusCommande)) {
// set the owning side to null (unless already changed)
if ($ictusCommande->getTypePaiement() === $this) {
$ictusCommande->setTypePaiement(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusHistoriquePaiement>
*/
public function getIctusHistoriquePaiements(): Collection
{
return $this->ictusHistoriquePaiements;
}
public function addIctusHistoriquePaiement(IctusHistoriquePaiement $ictusHistoriquePaiement): self
{
if (!$this->ictusHistoriquePaiements->contains($ictusHistoriquePaiement)) {
$this->ictusHistoriquePaiements[] = $ictusHistoriquePaiement;
$ictusHistoriquePaiement->setIctusTypePaiement($this);
}
return $this;
}
public function removeIctusHistoriquePaiement(IctusHistoriquePaiement $ictusHistoriquePaiement): self
{
if ($this->ictusHistoriquePaiements->removeElement($ictusHistoriquePaiement)) {
// set the owning side to null (unless already changed)
if ($ictusHistoriquePaiement->getIctusTypePaiement() === $this) {
$ictusHistoriquePaiement->setIctusTypePaiement(null);
}
}
return $this;
}
/**
* @return Collection<int, CommandeSpecial>
*/
public function getCommandeSpecials(): Collection
{
return $this->commandeSpecials;
}
public function addCommandeSpecial(CommandeSpecial $commandeSpecial): self
{
if (!$this->commandeSpecials->contains($commandeSpecial)) {
$this->commandeSpecials[] = $commandeSpecial;
$commandeSpecial->setTypePaiement($this);
}
return $this;
}
public function removeCommandeSpecial(CommandeSpecial $commandeSpecial): self
{
if ($this->commandeSpecials->removeElement($commandeSpecial)) {
// set the owning side to null (unless already changed)
if ($commandeSpecial->getTypePaiement() === $this) {
$commandeSpecial->setTypePaiement(null);
}
}
return $this;
}
/**
* @return Collection<int, User>
*/
public function getUsers(): Collection
{
return $this->users;
}
public function addUser(User $user): self
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
$user->setLastTypePaiement($this);
}
return $this;
}
public function removeUser(User $user): self
{
if ($this->users->removeElement($user)) {
// set the owning side to null (unless already changed)
if ($user->getLastTypePaiement() === $this) {
$user->setLastTypePaiement(null);
}
}
return $this;
}
}