src/Entity/Status.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StatusRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. #[ORM\Entity(repositoryClassStatusRepository::class)]
  9. class Status
  10. {
  11.     /*
  12.     Prospect            => Prospect
  13.     Need contact        => A contacter
  14.     Contact refused     => Annulation
  15.     Contact no response => Abandon
  16.     Contacted / Waiting => Contacté / En attente
  17.     Application received=> Dossiers reçus
  18.     Application refused => Refusé
  19.     Jury booked         => Passage en jury
  20.     Jury accepted       => Jury – Accepté
  21.     Jury refused        => Jury – Refusé
  22.     Test validated      => QCM Validés
  23.     Test failed         => QCM refusés
  24.     Test not taken      => QCM non réalisés
  25.     Interview invited   => Convocation entretien
  26.     Interview done      => Oraux effectués
  27.     Interview skipped   => Pas venu aux oraux
  28.     Student eligible    => Admis
  29.     Student refused     => Refusé après oraux
  30.     Student enrolled    => Accompte payé
  31.     Disclaimer          => Désistement
  32.     */
  33.     const STATUS_PROSPECT 100;
  34.     const STATUS_NEED_CONTACT 200;   
  35.     const STATUS_CONTACTED_WAITING 300;
  36.     const STATUS_APPLICATION_RECEIVED 400;
  37.     const STATUS_APPLICATION_REFUSED 500;
  38.     const STATUS_JURY_BOOKED 600;
  39.     const STATUS_JURY_ACCEPTED 700;
  40.     const STATUS_JURY_REFUSED 800;
  41.     const STATUS_TEST_VALIDATED 900;
  42.     const STATUS_TEST_FAILED 1000;
  43.     const STATUS_TEST_NOT_TAKEN 1100;
  44.     const STATUS_INTERVIEW_INVITED 1200;
  45.     const STATUS_INTERVIEW_DONE 1300;
  46.     const STATUS_INTERVIEW_SKIPPED 1400;
  47.     const STATUS_STUDENT_ELIGIBLE 1500;
  48.     const STATUS_STUDENT_REFUSED 1600;
  49.     const STATUS_STUDENT_ENROLLED 1700;
  50.     const STATUS_DISCLAIMER 1800;
  51.     const STATUS_CONTACT_REFUSED 250;
  52.     const STATUS_CONTACT_NO_RESPONSE 275;
  53.     #[ORM\Id]
  54.     #[ORM\GeneratedValue]
  55.     #[ORM\Column(type'integer')]
  56.     private $id;
  57.     /**
  58.      * @Gedmo\Translatable
  59.      */
  60.     #[ORM\Column(type'string'length255nullabletrue)]
  61.     private ?string $name null;
  62.     #[ORM\Column(type'integer'nullabletrue)]
  63.     private ?int $sort null;
  64.     #[ORM\OneToMany(targetEntityProfile::class, mappedBy'status')]
  65.     private Collection $profiles;
  66.     #[ORM\Column(type'integer'options: ['default' => 1])]
  67.     private ?int $active null;
  68.     public function __construct()
  69.     {
  70.         $this->profiles = new ArrayCollection();
  71.     }
  72.     public function getId(): ?int
  73.     {
  74.         return $this->id;
  75.     }
  76.     public function getName(): ?string
  77.     {
  78.         return $this->name;
  79.     }
  80.     public function setName(?string $name): self
  81.     {
  82.         $this->name $name;
  83.         return $this;
  84.     }
  85.     public function getSort(): ?int
  86.     {
  87.         return $this->sort;
  88.     }
  89.     public function setSort(?int $sort): self
  90.     {
  91.         $this->sort $sort;
  92.         return $this;
  93.     }
  94.     /**
  95.      * @return Collection<int, Profile>
  96.      */
  97.     public function getProfiles(): Collection
  98.     {
  99.         return $this->profiles;
  100.     }
  101.     public function addProfile(Profile $profile): self
  102.     {
  103.         if (!$this->profiles->contains($profile)) {
  104.             $this->profiles[] = $profile;
  105.             $profile->setStatus($this);
  106.         }
  107.         return $this;
  108.     }
  109.     public function removeProfile(Profile $profile): self
  110.     {
  111.         if ($this->profiles->removeElement($profile)) {
  112.             // set the owning side to null (unless already changed)
  113.             if ($profile->getStatus() === $this) {
  114.                 $profile->setStatus(null);
  115.             }
  116.         }
  117.         return $this;
  118.     }
  119.     public function getActive(): ?int
  120.     {
  121.         return $this->active;
  122.     }
  123.     public function setActive(int $active): self
  124.     {
  125.         $this->active $active;
  126.         return $this;
  127.     }
  128. }