| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?php
- declare(strict_types=1);
- namespace App\Entity\Billing;
- use App\Entity\Access\Access;
- use App\Entity\Access\AccessFamily;
- use App\Entity\Product\FictionalIntangible;
- //use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- use Doctrine\Common\Collections\Collection;
- /**
- * Classe ... qui ...
- */
- //#[Auditable]
- #[ORM\Entity]
- class AccessFictionalIntangible
- {
- #[ORM\Id]
- #[ORM\Column]
- #[ORM\GeneratedValue]
- private ?int $id = null;
- #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'accessFictionalIntangibles')]
- private Access $access;
- #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'accessFictionalIntangibles')]
- private AccessFamily $accessFamily;
- #[ORM\ManyToOne]
- #[ORM\JoinColumn(nullable: false)]
- private FictionalIntangible $fictionalIntangible;
- #[ORM\OneToMany(mappedBy: 'accessFictionalIntangible', targetEntity: BillingIntangibleExcludeDate::class, cascade: ['persist'], orphanRemoval: true, )]
- private Collection $billingIntangibleExcludeDates;
- public function __construct()
- {
- $this->billingIntangibleExcludeDates = new ArrayCollection();
- }
- public function getId(): ?int
- {
- return $this->id;
- }
- public function getAccess(): ?Access
- {
- return $this->access;
- }
- public function setAccess(?Access $access): self
- {
- $this->access = $access;
- return $this;
- }
- public function getAccessFamily(): ?AccessFamily
- {
- return $this->accessFamily;
- }
- public function setAccessFamily(?AccessFamily $accessFamily): self
- {
- $this->accessFamily = $accessFamily;
- return $this;
- }
- public function getFictionalIntangible(): ?FictionalIntangible
- {
- return $this->fictionalIntangible;
- }
- public function setFictionalIntangible(?FictionalIntangible $fictionalIntangible): self
- {
- $this->fictionalIntangible = $fictionalIntangible;
- return $this;
- }
- /**
- * @return Collection<int, BillingIntangibleExcludeDate>
- */
- public function getBillingIntangibleExcludeDates(): Collection
- {
- return $this->billingIntangibleExcludeDates;
- }
- public function addBillingIntangibleExcludeDate(BillingIntangibleExcludeDate $billingIntangibleExcludeDate): self
- {
- if (!$this->billingIntangibleExcludeDates->contains($billingIntangibleExcludeDate)) {
- $this->billingIntangibleExcludeDates[] = $billingIntangibleExcludeDate;
- $billingIntangibleExcludeDate->setAccessFictionalIntangible($this);
- }
- return $this;
- }
- public function removeBillingIntangibleExcludeDate(BillingIntangibleExcludeDate $billingIntangibleExcludeDate): self
- {
- if ($this->billingIntangibleExcludeDates->removeElement($billingIntangibleExcludeDate)) {
- // set the owning side to null (unless already changed)
- if ($billingIntangibleExcludeDate->getAccessFictionalIntangible() === $this) {
- $billingIntangibleExcludeDate->setAccessFictionalIntangible(null);
- }
- }
- return $this;
- }
- }
|