src/Entity/RuleConditionOld.php line 16
<?phpnamespace App\Entity;use App\Enum\BooleanType;use App\Enum\InternalCondition;use App\Repository\RuleConditionOldRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Gedmo\Timestampable\Traits\TimestampableEntity;#[ORM\Entity(repositoryClass: RuleConditionOldRepository::class)]#[ORM\Table(name: 'rule_conditions_old')]class RuleConditionOld{use TimestampableEntity;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\ManyToOne(inversedBy: 'creditRuleConditions')]#[ORM\JoinColumn(nullable: true)]private ?CreditRule $creditRule = null;#[ORM\Column]private ?InternalCondition $internalCondition = null;#[ORM\Column(length: 255, nullable: true)]private ?string $equalsValue = null;#[ORM\Column(length: 255, nullable: true)]private ?string $equalsValueType = null;#[ORM\Column]private ?BooleanType $conditionBooleanType = BooleanType::AND;#[ORM\ManyToOne(inversedBy: 'ruleConditionsOld')]private ?CommissionRule $commissionRule = null;#[ORM\ManyToMany(targetEntity: CreditType::class, cascade: ['persist'])]private Collection $creditTypes;#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'children')]private ?self $parent = null;#[ORM\OneToMany(mappedBy: 'parent', targetEntity: self::class, cascade: ['persist', 'remove'])]private Collection $children;#[ORM\ManyToOne(inversedBy: 'ruleConditionsOld')]#[ORM\JoinColumn(nullable: false)]private ?Year $year = null;public function __construct(){$this->creditTypes = new ArrayCollection();$this->children = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getCreditRule(): ?CreditRule{return $this->creditRule;}public function setCreditRule($creditRule): self{$this->creditRule = $creditRule;return $this;}public function getInternalCondition(){return $this->internalCondition;}public function setInternalCondition(InternalCondition $internalCondition): self{$this->internalCondition = $internalCondition;return $this;}public function getEqualsValue(): ?string{return $this->equalsValue;}public function setEqualsValue(?string $equalsValue): self{$this->equalsValue = $equalsValue;return $this;}public function getEqualsValueType(): ?string{return $this->equalsValueType;}public function setEqualsValueType(?string $equalsValueType): self{$this->equalsValueType = $equalsValueType;return $this;}public function getConditionBooleanType(){return $this->conditionBooleanType;}public function setConditionBooleanType(BooleanType $conditionBooleanType): self{$this->conditionBooleanType = $conditionBooleanType;return $this;}public function getCommissionRule(): ?CommissionRule{return $this->commissionRule;}public function setCommissionRule(?CommissionRule $commissionRule): self{$this->commissionRule = $commissionRule;return $this;}/*** @return Collection<int, CreditType>*/public function getCreditTypes(): Collection{return $this->creditTypes;}public function addCreditType(CreditType $creditType): self{if (!$this->creditTypes->contains($creditType)) {$this->creditTypes->add($creditType);}return $this;}public function removeCreditType(CreditType $creditType): self{$this->creditTypes->removeElement($creditType);return $this;}public function getParent(): ?self{return $this->parent;}public function setParent(?self $parent): self{$this->parent = $parent;return $this;}/*** @return Collection<int, self>*/public function getChildren(): Collection{return $this->children;}public function addChild(self $child): self{if (!$this->children->contains($child)) {$this->children->add($child);$child->setParent($this);}return $this;}public function removeChild(self $child): self{if ($this->children->removeElement($child)) {// set the owning side to null (unless already changed)if ($child->getParent() === $this) {$child->setParent(null);}}return $this;}public function getYear(): ?Year{return $this->year;}public function setYear(?Year $year): self{$this->year = $year;return $this;}}