src/Entity/RuleCondition.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use App\Enum\RuleComponent;
  4. use App\Enum\RuleRelationalOperator;
  5. use App\Enum\RuleLogicalOperatorType;
  6. use App\Repository\RuleConditionRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Timestampable\Traits\TimestampableEntity;
  9. #[ORM\Entity(repositoryClassRuleConditionRepository::class)]
  10. class RuleCondition
  11. {
  12.     use TimestampableEntity;
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\ManyToOne(inversedBy'ruleConditions')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?RuleVersion $ruleVersion null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?RuleComponent $componentName null;
  22.     #[ORM\Column(length255nullabletrue)]
  23.     private ?string $componentValue null;
  24.     #[ORM\ManyToOne(inversedBy'ruleConditions'fetch'EAGER' )]
  25.     private ?CreditType $creditType null;
  26.     #[ORM\ManyToOne(inversedBy'ruleConditions'fetch'EAGER')]
  27.     private ?Position $position null;
  28.     #[ORM\ManyToOne(inversedBy'ruleConditions'fetch'EAGER')]
  29.     private ?Formula $formula null;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?RuleLogicalOperatorType $logicalOperatorType null;
  32.     #[ORM\Column(length255nullabletrue)]
  33.     private ?RuleRelationalOperator $relationalOperator null;
  34.     #[ORM\ManyToOne(inversedBy'ruleConditions'fetch'EAGER')]
  35.     private ?OrderType $orderType null;
  36.     #[ORM\ManyToOne(inversedBy'ruleConditions')]
  37.     private ?User $User null;
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getRuleVersion(): ?RuleVersion
  43.     {
  44.         return $this->ruleVersion;
  45.     }
  46.     public function setRuleVersion(?RuleVersion $ruleVersion): self
  47.     {
  48.         $this->ruleVersion $ruleVersion;
  49.         return $this;
  50.     }
  51.     public function getComponentName(): ?RuleComponent
  52.     {
  53.         return $this->componentName;
  54.     }
  55.     public function setComponentName(?RuleComponent $componentName): self
  56.     {
  57.         $this->componentName $componentName;
  58.         return $this;
  59.     }
  60.     public function getComponentValue(): ?string
  61.     {
  62.         return $this->componentValue;
  63.     }
  64.     public function setComponentValue(?string $componentValue): self
  65.     {
  66.         $this->componentValue $componentValue;
  67.         return $this;
  68.     }
  69.     public function getCreditType(): ?CreditType
  70.     {
  71.         return $this->creditType;
  72.     }
  73.     public function setCreditType(?CreditType $creditType): self
  74.     {
  75.         $this->creditType $creditType;
  76.         return $this;
  77.     }
  78.     public function getPosition(): ?Position
  79.     {
  80.         return $this->position;
  81.     }
  82.     public function setPosition(?Position $position): self
  83.     {
  84.         $this->position $position;
  85.         return $this;
  86.     }
  87.     public function getFormula(): ?Formula
  88.     {
  89.         return $this->formula;
  90.     }
  91.     public function setFormula(?Formula $formula): self
  92.     {
  93.         $this->formula $formula;
  94.         return $this;
  95.     }
  96.     public function getLogicalOperatorType(): ?RuleLogicalOperatorType
  97.     {
  98.         return $this->logicalOperatorType;
  99.     }
  100.     public function setLogicalOperatorType(?RuleLogicalOperatorType $logicalOperatorType): self
  101.     {
  102.         $this->logicalOperatorType $logicalOperatorType;
  103.         return $this;
  104.     }
  105.     public function getRelationalOperator(): ?RuleRelationalOperator
  106.     {
  107.         return $this->relationalOperator;
  108.     }
  109.     public function setRelationalOperator(?RuleRelationalOperator $relationalOperator): self
  110.     {
  111.         $this->relationalOperator $relationalOperator;
  112.         return $this;
  113.     }
  114.     public function getOrderType(): ?OrderType
  115.     {
  116.         return $this->orderType;
  117.     }
  118.     public function setOrderType(?OrderType $orderType): static
  119.     {
  120.         $this->orderType $orderType;
  121.         return $this;
  122.     }
  123.     public function getUser(): ?User
  124.     {
  125.         return $this->User;
  126.     }
  127.     public function setUser(?User $User): static
  128.     {
  129.         $this->User $User;
  130.         return $this;
  131.     }
  132. }