src/Entity/TotalDue.php line 13
<?phpnamespace App\Entity;use App\Repository\TotalDueRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Gedmo\Timestampable\Traits\TimestampableEntity;#[ORM\Entity(repositoryClass: TotalDueRepository::class)]class TotalDue{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]#[ORM\JoinColumn(nullable: false)]private ?PaymentPeriod $period = null;#[ORM\Column(nullable: true)]private ?bool $holdPayment = null;#[ORM\OneToMany(mappedBy: 'totalDue', targetEntity: AggregatedCommissions::class)]private Collection $aggregatedCommissions;#[ORM\OneToMany(mappedBy: 'totalDue', targetEntity: TrueUp::class)]private Collection $trueUps;#[ORM\ManyToOne(inversedBy: 'totalDues')]#[ORM\JoinColumn(nullable: false)]private ?UserPaymentPeriod $userPaymentPeriod = null;public function __construct(){$this->aggregatedCommissions = new ArrayCollection();$this->trueUps = 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 getPeriod(): ?PaymentPeriod{return $this->period;}public function setPeriod(?PaymentPeriod $period): self{$this->period = $period;return $this;}public function isHoldPayment(): ?bool{return $this->holdPayment;}public function setHoldPayment(?bool $holdPayment): self{$this->holdPayment = $holdPayment;return $this;}/*** @return Collection<int, AggregatedCommissions>*/public function getAggregatedCommissions(): Collection{return $this->aggregatedCommissions;}public function addAggregatedCommission(AggregatedCommissions $aggregatedCommission): self{if (!$this->aggregatedCommissions->contains($aggregatedCommission)) {$this->aggregatedCommissions->add($aggregatedCommission);$aggregatedCommission->setTotalDue($this);}return $this;}public function removeAggregatedCommission(AggregatedCommissions $aggregatedCommission): self{if ($this->aggregatedCommissions->removeElement($aggregatedCommission)) {// set the owning side to null (unless already changed)if ($aggregatedCommission->getTotalDue() === $this) {$aggregatedCommission->setTotalDue(null);}}return $this;}/*** @return Collection<int, TrueUp>*/public function getTrueUps(): Collection{return $this->trueUps;}public function addTrueUp(TrueUp $trueUp): self{if (!$this->trueUps->contains($trueUp)) {$this->trueUps->add($trueUp);$trueUp->setTotalDue($this);}return $this;}public function removeTrueUp(TrueUp $trueUp): self{if ($this->trueUps->removeElement($trueUp)) {// set the owning side to null (unless already changed)if ($trueUp->getTotalDue() === $this) {$trueUp->setTotalDue(null);}}return $this;}public function getUserPaymentPeriod(): ?UserPaymentPeriod{return $this->userPaymentPeriod;}public function setUserPaymentPeriod(?UserPaymentPeriod $userPaymentPeriod): self{$this->userPaymentPeriod = $userPaymentPeriod;return $this;}}