|
|
@@ -61,22 +61,6 @@ abstract class AbstractBooking
|
|
|
#[ORM\Column(unique: true)]
|
|
|
protected string $uuid;
|
|
|
|
|
|
- #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'practicalCourses', cascade: [], orphanRemoval: false)]
|
|
|
- protected Collection $organizer;
|
|
|
-
|
|
|
- #[ORM\ManyToMany(targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
|
|
|
- protected Collection $equipments;
|
|
|
-
|
|
|
- #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'bookings', cascade: ['persist'], orphanRemoval: false)]
|
|
|
- protected Collection $tags;
|
|
|
-
|
|
|
- public function __construct()
|
|
|
- {
|
|
|
- $this->organizer = new ArrayCollection();
|
|
|
- $this->equipments = new ArrayCollection();
|
|
|
- $this->tags = new ArrayCollection();
|
|
|
- }
|
|
|
-
|
|
|
public function getId(): ?int
|
|
|
{
|
|
|
return $this->id;
|
|
|
@@ -141,67 +125,4 @@ abstract class AbstractBooking
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
-
|
|
|
- public function getOrganizer(): Collection
|
|
|
- {
|
|
|
- return $this->organizer;
|
|
|
- }
|
|
|
-
|
|
|
- public function addOrganizer(Access $organizer): self
|
|
|
- {
|
|
|
- if (!$this->organizer->contains($organizer)) {
|
|
|
- $this->organizer[] = $organizer;
|
|
|
- }
|
|
|
-
|
|
|
- return $this;
|
|
|
- }
|
|
|
-
|
|
|
- public function removeOrganizer(Access $organizer): self
|
|
|
- {
|
|
|
- $this->organizer->removeElement($organizer);
|
|
|
-
|
|
|
- return $this;
|
|
|
- }
|
|
|
-
|
|
|
- public function getEquipments(): Collection
|
|
|
- {
|
|
|
- return $this->equipments;
|
|
|
- }
|
|
|
-
|
|
|
- public function addEquipment(Equipment $equipment): self
|
|
|
- {
|
|
|
- if (!$this->equipments->contains($equipment)) {
|
|
|
- $this->equipments[] = $equipment;
|
|
|
- }
|
|
|
-
|
|
|
- return $this;
|
|
|
- }
|
|
|
-
|
|
|
- public function removeEquipment(Equipment $equipment): self
|
|
|
- {
|
|
|
- $this->equipments->removeElement($equipment);
|
|
|
-
|
|
|
- return $this;
|
|
|
- }
|
|
|
-
|
|
|
- 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;
|
|
|
- }
|
|
|
}
|