src/Entity/SchoolActivity.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SchoolActivityRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassSchoolActivityRepository::class)]
  8. class SchoolActivity
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255)]
  15.     private $duration;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $periodes;
  18.     #[ORM\ManyToMany(targetEntityClassLevel::class, inversedBy'schoolActivities')]
  19.     private $classLevels;
  20.     #[ORM\OneToOne(targetEntityActivity::class, cascade: ['persist''remove'])]
  21.     #[ORM\JoinColumn(nullablefalse)]
  22.     private $activity;
  23.     #[ORM\ManyToOne(targetEntityTheme::class, inversedBy'schoolActivities')]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private $theme;
  26.     #[ORM\Column(type'text'nullabletrue)]
  27.     private $primaryTimeAnimation;
  28.     #[ORM\Column(type'text'nullabletrue)]
  29.     private $maternelTimeAnimation;
  30.     #[ORM\Column(type'datetime'nullabletrue)]
  31.     private $dateEnd;
  32.     #[ORM\Column(type'decimal'precision5scale2)]
  33.     private $normalPrice;
  34.     #[ORM\Column(type'decimal'precision5scale2)]
  35.     private $jettePrice;
  36.     #[ORM\Column(type'datetime'nullabletrue)]
  37.     private $dateJetteRegisterStart;
  38.     #[ORM\Column(type'datetime'nullabletrue)]
  39.     private $dateJetteRegisterEnd;
  40.     #[ORM\OneToMany(mappedBy'activity'targetEntitySchoolRegistration::class)]
  41.     private $schoolRegistrations;
  42.     public function __construct()
  43.     {
  44.         $this->classLevels = new ArrayCollection();
  45.         $this->schoolRegistrations = new ArrayCollection();
  46.     }
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getDuration(): ?string
  52.     {
  53.         return $this->duration;
  54.     }
  55.     public function setDuration(string $duration): self
  56.     {
  57.         $this->duration $duration;
  58.         return $this;
  59.     }
  60.     public function getPeriodes(): ?string
  61.     {
  62.         return $this->periodes;
  63.     }
  64.     public function setPeriodes(?string $periodes): self
  65.     {
  66.         $this->periodes $periodes;
  67.         return $this;
  68.     }
  69.     /**
  70.      * @return Collection<int, ClassLevel>
  71.      */
  72.     public function getClassLevels(): Collection
  73.     {
  74.         return $this->classLevels;
  75.     }
  76.     public function addClassLevel(ClassLevel $classLevel): self
  77.     {
  78.         if (!$this->classLevels->contains($classLevel)) {
  79.             $this->classLevels[] = $classLevel;
  80.         }
  81.         return $this;
  82.     }
  83.     public function removeClassLevel(ClassLevel $classLevel): self
  84.     {
  85.         $this->classLevels->removeElement($classLevel);
  86.         return $this;
  87.     }
  88.     public function getActivity(): ?Activity
  89.     {
  90.         return $this->activity;
  91.     }
  92.     public function setActivity(Activity $activity): self
  93.     {
  94.         $this->activity $activity;
  95.         return $this;
  96.     }
  97.     public function getTheme(): ?Theme
  98.     {
  99.         return $this->theme;
  100.     }
  101.     public function setTheme(?Theme $theme): self
  102.     {
  103.         $this->theme $theme;
  104.         return $this;
  105.     }
  106.     public function getNormalPrice(): ?string
  107.     {
  108.         return $this->normalPrice;
  109.     }
  110.     public function setNormalPrice(string $normalPrice): self
  111.     {
  112.         $this->normalPrice $normalPrice;
  113.         return $this;
  114.     }
  115.     public function getJettePrice(): ?string
  116.     {
  117.         return $this->jettePrice;
  118.     }
  119.     public function setJettePrice(string $jettePrice): self
  120.     {
  121.         $this->jettePrice $jettePrice;
  122.         return $this;
  123.     }
  124.     public function getDateJetteRegisterStart(): ?\DateTimeInterface
  125.     {
  126.         return $this->dateJetteRegisterStart;
  127.     }
  128.     public function setDateJetteRegisterStart(?\DateTimeInterface $dateJetteRegisterStart): self
  129.     {
  130.         $this->dateJetteRegisterStart $dateJetteRegisterStart;
  131.         return $this;
  132.     }
  133.     public function getDateJetteRegisterEnd(): ?\DateTimeInterface
  134.     {
  135.         return $this->dateJetteRegisterEnd;
  136.     }
  137.     public function setDateJetteRegisterEnd(?\DateTimeInterface $dateJetteRegisterEnd): self
  138.     {
  139.         $this->dateJetteRegisterEnd $dateJetteRegisterEnd;
  140.         return $this;
  141.     }
  142.     public function getPrimaryTimeAnimation(): ?string
  143.     {
  144.         return $this->primaryTimeAnimation;
  145.     }
  146.     public function setPrimaryTimeAnimation(?string $primaryTimeAnimation): self
  147.     {
  148.         $this->primaryTimeAnimation $primaryTimeAnimation;
  149.         return $this;
  150.     }
  151.     public function getMaternelTimeAnimation(): ?string
  152.     {
  153.         return $this->maternelTimeAnimation;
  154.     }
  155.     public function setMaternelTimeAnimation(?string $maternelTimeAnimation): self
  156.     {
  157.         $this->maternelTimeAnimation $maternelTimeAnimation;
  158.         return $this;
  159.     }
  160.     public function getDateEnd(): ?\DateTimeInterface
  161.     {
  162.         return $this->dateEnd;
  163.     }
  164.     public function setDateEnd(?\DateTimeInterface $dateEnd): self
  165.     {
  166.         $this->dateEnd $dateEnd;
  167.         return $this;
  168.     }
  169.     /**
  170.      * @return Collection<int, SchoolRegistration>
  171.      */
  172.     public function getSchoolRegistrations(): Collection
  173.     {
  174.         return $this->schoolRegistrations;
  175.     }
  176.     public function addSchoolRegistration(SchoolRegistration $schoolRegistration): self
  177.     {
  178.         if (!$this->schoolRegistrations->contains($schoolRegistration)) {
  179.             $this->schoolRegistrations[] = $schoolRegistration;
  180.             $schoolRegistration->setActivity($this);
  181.         }
  182.         return $this;
  183.     }
  184.     public function removeSchoolRegistration(SchoolRegistration $schoolRegistration): self
  185.     {
  186.         if ($this->schoolRegistrations->removeElement($schoolRegistration)) {
  187.             // set the owning side to null (unless already changed)
  188.             if ($schoolRegistration->getActivity() === $this) {
  189.                 $schoolRegistration->setActivity(null);
  190.             }
  191.         }
  192.         return $this;
  193.     }
  194. }