|
|
@@ -35,7 +35,7 @@ class EducationalProject extends AbstractBooking
|
|
|
protected Collection $eventRecur;
|
|
|
|
|
|
/** @var Collection<int, EducationalProject> */
|
|
|
- #[ORM\OneToMany(mappedBy: 'parent', targetEntity: EducationalProject::class, orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'parent', orphanRemoval: true)]
|
|
|
protected Collection $timeline;
|
|
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'timeline')]
|
|
|
@@ -67,15 +67,15 @@ class EducationalProject extends AbstractBooking
|
|
|
protected Collection $files;
|
|
|
|
|
|
/** @var Collection<int, EducationalProjectIntangible> */
|
|
|
- #[ORM\OneToMany(mappedBy: 'educationalProject', targetEntity: EducationalProjectIntangible::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationalProjectIntangible::class, mappedBy: 'educationalProject', cascade: ['persist'], orphanRemoval: true)]
|
|
|
protected Collection $educationalProjectIntangibles;
|
|
|
|
|
|
/** @var Collection<int, EducationalProjectPayer> */
|
|
|
- #[ORM\OneToMany(mappedBy: 'educationalProjectReceiver', targetEntity: EducationalProjectPayer::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationalProjectPayer::class, mappedBy: 'educationalProjectReceiver', cascade: ['persist'], orphanRemoval: true)]
|
|
|
protected Collection $billingReceivers;
|
|
|
|
|
|
/** @var Collection<int, BillLine> */
|
|
|
- #[ORM\OneToMany(mappedBy: 'educationalProject', targetEntity: BillLine::class, orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: BillLine::class, mappedBy: 'educationalProject', orphanRemoval: true)]
|
|
|
protected Collection $billLines;
|
|
|
|
|
|
/** @var Collection<int, AttendanceBooking> */
|
|
|
@@ -91,29 +91,9 @@ class EducationalProject extends AbstractBooking
|
|
|
#[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
|
|
|
protected ?Room $room = null;
|
|
|
|
|
|
- /** @var Collection<int, Access> */
|
|
|
- #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'educationalProjectOrganizers')]
|
|
|
- #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
|
|
|
- #[ORM\InverseJoinColumn(name: 'organizer_id', referencedColumnName: 'id')]
|
|
|
- protected Collection $organizer;
|
|
|
-
|
|
|
- /** @var Collection<int, Tagg> */
|
|
|
- #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'educationalProjects', cascade: ['persist'])]
|
|
|
- #[ORM\JoinTable(name: 'tag_booking')]
|
|
|
- #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
|
|
|
- #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
|
|
|
- protected Collection $tags;
|
|
|
-
|
|
|
#[ORM\OneToOne(targetEntity: EducationalProjectAge::class, cascade: ['persist'])]
|
|
|
protected ?EducationalProjectAge $ageDistribution;
|
|
|
|
|
|
- /** @var Collection<int, Equipment> */
|
|
|
- #[ORM\ManyToMany(targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
|
|
|
- #[ORM\JoinTable(name: 'booking_equipment')]
|
|
|
- #[ORM\JoinColumn(name: 'booking_id')]
|
|
|
- #[ORM\InverseJoinColumn(name: 'equipment_id')]
|
|
|
- protected Collection $equipments;
|
|
|
-
|
|
|
public function __construct()
|
|
|
{
|
|
|
$this->eventRecur = new ArrayCollection();
|
|
|
@@ -125,8 +105,8 @@ class EducationalProject extends AbstractBooking
|
|
|
$this->billLines = new ArrayCollection();
|
|
|
$this->attendanceBooking = new ArrayCollection();
|
|
|
$this->organizer = new ArrayCollection();
|
|
|
- $this->tags = new ArrayCollection();
|
|
|
$this->equipments = new ArrayCollection();
|
|
|
+ parent::__construct();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -465,30 +445,6 @@ class EducationalProject extends AbstractBooking
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * @return Collection<int, Tagg>
|
|
|
- */
|
|
|
- public function getTags(): Collection
|
|
|
- {
|
|
|
- return $this->tags;
|
|
|
- }
|
|
|
-
|
|
|
- public function addTag(Tagg $tag): self
|
|
|
- {
|
|
|
- if (!$this->tags->contains($tag)) {
|
|
|
- $this->tags[] = $tag;
|
|
|
- }
|
|
|
-
|
|
|
- return $this;
|
|
|
- }
|
|
|
-
|
|
|
- public function removeTag(Tagg $tag): self
|
|
|
- {
|
|
|
- $this->tags->removeElement($tag);
|
|
|
-
|
|
|
- return $this;
|
|
|
- }
|
|
|
-
|
|
|
public function getAgeDistribution(): ?EducationalProjectAge
|
|
|
{
|
|
|
return $this->ageDistribution;
|
|
|
@@ -500,28 +456,4 @@ class EducationalProject extends AbstractBooking
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
-
|
|
|
- public function getEquipments(): Collection
|
|
|
- {
|
|
|
- return $this->equipments;
|
|
|
- }
|
|
|
-
|
|
|
- public function addEquipment(Equipment $equipment): self
|
|
|
- {
|
|
|
- if (!$this->equipments->contains($equipment)) {
|
|
|
- $this->equipments[] = $equipment;
|
|
|
- // $equipment->addXXX($this);
|
|
|
- }
|
|
|
-
|
|
|
- return $this;
|
|
|
- }
|
|
|
-
|
|
|
- public function removeEquipment(Equipment $equipment): self
|
|
|
- {
|
|
|
- if ($this->equipments->removeElement($equipment)) {
|
|
|
- // $equipment->removeXXXX($this);
|
|
|
- }
|
|
|
-
|
|
|
- return $this;
|
|
|
- }
|
|
|
}
|