src/Entity/ReasonCode.php line 13
<?phpnamespace App\Entity;use App\Repository\ReasonCodeRepository;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: ReasonCodeRepository::class)]class ReasonCode{use TimestampableEntity;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $description = null;#[ORM\OneToMany(mappedBy: 'reasonCode', targetEntity: RuleResult::class)]private Collection $ruleResults;#[ORM\OneToMany(mappedBy: 'reasonCode', targetEntity: Credit::class)]private Collection $credits;#[ORM\OneToMany(mappedBy: 'reasonCode', targetEntity: ManualPayment::class)]private Collection $manualPayments;public function __construct(){$this->ruleResults = new ArrayCollection();$this->credits = new ArrayCollection();$this->manualPayments = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): static{$this->name = $name;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(?string $description): static{$this->description = $description;return $this;}/*** @return Collection<int, RuleResult>*/public function getRuleResults(): Collection{return $this->ruleResults;}public function addRuleResult(RuleResult $ruleResult): static{if (!$this->ruleResults->contains($ruleResult)) {$this->ruleResults->add($ruleResult);$ruleResult->setReasonCode($this);}return $this;}public function removeRuleResult(RuleResult $ruleResult): static{if ($this->ruleResults->removeElement($ruleResult)) {// set the owning side to null (unless already changed)if ($ruleResult->getReasonCode() === $this) {$ruleResult->setReasonCode(null);}}return $this;}/*** @return Collection<int, Credit>*/public function getCredits(): Collection{return $this->credits;}public function addCredit(Credit $credit): static{if (!$this->credits->contains($credit)) {$this->credits->add($credit);$credit->setReasonCode($this);}return $this;}public function removeCredit(Credit $credit): static{if ($this->credits->removeElement($credit)) {// set the owning side to null (unless already changed)if ($credit->getReasonCode() === $this) {$credit->setReasonCode(null);}}return $this;}/*** @return Collection<int, ManualPayment>*/public function getManualPayments(): Collection{return $this->manualPayments;}public function addManualPayment(ManualPayment $manualPayment): static{if (!$this->manualPayments->contains($manualPayment)) {$this->manualPayments->add($manualPayment);$manualPayment->setReasonCode($this);}return $this;}public function removeManualPayment(ManualPayment $manualPayment): static{if ($this->manualPayments->removeElement($manualPayment)) {// set the owning side to null (unless already changed)if ($manualPayment->getReasonCode() === $this) {$manualPayment->setReasonCode(null);}}return $this;}public function __toString(): string{return $this->name;}}