src/Entity/Actuv2ElectronicInvoiceAnswer.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\Actuv2ElectronicInvoiceAnswerRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassActuv2ElectronicInvoiceAnswerRepository::class)]
  8. class Actuv2ElectronicInvoiceAnswer
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(name'answer'type'text'nullablefalse)]
  15.     private $answer;
  16.     #[ORM\Column(name'correct'type'boolean'nullabletrue)]
  17.     private $correct false;
  18.     #[ORM\OneToMany(mappedBy'answer'targetEntityActuv2ElectronicInvoiceVote::class)]
  19.     private $actuv2ElectronicInvoiceVotes;
  20.     #[ORM\ManyToOne(targetEntityActuv2ElectronicInvoice::class, inversedBy'answers')]
  21.     private $actuv2ElectronicInvoice;
  22.     public function __construct()
  23.     {
  24.         $this->actuv2ElectronicInvoiceVotes = new ArrayCollection();
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getAnswer(): ?string
  31.     {
  32.         return $this->answer;
  33.     }
  34.     public function setAnswer(?string $answer): self
  35.     {
  36.         $this->answer $answer;
  37.         return $this;
  38.     }
  39.     public function getCorrect(): ?bool
  40.     {
  41.         return $this->correct;
  42.     }
  43.     public function setCorrect(?bool $correct): self
  44.     {
  45.         $this->correct $correct;
  46.         return $this;
  47.     }
  48.     /**
  49.      * @return Collection<int, Actuv2ElectronicInvoiceVote>
  50.      */
  51.     public function getActuv2ElectronicInvoiceVotes(): Collection
  52.     {
  53.         return $this->actuv2ElectronicInvoiceVotes;
  54.     }
  55.     public function addActuv2ElectronicInvoiceVote(Actuv2ElectronicInvoiceVote $actuv2ElectronicInvoiceVote): self
  56.     {
  57.         if (!$this->actuv2ElectronicInvoiceVotes->contains($actuv2ElectronicInvoiceVote)) {
  58.             $this->actuv2ElectronicInvoiceVotes[] = $actuv2ElectronicInvoiceVote;
  59.             $actuv2ElectronicInvoiceVote->setAnswer($this);
  60.         }
  61.         return $this;
  62.     }
  63.     public function removeActuv2ElectronicInvoiceVote(Actuv2ElectronicInvoiceVote $actuv2ElectronicInvoiceVote): self
  64.     {
  65.         if ($this->actuv2ElectronicInvoiceVotes->removeElement($actuv2ElectronicInvoiceVote)) {
  66.             // set the owning side to null (unless already changed)
  67.             if ($actuv2ElectronicInvoiceVote->getAnswer() === $this) {
  68.                 $actuv2ElectronicInvoiceVote->setAnswer(null);
  69.             }
  70.         }
  71.         return $this;
  72.     }
  73.     public function getActuv2ElectronicInvoice(): ?Actuv2ElectronicInvoice
  74.     {
  75.         return $this->actuv2ElectronicInvoice;
  76.     }
  77.     public function setActuv2ElectronicInvoice(?Actuv2ElectronicInvoice $actuv2ElectronicInvoice): self
  78.     {
  79.         $this->actuv2ElectronicInvoice $actuv2ElectronicInvoice;
  80.         return $this;
  81.     }
  82. }