src/Entity/Actuv2ElectronicInvoice.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\Actuv2ElectronicInvoiceRepository;
  4. use DateTimeInterface;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassActuv2ElectronicInvoiceRepository::class)]
  9. class Actuv2ElectronicInvoice
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\Column(name'date'type'date'nullabletrueoptions: ['comment' => 'pĂ©riode'])]
  16.     private $date;
  17.     #[ORM\Column(name'question'type'text'nullablefalse)]
  18.     private $question;
  19.     #[ORM\Column(name'detail'type'text'nullablefalse)]
  20.     private $detail;
  21.     #[ORM\Column(type'datetime'nullabletrue)]
  22.     private $updatedAt;
  23.     #[ORM\OneToMany(mappedBy'electronicInvoice'targetEntityActuv2ElectronicInvoiceVote::class)]
  24.     private $actuv2ElectronicInvoiceVotes;
  25.     #[ORM\OneToMany(mappedBy'actuv2ElectronicInvoice'targetEntityActuv2ElectronicInvoiceAnswer::class, cascade: ['persist''remove'], orphanRemovaltrue)]
  26.     private $answers;
  27.     public function __construct()
  28.     {
  29.         $this->actuv2ElectronicInvoiceVotes = new ArrayCollection();
  30.         $this->answers = new ArrayCollection();
  31.     }
  32.     public function getId(): ?string
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getDate(): ?DateTimeInterface
  37.     {
  38.         return $this->date;
  39.     }
  40.     public function setDate(?DateTimeInterface $date): self
  41.     {
  42.         $this->date $date;
  43.         return $this;
  44.     }
  45.     public function getUpdatedAt(): ?DateTimeInterface
  46.     {
  47.         return $this->updatedAt;
  48.     }
  49.     public function setUpdatedAt(?DateTimeInterface $updatedAt): self
  50.     {
  51.         $this->updatedAt $updatedAt;
  52.         return $this;
  53.     }
  54.     public function getQuestion(): ?string
  55.     {
  56.         return $this->question;
  57.     }
  58.     public function setQuestion(?string $question): self
  59.     {
  60.         $this->question $question;
  61.         return $this;
  62.     }
  63.     public function getDetail(): ?string
  64.     {
  65.         return $this->detail;
  66.     }
  67.     public function setDetail(?string $detail): self
  68.     {
  69.         $this->detail $detail;
  70.         return $this;
  71.     }
  72.     /**
  73.      * @return Collection<int, Actuv2ElectronicInvoiceVote>
  74.      */
  75.     public function getActuv2ElectronicInvoiceVotes(): Collection
  76.     {
  77.         return $this->actuv2ElectronicInvoiceVotes;
  78.     }
  79.     public function addActuv2ElectronicInvoiceVote(Actuv2ElectronicInvoiceVote $actuv2ElectronicInvoiceVote): self
  80.     {
  81.         if (!$this->actuv2ElectronicInvoiceVotes->contains($actuv2ElectronicInvoiceVote)) {
  82.             $this->actuv2ElectronicInvoiceVotes[] = $actuv2ElectronicInvoiceVote;
  83.             $actuv2ElectronicInvoiceVote->setElectronicInvoice($this);
  84.         }
  85.         return $this;
  86.     }
  87.     public function removeActuv2ElectronicInvoiceVote(Actuv2ElectronicInvoiceVote $actuv2ElectronicInvoiceVote): self
  88.     {
  89.         if ($this->actuv2ElectronicInvoiceVotes->removeElement($actuv2ElectronicInvoiceVote)) {
  90.             // set the owning side to null (unless already changed)
  91.             if ($actuv2ElectronicInvoiceVote->getElectronicInvoice() === $this) {
  92.                 $actuv2ElectronicInvoiceVote->setElectronicInvoice(null);
  93.             }
  94.         }
  95.         return $this;
  96.     }
  97.     /**
  98.      * @return Collection<int, Actuv2ElectronicInvoiceAnswer>
  99.      */
  100.     public function getAnswers(): Collection
  101.     {
  102.         return $this->answers;
  103.     }
  104.     public function addAnswer(Actuv2ElectronicInvoiceAnswer $answer): self
  105.     {
  106.         if (!$this->answers->contains($answer)) {
  107.             $this->answers[] = $answer;
  108.             $answer->setActuv2ElectronicInvoice($this);
  109.         }
  110.         return $this;
  111.     }
  112.     public function removeAnswer(Actuv2ElectronicInvoiceAnswer $answer): self
  113.     {
  114.         if ($this->answers->removeElement($answer)) {
  115.             // set the owning side to null (unless already changed)
  116.             if ($answer->getActuv2ElectronicInvoice() === $this) {
  117.                 $answer->setActuv2ElectronicInvoice(null);
  118.             }
  119.         }
  120.         return $this;
  121.     }
  122. }