| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- declare(strict_types=1);
- namespace App\Entity\Billing;
- //use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * Classe ... qui ...
- */
- //#[Auditable]
- #[ORM\Entity]
- class SddRegie
- {
- #[ORM\Id]
- #[ORM\Column]
- #[ORM\GeneratedValue]
- private ?int $id = null;
- #[ORM\OneToMany(mappedBy: 'sddRegie',targetEntity: Bill::class, orphanRemoval: true)]
- private Collection $bills;
- public function __construct()
- {
- $this->bills = new ArrayCollection();
- }
- public function getId(): ?int
- {
- return $this->id;
- }
- /**
- * @return Collection<int, Bill>
- */
- public function getBills(): Collection
- {
- return $this->bills;
- }
- public function addBill(Bill $bill): self
- {
- if (!$this->bills->contains($bill)) {
- $this->bills[] = $bill;
- $bill->setSddRegie($this);
- }
- return $this;
- }
- public function removeBill(Bill $bill): self
- {
- if ($this->bills->removeElement($bill)) {
- // set the owning side to null (unless already changed)
- if ($bill->getSddRegie() === $this) {
- $bill->setSddRegie(null);
- }
- }
- return $this;
- }
- }
|