src/Entity/Dossier.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DossierRepository;
  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(repositoryClassDossierRepository::class)]
  9. class Dossier
  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 ?bool $actif null;
  21.     #[ORM\Column]
  22.     private ?bool $biblio null;
  23.     #[ORM\ManyToOne(inversedBy'dossiers')]
  24.     private ?DossierDocType $dossier_type null;
  25.     #[ORM\ManyToOne(inversedBy'dossiers')]
  26.     private ?Project $projet null;
  27.     #[ORM\ManyToOne(inversedBy'dossiers')]
  28.     private ?Contact $contact null;
  29.     #[ORM\OneToMany(mappedBy'dossier'targetEntityDocument::class, cascade: ['remove'])]
  30.     private Collection $documents;
  31.     #[ORM\ManyToOne(inversedBy'dossiers')]
  32.     private ?User $utilisateur null;
  33.     public function __construct()
  34.     {
  35.         $this->documents = new ArrayCollection();
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getLabel(): ?string
  42.     {
  43.         return $this->label;
  44.     }
  45.     public function setLabel(string $label): static
  46.     {
  47.         $this->label $label;
  48.         return $this;
  49.     }
  50.     public function getDateCreation(): ?\DateTimeInterface
  51.     {
  52.         return $this->date_creation;
  53.     }
  54.     public function setDateCreation(\DateTimeInterface $date_creation): static
  55.     {
  56.         $this->date_creation $date_creation;
  57.         return $this;
  58.     }
  59.     public function isActif(): ?bool
  60.     {
  61.         return $this->actif;
  62.     }
  63.     public function setActif(bool $actif): static
  64.     {
  65.         $this->actif $actif;
  66.         return $this;
  67.     }
  68.     public function isBiblio(): ?bool
  69.     {
  70.         return $this->biblio;
  71.     }
  72.     public function setBiblio(bool $biblio): static
  73.     {
  74.         $this->biblio $biblio;
  75.         return $this;
  76.     }
  77.     public function getDossierType(): ?DossierDocType
  78.     {
  79.         return $this->dossier_type;
  80.     }
  81.     public function setDossierType(?DossierDocType $dossier_type): static
  82.     {
  83.         $this->dossier_type $dossier_type;
  84.         return $this;
  85.     }
  86.     public function getProjet(): ?Project
  87.     {
  88.         return $this->projet;
  89.     }
  90.     public function setProjet(?Project $projet): static
  91.     {
  92.         $this->projet $projet;
  93.         return $this;
  94.     }
  95.     public function getContact(): ?Contact
  96.     {
  97.         return $this->contact;
  98.     }
  99.     public function setContact(?Contact $contact): static
  100.     {
  101.         $this->contact $contact;
  102.         return $this;
  103.     }
  104.     /**
  105.      * @return Collection<int, Document>
  106.      */
  107.     public function getDocuments(): Collection
  108.     {
  109.         return $this->documents;
  110.     }
  111.     public function addDocument(Document $document): static
  112.     {
  113.         if (!$this->documents->contains($document)) {
  114.             $this->documents->add($document);
  115.             $document->setDossier($this);
  116.         }
  117.         return $this;
  118.     }
  119.     public function removeDocument(Document $document): static
  120.     {
  121.         if ($this->documents->removeElement($document)) {
  122.             // set the owning side to null (unless already changed)
  123.             if ($document->getDossier() === $this) {
  124.                 $document->setDossier(null);
  125.             }
  126.         }
  127.         return $this;
  128.     }
  129.     public function getUtilisateur(): ?User
  130.     {
  131.         return $this->utilisateur;
  132.     }
  133.     public function setUtilisateur(?User $utilisateur): static
  134.     {
  135.         $this->utilisateur $utilisateur;
  136.         return $this;
  137.     }
  138. }