<?phpnamespace App\Entity;use App\Repository\Actuv2ElectronicInvoiceAnswerRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: Actuv2ElectronicInvoiceAnswerRepository::class)]class Actuv2ElectronicInvoiceAnswer{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(name: 'answer', type: 'text', nullable: false)] private $answer; #[ORM\Column(name: 'correct', type: 'boolean', nullable: true)] private $correct = false; #[ORM\OneToMany(mappedBy: 'answer', targetEntity: Actuv2ElectronicInvoiceVote::class)] private $actuv2ElectronicInvoiceVotes; #[ORM\ManyToOne(targetEntity: Actuv2ElectronicInvoice::class, inversedBy: 'answers')] private $actuv2ElectronicInvoice; public function __construct() { $this->actuv2ElectronicInvoiceVotes = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getAnswer(): ?string { return $this->answer; } public function setAnswer(?string $answer): self { $this->answer = $answer; return $this; } public function getCorrect(): ?bool { return $this->correct; } public function setCorrect(?bool $correct): self { $this->correct = $correct; return $this; } /** * @return Collection<int, Actuv2ElectronicInvoiceVote> */ public function getActuv2ElectronicInvoiceVotes(): Collection { return $this->actuv2ElectronicInvoiceVotes; } public function addActuv2ElectronicInvoiceVote(Actuv2ElectronicInvoiceVote $actuv2ElectronicInvoiceVote): self { if (!$this->actuv2ElectronicInvoiceVotes->contains($actuv2ElectronicInvoiceVote)) { $this->actuv2ElectronicInvoiceVotes[] = $actuv2ElectronicInvoiceVote; $actuv2ElectronicInvoiceVote->setAnswer($this); } return $this; } public function removeActuv2ElectronicInvoiceVote(Actuv2ElectronicInvoiceVote $actuv2ElectronicInvoiceVote): self { if ($this->actuv2ElectronicInvoiceVotes->removeElement($actuv2ElectronicInvoiceVote)) { // set the owning side to null (unless already changed) if ($actuv2ElectronicInvoiceVote->getAnswer() === $this) { $actuv2ElectronicInvoiceVote->setAnswer(null); } } return $this; } public function getActuv2ElectronicInvoice(): ?Actuv2ElectronicInvoice { return $this->actuv2ElectronicInvoice; } public function setActuv2ElectronicInvoice(?Actuv2ElectronicInvoice $actuv2ElectronicInvoice): self { $this->actuv2ElectronicInvoice = $actuv2ElectronicInvoice; return $this; }}