src/Entity/DocxUploaded.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DocxUploadedRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassDocxUploadedRepository::class)]
  9. class DocxUploaded
  10. {
  11.     public function className() {
  12.         return "DocxUploaded";
  13.     }
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column]
  17.     private ?int $id null;
  18.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  19.     private ?string $description null;
  20.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  21.     private ?string $tags null;
  22.     #[ORM\ManyToOne]
  23.     private ?File $file null;
  24.     #[ORM\OneToMany(mappedBy'fromDocx'targetEntityDocxGenerated::class)]
  25.     private Collection $generatedDocs;
  26.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  27.     private \DateTimeInterface $updateDate;
  28.     #[ORM\ManyToOne(targetEntityself::class)]
  29.     private ?self $reference null;
  30.     #[ORM\ManyToOne(inversedBy'docxUploadeds')]
  31.     private ?User $owner null;
  32.     #[ORM\Column(length255nullabletrue)]
  33.     private ?string $title null;
  34.     public function __construct()
  35.     {
  36.         $this->generatedDocs = new ArrayCollection();
  37.         $this->updateDate = new \DateTime();
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getDescription(): ?string
  44.     {
  45.         return $this->description;
  46.     }
  47.     public function setDescription(?string $description): self
  48.     {
  49.         $this->description $description;
  50.         return $this;
  51.     }
  52.     public function getTags(): ?string
  53.     {
  54.         return $this->tags;
  55.     }
  56.     public function setTags(?string $tags): self
  57.     {
  58.         $this->tags $tags;
  59.         return $this;
  60.     }
  61.     public function getFile(): ?File
  62.     {
  63.         return $this->file;
  64.     }
  65.     public function setFile(?File $file): self
  66.     {
  67.         $this->file $file;
  68.         return $this;
  69.     }
  70.     /**
  71.      * @return Collection<int, DocxGenerated>
  72.      */
  73.     public function getGeneratedDocs(): Collection
  74.     {
  75.         return $this->generatedDocs;
  76.     }
  77.     public function addGeneratedDoc(DocxGenerated $generatedDoc): self
  78.     {
  79.         if (!$this->generatedDocs->contains($generatedDoc)) {
  80.             $this->generatedDocs->add($generatedDoc);
  81.             $generatedDoc->setFromDocx($this);
  82.         }
  83.         return $this;
  84.     }
  85.     public function removeGeneratedDoc(DocxGenerated $generatedDoc): self
  86.     {
  87.         if ($this->generatedDocs->removeElement($generatedDoc)) {
  88.             // set the owning side to null (unless already changed)
  89.             if ($generatedDoc->getFromDocx() === $this) {
  90.                 $generatedDoc->setFromDocx(null);
  91.             }
  92.         }
  93.         return $this;
  94.     }
  95.     public function getUpdateDate(): ?\DateTimeInterface
  96.     {
  97.         return $this->updateDate;
  98.     }
  99.     public function setUpdateDate(\DateTimeInterface $updateDate): self
  100.     {
  101.         $this->updateDate $updateDate;
  102.         return $this;
  103.     }
  104.     public function getReference(): ?self
  105.     {
  106.         return $this->reference;
  107.     }
  108.     public function setReference(?self $reference): self
  109.     {
  110.         $this->reference $reference;
  111.         return $this;
  112.     }
  113.     public function getOwner(): ?User
  114.     {
  115.         return $this->owner;
  116.     }
  117.     public function setOwner(?User $owner): self
  118.     {
  119.         $this->owner $owner;
  120.         return $this;
  121.     }
  122.     public function getTitle(): ?string
  123.     {
  124.         return $this->title;
  125.     }
  126.     public function setTitle(?string $title): self
  127.     {
  128.         $this->title $title;
  129.         return $this;
  130.     }
  131. }