| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?php
- declare(strict_types=1);
- namespace App\Entity\Billing;
- use ApiPlatform\Metadata\ApiResource;
- use App\Entity\Organization\Organization;
- use App\Entity\Product\IntangiblePriceAndDiscount;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- #[ApiResource(operations: [])]
- #[ORM\Entity]
- class FamilyQuotientModel
- {
- #[ORM\Id]
- #[ORM\Column]
- #[ORM\GeneratedValue]
- private int $id;
- #[ORM\ManyToOne(targetEntity: Organization::class, cascade: [], inversedBy: 'familyQuotientModels')]
- #[ORM\JoinColumn(nullable: false)]
- protected Organization $organization;
- #[ORM\OneToMany(mappedBy: 'familyQuotientModel', targetEntity: FamilyQuotientBand::class, cascade: ['persist'], orphanRemoval: true)]
- protected Collection $familyQuotientBands;
- #[ORM\OneToMany(mappedBy: 'familyQuotientModel', targetEntity: IntangiblePriceAndDiscount::class, cascade: [], orphanRemoval: false)]
- protected Collection $intangiblePriceAndDiscounts;
- public function getId(): int
- {
- return $this->id;
- }
- public function setId(int $id): self
- {
- $this->id = $id;
- return $this;
- }
- public function getOrganization(): Organization
- {
- return $this->organization;
- }
- public function setOrganization(Organization $organization): self
- {
- $this->organization = $organization;
- return $this;
- }
- public function getFamilyQuotientBands(): Collection
- {
- return $this->familyQuotientBands;
- }
- public function addFamilyQuotientBand(FamilyQuotientBand $familyQuotientBand): self
- {
- if (!$this->familyQuotientBands->contains($familyQuotientBand)) {
- $this->familyQuotientBands[] = $familyQuotientBand;
- $familyQuotientBand->setFamilyQuotientModel($this);
- }
- return $this;
- }
- public function removeFamilyQuotientBand(FamilyQuotientBand $familyQuotientBand): self
- {
- if ($this->familyQuotientBands->removeElement($familyQuotientBand)) {
- $familyQuotientBand->setFamilyQuotientModel(null);
- }
- return $this;
- }
- public function getIntangiblePriceAndDiscounts(): Collection
- {
- return $this->intangiblePriceAndDiscounts;
- }
- public function addIntangiblePriceAndDiscount(IntangiblePriceAndDiscount $intangiblePriceAndDiscount): self
- {
- if (!$this->intangiblePriceAndDiscounts->contains($intangiblePriceAndDiscount)) {
- $this->intangiblePriceAndDiscounts[] = $intangiblePriceAndDiscount;
- $intangiblePriceAndDiscount->setFamilyQuotientModel($this);
- }
- return $this;
- }
- public function removeIntangiblePriceAndDiscount(IntangiblePriceAndDiscount $intangiblePriceAndDiscount): self
- {
- if ($this->intangiblePriceAndDiscounts->removeElement($intangiblePriceAndDiscount)) {
- $intangiblePriceAndDiscount->setFamilyQuotientModel(null);
- }
- return $this;
- }
- }
|