*/ #[ORM\OneToMany(targetEntity: Operation::class, mappedBy: 'credit', orphanRemoval: true)] private Collection $credits; /** * @var Collection */ #[ORM\OneToMany(targetEntity: Operation::class, mappedBy: 'debit', orphanRemoval: true)] private Collection $debits; public function __construct() { $this->credits = new ArrayCollection(); $this->debits = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getNum01(): ?string { return $this->num01; } public function setNum01(string $num01): static { $this->num01 = $num01; return $this; } public function getNum02(): ?string { return $this->num02; } public function setNum02(string $num02): static { $this->num02 = $num02; return $this; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): static { $this->title = $title; return $this; } public function isActif(): ?bool { return $this->actif; } public function setActif(bool $actif): static { $this->actif = $actif; return $this; } public function getCompany(): ?Company { return $this->company; } public function setCompany(?Company $company): static { $this->company = $company; return $this; } /** * @return Collection */ public function getCredits(): Collection { return $this->credits; } public function addCredit(Operation $credit): static { if (!$this->credits->contains($credit)) { $this->credits->add($credit); $credit->setCredit($this); } return $this; } public function removeCredit(Operation $credit): static { if ($this->credits->removeElement($credit)) { // set the owning side to null (unless already changed) if ($credit->getCredit() === $this) { $credit->setCredit(null); } } return $this; } /** * @return Collection */ public function getDebits(): Collection { return $this->debits; } public function addDebit(Operation $debit): static { if (!$this->debits->contains($debit)) { $this->debits->add($debit); $debit->setDebit($this); } return $this; } public function removeDebit(Operation $debit): static { if ($this->debits->removeElement($debit)) { // set the owning side to null (unless already changed) if ($debit->getDebit() === $this) { $debit->setDebit(null); } } return $this; } }