src/Entity/Documentation/Document.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Documentation;
  3. use App\Entity\AppUser;
  4. use App\Entity\SecurityDocument\Document as SecurityDocument;
  5. use App\Entity\Shipping;
  6. use App\Repository\Documentation\DocumentRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity(repositoryClass=DocumentRepository::class)
  10.  * @ORM\Table(name="documentation_document")
  11.  */
  12. class Document
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=AppUser::class, inversedBy="documents")
  22.      * @ORM\JoinColumn(nullable=false)
  23.      */
  24.     private $generatedBy;
  25.     /**
  26.      * @ORM\Column(type="datetime_immutable")
  27.      */
  28.     private $generatedAt;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=Shipping::class, inversedBy="documents")
  31.      * @ORM\JoinColumn(nullable=false)
  32.      */
  33.     private $shipping;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=SecurityDocument::class, inversedBy="generatedDocuments")
  36.      * @ORM\JoinColumn(nullable=false)
  37.      */
  38.     private $securityDocument;
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getGeneratedBy(): ?AppUser
  44.     {
  45.         return $this->generatedBy;
  46.     }
  47.     public function setGeneratedBy(?AppUser $generatedBy): self
  48.     {
  49.         $this->generatedBy $generatedBy;
  50.         return $this;
  51.     }
  52.     public function getGeneratedAt(): ?\DateTimeImmutable
  53.     {
  54.         return $this->generatedAt;
  55.     }
  56.     public function setGeneratedAt(\DateTimeImmutable $generatedAt): self
  57.     {
  58.         $this->generatedAt $generatedAt;
  59.         return $this;
  60.     }
  61.     public function getShipping(): ?Shipping
  62.     {
  63.         return $this->shipping;
  64.     }
  65.     public function setShipping(?Shipping $shipping): self
  66.     {
  67.         $this->shipping $shipping;
  68.         return $this;
  69.     }
  70.     public function getSecurityDocument(): ?SecurityDocument
  71.     {
  72.         return $this->securityDocument;
  73.     }
  74.     public function setSecurityDocument(?SecurityDocument $securityDocument): self
  75.     {
  76.         $this->securityDocument $securityDocument;
  77.         return $this;
  78.     }
  79. }