<?php
namespace App\Entity\Configuration;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use App\Repository\Configuration\ConditionnedOptionRepository;
#[ORM\Entity(repositoryClass: ConditionnedOptionRepository::class)]
class ConditionnedOption
{
const OPERATOR_EQUAL = "==";
use TimestampableEntity;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'conditionnedOptions')]
#[ORM\JoinColumn(nullable: false)]
private ?OptionInSurvey $optionInSurvey = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $operator = null;
#[ORM\ManyToOne(inversedBy: 'conditionnedResult')]
#[ORM\JoinColumn(nullable: false)]
private ?OptionInSurvey $resultOptionInSurvey = null;
#[ORM\ManyToOne(inversedBy: 'conditionnedOptions')]
#[ORM\JoinColumn(nullable: false)]
private ?ValueInSurvey $choosenValueInSurvey = null;
#[ORM\Column(nullable: true)]
private ?bool $isDisplay = null;
public function __construct()
{
$this->createdAt = new \DateTime();
$this->updatedAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getOptionInSurvey(): ?OptionInSurvey
{
return $this->optionInSurvey;
}
public function setOptionInSurvey(?OptionInSurvey $optionInSurvey): self
{
$this->optionInSurvey = $optionInSurvey;
return $this;
}
public function getOperator(): ?string
{
return $this->operator;
}
public function setOperator(?string $operator): self
{
$this->operator = $operator;
return $this;
}
public function getResultOptionInSurvey(): ?OptionInSurvey
{
return $this->resultOptionInSurvey;
}
public function setResultOptionInSurvey(?OptionInSurvey $resultOptionInSurvey): self
{
$this->resultOptionInSurvey = $resultOptionInSurvey;
return $this;
}
public function getChoosenValueInSurvey(): ?ValueInSurvey
{
return $this->choosenValueInSurvey;
}
public function setChoosenValueInSurvey(?ValueInSurvey $choosenValueInSurvey): self
{
$this->choosenValueInSurvey = $choosenValueInSurvey;
return $this;
}
public function isIsDisplay(): ?bool
{
return $this->isDisplay;
}
public function setIsDisplay(?bool $isDisplay): self
{
$this->isDisplay = $isDisplay;
return $this;
}
}