*/ #[ORM\OneToMany(targetEntity: EventRecur::class, mappedBy: 'event', cascade: ['persist', 'remove'])] protected Collection $eventRecur; /** @var Collection */ #[ORM\OneToMany(targetEntity: Event::class, mappedBy: 'parent', cascade: ['persist'])] protected Collection $timeline; #[ORM\ManyToOne(targetEntity: Event::class, cascade: ['persist'], inversedBy: 'timeline')] #[ORM\JoinColumn(nullable: true)] protected ?Event $parent; #[Assert\Valid] #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'events')] #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')] protected ?File $image; #[ORM\ManyToOne] protected ?EventGender $gender; /** @var Collection */ #[Assert\Valid] #[ORM\OneToMany(targetEntity: EventUser::class, mappedBy: 'event', cascade: ['persist', 'remove'])] protected Collection $eventUser; /** @var Collection */ #[ORM\ManyToMany(targetEntity: Categories::class, cascade: ['persist'])] protected Collection $categories; /** @var Collection */ #[ORM\OneToMany(targetEntity: EventReport::class, mappedBy: 'event', cascade: ['persist', 'remove'])] protected Collection $eventReports; /** @var Collection */ #[ORM\ManyToMany(targetEntity: File::class, cascade: ['persist'], orphanRemoval: true)] #[ORM\JoinTable(name: 'event_files')] #[ORM\JoinColumn(name: 'event_id', referencedColumnName: 'id', onDelete: 'cascade')] #[ORM\InverseJoinColumn(name: 'file_id', referencedColumnName: 'id', onDelete: 'cascade')] protected Collection $files; #[ORM\ManyToOne] #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')] protected ?PlaceSystem $placeSystem; /** @var Collection */ #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'event', cascade: ['persist', 'remove'])] protected Collection $attendanceBooking; #[ORM\Column(type: 'text', nullable: true)] protected ?string $description; #[ORM\Column(nullable: true)] #[Assert\Url( message: 'url-error', protocols: ['http', 'https'] )] protected ?string $url = null; #[ORM\Column(nullable: true)] #[Assert\Url( message: 'url-ticket-error', protocols: ['http', 'https'] )] protected ?string $urlTicket = null; #[ORM\Column(length: 255, nullable: true, enumType: PricingEventEnum::class)] private ?PricingEventEnum $pricing = null; #[ORM\Column(nullable: true)] #[Assert\Positive] protected ?float $priceMini = null; #[ORM\Column(nullable: true)] #[Assert\Positive] protected ?float $priceMaxi = null; #[ORM\Column(length: 255, nullable: false, enumType: VisibilityEnum::class)] protected VisibilityEnum $visibility; public function __construct() { $this->eventRecur = new ArrayCollection(); $this->timeline = new ArrayCollection(); $this->eventUser = new ArrayCollection(); $this->categories = new ArrayCollection(); $this->eventReports = new ArrayCollection(); $this->files = new ArrayCollection(); $this->attendanceBooking = new ArrayCollection(); $this->organizer = new ArrayCollection(); $this->equipments = new ArrayCollection(); parent::__construct(); } public function getOrganization(): ?Organization { return $this->organization; } public function setOrganization(?Organization $organization): self { $this->organization = $organization; return $this; } public function getPlace(): ?Place { return $this->place; } public function setPlace(?Place $place): self { $this->place = $place; return $this; } public function getRoom(): ?Room { return $this->room; } public function setRoom(?Room $room): self { $this->room = $room; return $this; } /** * @return Collection */ public function getEventRecur(): Collection { return $this->eventRecur; } public function addEventRecur(EventRecur $eventRecur): self { if (!$this->eventRecur->contains($eventRecur)) { $this->eventRecur[] = $eventRecur; $eventRecur->setEvent($this); } return $this; } public function removeEventRecur(EventRecur $eventRecur): self { if ($this->eventRecur->removeElement($eventRecur)) { // set the owning side to null (unless already changed) if ($eventRecur->getEvent() === $this) { $eventRecur->setEvent(null); } } return $this; } /** * @return Collection */ public function getTimeline(): Collection { return $this->timeline; } public function addTimeline(Event $timeline): self { if (!$this->timeline->contains($timeline)) { $this->timeline[] = $timeline; $timeline->setParent($this); } return $this; } public function removeTimeline(Event $timeline): self { if ($this->timeline->removeElement($timeline)) { // set the owning side to null (unless already changed) if ($timeline->getParent() === $this) { $timeline->setParent(null); } } return $this; } public function getParent(): ?self { return $this->parent; } public function setParent(?self $parent): self { $this->parent = $parent; return $this; } public function getImage(): ?File { return $this->image; } public function setImage(?File $image): self { $this->image = $image; return $this; } public function getGender(): ?EventGender { return $this->gender; } public function setGender(?EventGender $gender): self { $this->gender = $gender; return $this; } /** * @return Collection */ public function getEventUser(): Collection { return $this->eventUser; } public function addEventUser(EventUser $eventUser): self { if (!$this->eventUser->contains($eventUser)) { $this->eventUser[] = $eventUser; $eventUser->setEvent($this); } return $this; } public function removeEventUser(EventUser $eventUser): self { if ($this->eventUser->removeElement($eventUser)) { // set the owning side to null (unless already changed) if ($eventUser->getEvent() === $this) { $eventUser->setEvent(null); } } return $this; } /** * @return Collection */ public function getCategories(): Collection { return $this->categories; } public function addCategory(Categories $category): self { if (!$this->categories->contains($category)) { $this->categories[] = $category; } return $this; } public function removeCategory(Categories $category): self { $this->categories->removeElement($category); return $this; } public function removeAllCategories(): self { foreach ($this->categories as $category) { $this->removeCategory($category); } return $this; } /** * @return Collection */ public function getEventReports(): Collection { return $this->eventReports; } public function addEventReport(EventReport $eventReport): self { if (!$this->eventReports->contains($eventReport)) { $this->eventReports[] = $eventReport; $eventReport->setEvent($this); } return $this; } public function removeEventReport(EventReport $eventReport): self { if ($this->eventReports->removeElement($eventReport)) { // set the owning side to null (unless already changed) if ($eventReport->getEvent() === $this) { $eventReport->setEvent(null); } } return $this; } /** * @return Collection */ public function getFiles(): Collection { return $this->files; } public function addFile(File $file): self { if (!$this->files->contains($file)) { $this->files[] = $file; } return $this; } public function removeFile(File $file): self { $this->files->removeElement($file); return $this; } public function getPlaceSystem(): ?PlaceSystem { return $this->placeSystem; } public function setPlaceSystem(?PlaceSystem $placeSystem): self { $this->placeSystem = $placeSystem; return $this; } /** * @return Collection */ public function getAttendanceBooking(): Collection { return $this->attendanceBooking; } public function addAttendanceBooking(AttendanceBooking $attendanceBooking): self { if (!$this->attendanceBooking->contains($attendanceBooking)) { $this->attendanceBooking[] = $attendanceBooking; $attendanceBooking->setEvent($this); } return $this; } public function removeAttendanceBooking(AttendanceBooking $attendanceBooking): self { if ($this->attendanceBooking->removeElement($attendanceBooking)) { if ($attendanceBooking->getEvent() === $this) { $attendanceBooking->setEvent(null); } } return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): self { $this->description = $description; return $this; } public function getUrl(): ?string { return $this->url; } public function setUrl(?string $url): self { $this->url = $url; return $this; } public function getUrlTicket(): ?string { return $this->urlTicket; } public function setUrlTicket(?string $urlTicket): self { $this->urlTicket = $urlTicket; return $this; } public function getPricing(): ?PricingEventEnum { return $this->pricing; } public function setPricing(?PricingEventEnum $pricing): self { $this->pricing = $pricing; return $this; } public function getPriceMini(): ?float { return $this->priceMini; } public function setPriceMini(?float $priceMini): self { $this->priceMini = $priceMini; return $this; } public function getPriceMaxi(): ?float { return $this->priceMaxi; } public function setPriceMaxi(?float $priceMaxi): self { $this->priceMaxi = $priceMaxi; return $this; } public function getVisibility(): ?VisibilityEnum { return $this->visibility; } public function setVisibility(?VisibilityEnum $visibility): self { $this->visibility = $visibility; return $this; } }