src/Entity/Planification.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\PlanificationRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassPlanificationRepository::class)]
  10. #[ApiResource]
  11. class Planification
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  18.     private ?\DateTimeInterface $datedebut null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $duree null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $prix null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $prixpromo null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $lienformation null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $selectfor null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $intitule null;
  31.     #[ORM\OneToMany(mappedBy'planification'targetEntityFormation::class,cascade: ['remove'])]
  32.     private Collection $relation;
  33.     public function __construct()
  34.     {
  35.         $this->relation = new ArrayCollection();
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getDatedebut(): ?\DateTimeInterface
  42.     {
  43.         return $this->datedebut;
  44.     }
  45.     public function setDatedebut(?\DateTimeInterface $datedebut): self
  46.     {
  47.         $this->datedebut $datedebut;
  48.         return $this;
  49.     }
  50.     public function getDuree(): ?string
  51.     {
  52.         return $this->duree;
  53.     }
  54.     public function setDuree(?string $duree): self
  55.     {
  56.         $this->duree $duree;
  57.         return $this;
  58.     }
  59.     public function getPrix(): ?string
  60.     {
  61.         return $this->prix;
  62.     }
  63.     public function setPrix(?string $prix): self
  64.     {
  65.         $this->prix $prix;
  66.         return $this;
  67.     }
  68.     public function getPrixpromo(): ?string
  69.     {
  70.         return $this->prixpromo;
  71.     }
  72.     public function setPrixpromo(?string $prixpromo): self
  73.     {
  74.         $this->prixpromo $prixpromo;
  75.         return $this;
  76.     }
  77.     public function getLienformation(): ?string
  78.     {
  79.         return $this->lienformation;
  80.     }
  81.     public function setLienformation(?string $lienformation): self
  82.     {
  83.         $this->lienformation $lienformation;
  84.         return $this;
  85.     }
  86.     public function getSelectfor(): ?string
  87.     {
  88.         return $this->selectfor;
  89.     }
  90.     public function setSelectfor(?string $selectfor): self
  91.     {
  92.         $this->selectfor $selectfor;
  93.         return $this;
  94.     }
  95.     public function getIntitule(): ?string
  96.     {
  97.         return $this->intitule;
  98.     }
  99.     public function setIntitule(?string $intitule): self
  100.     {
  101.         $this->intitule $intitule;
  102.         return $this;
  103.     }
  104.     /**
  105.      * @return Collection<int, Formation>
  106.      */
  107.     public function getRelation(): Collection
  108.     {
  109.         return $this->relation;
  110.     }
  111.     public function addRelation(Formation $relation): self
  112.     {
  113.         if (!$this->relation->contains($relation)) {
  114.             $this->relation->add($relation);
  115.             $relation->setPlanification($this);
  116.         }
  117.         return $this;
  118.     }
  119.     public function removeRelation(Formation $relation): self
  120.     {
  121.         if ($this->relation->removeElement($relation)) {
  122.             // set the owning side to null (unless already changed)
  123.             if ($relation->getPlanification() === $this) {
  124.                 $relation->setPlanification(null);
  125.             }
  126.         }
  127.         return $this;
  128.     }
  129. }