src/Entity/DemandeAffectation.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DemandeAffectationRepository;
  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. use Symfony\Component\Validator\Constraints as Assert;
  9. #[ORM\Entity(repositoryClassDemandeAffectationRepository::class)]
  10. class DemandeAffectation
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\ManyToOne(targetEntityTache::class)]
  17.     private  $tache;
  18.     #[ORM\ManyToMany(targetEntityAgentInterne::class)]
  19.     private Collection $conseiller;
  20.     #[ORM\OneToMany(mappedBy'demandeAffectation'targetEntityDocDemandeService::class)]
  21.     private Collection $docDemandeService;
  22.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  23.     #[Assert\LessThanOrEqual(propertyPath"dateFin")]
  24.     private ?\DateTimeInterface $dateDebut null;
  25.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  26.     #[Assert\GreaterThanOrEqual(propertyPath"dateDebut")]
  27.     private ?\DateTimeInterface $dateFin null;
  28.     #[ORM\Column(nullabletrue)]
  29.     private ?int $statut null;
  30.     #[ORM\ManyToOne(inversedBy'demandeAffectation')]
  31.     private ?DemandeService $demandeService null;
  32.     #[ORM\Column(nullabletrue)]
  33.     private ?bool $deleted null;
  34.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  35.     private ?\DateTimeInterface $deletedAt null;
  36.     #[ORM\Column(nullabletrue)]
  37.     private ?int $deletedBy null;
  38.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  39.     private ?\DateTimeInterface $dateCloture null;
  40.     #[ORM\OneToMany(mappedBy'demandeAffectation'targetEntityPourcentageQuiz::class, orphanRemovaltrue)]
  41.     private Collection $pourcentageQuizzes;
  42.     #[ORM\OneToMany(mappedBy'demandeAffectation'targetEntityCandidatFiche::class, orphanRemovaltrue)]
  43.     private Collection $candidatFiches;
  44.     #[ORM\OneToMany(mappedBy'demandeAffectaion'targetEntityUserFicheSatisfaction::class, orphanRemovaltrue)]
  45.     private Collection $userFicheSatisfactions;
  46.     #[ORM\Column(nullabletrue)]
  47.     private ?int $nbrjour null;
  48.     public function __construct()
  49.     {
  50.         $this->conseiller = new ArrayCollection();
  51.         $this->docDemandeService = new ArrayCollection();
  52.         $this->pourcentageQuizzes = new ArrayCollection();
  53.         $this->candidatFiches = new ArrayCollection();
  54.         $this->userFicheSatisfactions = new ArrayCollection();
  55.     }
  56.     public function getId(): ?int
  57.     {
  58.         return $this->id;
  59.     }
  60.     /**
  61.      * @return Collection<int, AgentInterne>
  62.      */
  63.     public function getConseiller(): Collection
  64.     {
  65.         return $this->conseiller;
  66.     }
  67.     public function addConseiller(AgentInterne $conseiller): self
  68.     {
  69.         if (!$this->conseiller->contains($conseiller)) {
  70.             $this->conseiller->add($conseiller);
  71.         }
  72.         return $this;
  73.     }
  74.     public function removeConseiller(AgentInterne $conseiller): self
  75.     {
  76.         $this->conseiller->removeElement($conseiller);
  77.         return $this;
  78.     }
  79.     /**
  80.      * @return Collection<int, DocDemandeService>
  81.      */
  82.     public function getDocDemandeService(): Collection
  83.     {
  84.         return $this->docDemandeService;
  85.     }
  86.     public function addDocDemandeService(DocDemandeService $docDemandeService): self
  87.     {
  88.         if (!$this->docDemandeService->contains($docDemandeService)) {
  89.             $this->docDemandeService->add($docDemandeService);
  90.             $docDemandeService->setDemandeAffectation($this);
  91.         }
  92.         return $this;
  93.     }
  94.     public function removeDocDemandeService(DocDemandeService $docDemandeService): self
  95.     {
  96.         if ($this->docDemandeService->removeElement($docDemandeService)) {
  97.             // set the owning side to null (unless already changed)
  98.             if ($docDemandeService->getDemandeAffectation() === $this) {
  99.                 $docDemandeService->setDemandeAffectation(null);
  100.             }
  101.         }
  102.         return $this;
  103.     }
  104.     public function getDateDebut(): ?\DateTimeInterface
  105.     {
  106.         return $this->dateDebut;
  107.     }
  108.     public function setDateDebut(?\DateTimeInterface $dateDebut): self
  109.     {
  110.         $this->dateDebut $dateDebut;
  111.         return $this;
  112.     }
  113.     public function getDateFin(): ?\DateTimeInterface
  114.     {
  115.         return $this->dateFin;
  116.     }
  117.     public function setDateFin(?\DateTimeInterface $dateFin): self
  118.     {
  119.         $this->dateFin $dateFin;
  120.         return $this;
  121.     }
  122.     public function getStatut(): ?int
  123.     {
  124.         return $this->statut;
  125.     }
  126.     public function setStatut(?int $statut): self
  127.     {
  128.         $this->statut $statut;
  129.         return $this;
  130.     }
  131.     public function getDemandeService(): ?DemandeService
  132.     {
  133.         return $this->demandeService;
  134.     }
  135.     public function setDemandeService(?DemandeService $demandeService): self
  136.     {
  137.         $this->demandeService $demandeService;
  138.         return $this;
  139.     }
  140.     public function isDeleted(): ?bool
  141.     {
  142.         return $this->deleted;
  143.     }
  144.     public function setDeleted(?bool $deleted): self
  145.     {
  146.         $this->deleted $deleted;
  147.         return $this;
  148.     }
  149.     public function getDeletedAt(): ?\DateTimeInterface
  150.     {
  151.         return $this->deletedAt;
  152.     }
  153.     public function setDeletedAt(?\DateTimeInterface $deletedAt): self
  154.     {
  155.         $this->deletedAt $deletedAt;
  156.         return $this;
  157.     }
  158.     public function getDeletedBy(): ?int
  159.     {
  160.         return $this->deletedBy;
  161.     }
  162.     public function setDeletedBy(?int $deletedBy): self
  163.     {
  164.         $this->deletedBy $deletedBy;
  165.         return $this;
  166.     }
  167.     public function getDateCloture(): ?\DateTimeInterface
  168.     {
  169.         return $this->dateCloture;
  170.     }
  171.     public function setDateCloture(?\DateTimeInterface $dateCloture): self
  172.     {
  173.         $this->dateCloture $dateCloture;
  174.         return $this;
  175.     }
  176.     public function getTache(): ?Tache
  177.     {
  178.         return $this->tache;
  179.     }
  180.     public function setTache(?Tache $tache): self
  181.     {
  182.         $this->tache $tache;
  183.         return $this;
  184.     }
  185.     /**
  186.      * @return Collection<int, PourcentageQuiz>
  187.      */
  188.     public function getPourcentageQuizzes(): Collection
  189.     {
  190.         return $this->pourcentageQuizzes;
  191.     }
  192.     public function addPourcentageQuiz(PourcentageQuiz $pourcentageQuiz): self
  193.     {
  194.         if (!$this->pourcentageQuizzes->contains($pourcentageQuiz)) {
  195.             $this->pourcentageQuizzes->add($pourcentageQuiz);
  196.             $pourcentageQuiz->setDemandeAffectation($this);
  197.         }
  198.         return $this;
  199.     }
  200.     public function removePourcentageQuiz(PourcentageQuiz $pourcentageQuiz): self
  201.     {
  202.         if ($this->pourcentageQuizzes->removeElement($pourcentageQuiz)) {
  203.             // set the owning side to null (unless already changed)
  204.             if ($pourcentageQuiz->getDemandeAffectation() === $this) {
  205.                 $pourcentageQuiz->setDemandeAffectation(null);
  206.             }
  207.         }
  208.         return $this;
  209.     }
  210.     /**
  211.      * @return Collection<int, CandidatFiche>
  212.      */
  213.     public function getCandidatFiches(): Collection
  214.     {
  215.         return $this->candidatFiches;
  216.     }
  217.     public function addCandidatFich(CandidatFiche $candidatFich): self
  218.     {
  219.         if (!$this->candidatFiches->contains($candidatFich)) {
  220.             $this->candidatFiches->add($candidatFich);
  221.             $candidatFich->setDemandeAffectation($this);
  222.         }
  223.         return $this;
  224.     }
  225.     public function removeCandidatFich(CandidatFiche $candidatFich): self
  226.     {
  227.         if ($this->candidatFiches->removeElement($candidatFich)) {
  228.             // set the owning side to null (unless already changed)
  229.             if ($candidatFich->getDemandeAffectation() === $this) {
  230.                 $candidatFich->setDemandeAffectation(null);
  231.             }
  232.         }
  233.         return $this;
  234.     }
  235.     /**
  236.      * @return Collection<int, UserFicheSatisfaction>
  237.      */
  238.     public function getUserFicheSatisfactions(): Collection
  239.     {
  240.         return $this->userFicheSatisfactions;
  241.     }
  242.     public function addUserFicheSatisfaction(UserFicheSatisfaction $userFicheSatisfaction): self
  243.     {
  244.         if (!$this->userFicheSatisfactions->contains($userFicheSatisfaction)) {
  245.             $this->userFicheSatisfactions->add($userFicheSatisfaction);
  246.             $userFicheSatisfaction->setDemandeAffectaion($this);
  247.         }
  248.         return $this;
  249.     }
  250.     public function removeUserFicheSatisfaction(UserFicheSatisfaction $userFicheSatisfaction): self
  251.     {
  252.         if ($this->userFicheSatisfactions->removeElement($userFicheSatisfaction)) {
  253.             // set the owning side to null (unless already changed)
  254.             if ($userFicheSatisfaction->getDemandeAffectaion() === $this) {
  255.                 $userFicheSatisfaction->setDemandeAffectaion(null);
  256.             }
  257.         }
  258.         return $this;
  259.     }
  260.     
  261.     public function getNbrjour(): ?int
  262.     {
  263.         return $this->nbrjour;
  264.     }
  265.     public function setNbrjour(?int $nbrjour): self
  266.     {
  267.         $this->nbrjour $nbrjour;
  268.         return $this;
  269.     }
  270. }