src/Entity/DossierDocType.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DossierDocTypeRepository;
  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(repositoryClassDossierDocTypeRepository::class)]
  9. class DossierDocType
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $label null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  18.     private ?\DateTimeInterface $date_creation null;
  19.     #[ORM\Column]
  20.     private ?int $ordre null;
  21.     #[ORM\OneToMany(mappedBy'dossier_type'targetEntityDossier::class)]
  22.     private Collection $dossiers;
  23.     #[ORM\OneToMany(mappedBy'doc_type'targetEntityDocument::class)]
  24.     private Collection $documents;
  25.     public function __construct()
  26.     {
  27.         $this->dossiers = new ArrayCollection();
  28.         $this->documents = new ArrayCollection();
  29.     }
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getLabel(): ?string
  35.     {
  36.         return $this->label;
  37.     }
  38.     public function setLabel(string $label): static
  39.     {
  40.         $this->label $label;
  41.         return $this;
  42.     }
  43.     public function getDateCreation(): ?\DateTimeInterface
  44.     {
  45.         return $this->date_creation;
  46.     }
  47.     public function setDateCreation(\DateTimeInterface $date_creation): static
  48.     {
  49.         $this->date_creation $date_creation;
  50.         return $this;
  51.     }
  52.     public function getOrdre(): ?int
  53.     {
  54.         return $this->ordre;
  55.     }
  56.     public function setOrdre(int $ordre): static
  57.     {
  58.         $this->ordre $ordre;
  59.         return $this;
  60.     }
  61.     /**
  62.      * @return Collection<int, Dossier>
  63.      */
  64.     public function getDossiers(): Collection
  65.     {
  66.         return $this->dossiers;
  67.     }
  68.     public function addDossier(Dossier $dossier): static
  69.     {
  70.         if (!$this->dossiers->contains($dossier)) {
  71.             $this->dossiers->add($dossier);
  72.             $dossier->setDossierType($this);
  73.         }
  74.         return $this;
  75.     }
  76.     public function removeDossier(Dossier $dossier): static
  77.     {
  78.         if ($this->dossiers->removeElement($dossier)) {
  79.             // set the owning side to null (unless already changed)
  80.             if ($dossier->getDossierType() === $this) {
  81.                 $dossier->setDossierType(null);
  82.             }
  83.         }
  84.         return $this;
  85.     }
  86.     /**
  87.      * @return Collection<int, Document>
  88.      */
  89.     public function getDocuments(): Collection
  90.     {
  91.         return $this->documents;
  92.     }
  93.     public function addDocument(Document $document): static
  94.     {
  95.         if (!$this->documents->contains($document)) {
  96.             $this->documents->add($document);
  97.             $document->setDocType($this);
  98.         }
  99.         return $this;
  100.     }
  101.     public function removeDocument(Document $document): static
  102.     {
  103.         if ($this->documents->removeElement($document)) {
  104.             // set the owning side to null (unless already changed)
  105.             if ($document->getDocType() === $this) {
  106.                 $document->setDocType(null);
  107.             }
  108.         }
  109.         return $this;
  110.     }
  111. }