src/Entity/AggregatedCommissions.php line 14
<?phpnamespace App\Entity;use App\Enum\CustomerClass;use App\Enum\RegionEnum;use App\Repository\PaymentRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Gedmo\Timestampable\Traits\TimestampableEntity;#[ORM\Entity(repositoryClass: PaymentRepository::class)]class AggregatedCommissions{use TimestampableEntity;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\ManyToOne]#[ORM\JoinColumn(nullable: false)]private ?User $user = null;#[ORM\Column]private ?int $amtInPennies = null;#[ORM\ManyToOne(inversedBy: 'aggregatedCommissions')]private ?TotalDue $totalDue = null;#[ORM\ManyToOne(inversedBy: 'aggregatedCommissions')]#[ORM\JoinColumn(nullable: false)]private ?UserPaymentPeriod $userPaymentPeriod = null;#[ORM\OneToMany(mappedBy: 'aggregatedCommission', targetEntity: CommissionResult::class)]private Collection $commissionResults;public function __construct(){$this->commissionResults = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getUser(): ?User{return $this->user;}public function setUser(?User $user): self{$this->user = $user;return $this;}public function getAmtInPennies(): ?int{return $this->amtInPennies;}public function setAmtInPennies(int $amtInPennies): self{$this->amtInPennies = $amtInPennies;return $this;}public function getTotalDue(): ?TotalDue{return $this->totalDue;}public function setTotalDue(?TotalDue $totalDue): self{$this->totalDue = $totalDue;return $this;}public function getUserPaymentPeriod(): ?UserPaymentPeriod{return $this->userPaymentPeriod;}public function setUserPaymentPeriod(?UserPaymentPeriod $userPaymentPeriod): self{$this->userPaymentPeriod = $userPaymentPeriod;return $this;}/*** @return Collection<int, CommissionResult>*/public function getCommissionResults(): Collection{return $this->commissionResults;}public function addCommissionResult(CommissionResult $commissionResult): self{if (!$this->commissionResults->contains($commissionResult)) {$this->commissionResults->add($commissionResult);$commissionResult->setAggregatedCommission($this);}return $this;}public function removeCommissionResult(CommissionResult $commissionResult): self{if ($this->commissionResults->removeElement($commissionResult)) {// set the owning side to null (unless already changed)if ($commissionResult->getAggregatedCommission() === $this) {$commissionResult->setAggregatedCommission(null);}}return $this;}}