| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?php
- declare(strict_types=1);
- namespace App\Entity\Billing;
- use ApiPlatform\Metadata\ApiResource;
- use App\Entity\Product\IntangibleDiscountDetail;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- #[ApiResource(operations: [])]
- #[ORM\Entity]
- class FamilyQuotientBand
- {
- #[ORM\Id]
- #[ORM\Column]
- #[ORM\GeneratedValue]
- private int $id;
- #[ORM\ManyToOne(targetEntity: FamilyQuotientModel::class, cascade: [], inversedBy: 'familyQuotientBands')]
- #[ORM\JoinColumn(nullable: false)]
- protected mixed $familyQuotientModel;
- #[ORM\OneToMany(
- mappedBy: 'familyQuotientBand',
- targetEntity: FamilyQuotientBandDetail::class,
- cascade: ['persist'],
- orphanRemoval: true,
- )]
- protected Collection $familyQuotientBandDetails;
- #[ORM\OneToMany(mappedBy: 'familyQuotientBand', targetEntity: IntangibleDiscountDetail::class, cascade: [], orphanRemoval: true)]
- protected Collection $intangibleDiscountDetails;
- public function getId(): int
- {
- return $this->id;
- }
- public function setId(int $id): self
- {
- $this->id = $id;
- return $this;
- }
- public function getFamilyQuotientModel(): mixed
- {
- return $this->familyQuotientModel;
- }
- public function setFamilyQuotientModel(mixed $familyQuotientModel): self
- {
- $this->familyQuotientModel = $familyQuotientModel;
- return $this;
- }
- public function getFamilyQuotientBandDetails(): Collection
- {
- return $this->familyQuotientBandDetails;
- }
- public function addFamilyQuotientBandDetail(FamilyQuotientBandDetail $familyQuotientBandDetail): self
- {
- if (!$this->familyQuotientBandDetails->contains($familyQuotientBandDetail)) {
- $this->familyQuotientBandDetails[] = $familyQuotientBandDetail;
- $familyQuotientBandDetail->setFamilyQuotientBand($this);
- }
- return $this;
- }
- public function removeFamilyQuotientBandDetail(FamilyQuotientBandDetail $familyQuotientBandDetail): self
- {
- if ($this->familyQuotientBandDetails->removeElement($familyQuotientBandDetail)) {
- $familyQuotientBandDetail->setFamilyQuotientBand(null);
- }
- return $this;
- }
- public function getIntangibleDiscountDetails(): Collection
- {
- return $this->intangibleDiscountDetails;
- }
- public function addIntangibleDiscountDetail(IntangibleDiscountDetail $intangibleDiscountDetail): self
- {
- if (!$this->intangibleDiscountDetails->contains($intangibleDiscountDetail)) {
- $this->intangibleDiscountDetails[] = $intangibleDiscountDetail;
- $intangibleDiscountDetail->setFamilyQuotientBand($this);
- }
- return $this;
- }
- public function removeIntangibleDiscountDetail(IntangibleDiscountDetail $intangibleDiscountDetail): self
- {
- $this->intangibleDiscountDetails->removeElement($intangibleDiscountDetail);
- return $this;
- }
- }
|