|
|
@@ -0,0 +1,432 @@
|
|
|
+<?php
|
|
|
+declare(strict_types=1);
|
|
|
+
|
|
|
+namespace App\ApiResources\Public;
|
|
|
+
|
|
|
+use ApiPlatform\Core\Annotation\ApiProperty;
|
|
|
+use ApiPlatform\Core\Annotation\ApiResource;
|
|
|
+use App\ApiResources\ApiResourcesInterface;
|
|
|
+use App\Repository\Public\PublicEventRepository;
|
|
|
+use Doctrine\ORM\Mapping as ORM;
|
|
|
+
|
|
|
+#[ORM\Entity(repositoryClass: PublicEventRepository::class, readOnly: true)]
|
|
|
+#[ORM\Table(name: "view_portail_events")]
|
|
|
+#[ApiResource(
|
|
|
+ collectionOperations: [
|
|
|
+ 'get' => [
|
|
|
+ 'method' => 'GET',
|
|
|
+ 'path' => '/public/events'
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ itemOperations: [
|
|
|
+ 'get' => [
|
|
|
+ 'method' => 'GET',
|
|
|
+ 'path' => '/public/events/{id}'
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+)]
|
|
|
+class PublicEvent implements ApiResourcesInterface
|
|
|
+{
|
|
|
+ #[ORM\Id]
|
|
|
+ #[ORM\Column]
|
|
|
+ private int $id;
|
|
|
+
|
|
|
+ private ?int $organizationId;
|
|
|
+
|
|
|
+ #[ORM\Column()]
|
|
|
+ private string $name;
|
|
|
+
|
|
|
+ private ?string $description;
|
|
|
+
|
|
|
+ private ?string $url;
|
|
|
+
|
|
|
+ private \DateTime $datetimeStart;
|
|
|
+
|
|
|
+ private \DateTime $datetimeEnd;
|
|
|
+
|
|
|
+ private ?string $city;
|
|
|
+
|
|
|
+ private ?string $postalCode;
|
|
|
+
|
|
|
+ private ?string $streetAddress;
|
|
|
+
|
|
|
+ private ?float $longitude;
|
|
|
+
|
|
|
+ private ?float $latitude;
|
|
|
+
|
|
|
+ private ?string $roomName;
|
|
|
+
|
|
|
+ private ?string $roomDescription;
|
|
|
+
|
|
|
+ private ?string $roomLocalisation;
|
|
|
+
|
|
|
+ private ?string $roomCapacity;
|
|
|
+
|
|
|
+ private ?string $roomFloorSize;
|
|
|
+
|
|
|
+ private ?int $imageId;
|
|
|
+
|
|
|
+ private ?string $categories;
|
|
|
+
|
|
|
+ private string $origin = 'opentalent';
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return int
|
|
|
+ */
|
|
|
+ public function getId(): int
|
|
|
+ {
|
|
|
+ return $this->id;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param int $id
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setId(int $id): self
|
|
|
+ {
|
|
|
+ $this->id = $id;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return int|null
|
|
|
+ */
|
|
|
+ public function getOrganizationId(): ?int
|
|
|
+ {
|
|
|
+ return $this->organizationId;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param int|null $organizationId
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setOrganizationId(?int $organizationId): self
|
|
|
+ {
|
|
|
+ $this->organizationId = $organizationId;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function getName(): string
|
|
|
+ {
|
|
|
+ return $this->name;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string $name
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setName(string $name): self
|
|
|
+ {
|
|
|
+ $this->name = $name;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getDescription(): ?string
|
|
|
+ {
|
|
|
+ return $this->description;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $description
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setDescription(?string $description): self
|
|
|
+ {
|
|
|
+ $this->description = $description;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getUrl(): ?string
|
|
|
+ {
|
|
|
+ return $this->url;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $url
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setUrl(?string $url): self
|
|
|
+ {
|
|
|
+ $this->url = $url;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return \DateTime
|
|
|
+ */
|
|
|
+ public function getDatetimeStart(): \DateTime
|
|
|
+ {
|
|
|
+ return $this->datetimeStart;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param \DateTime $datetimeStart
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setDatetimeStart(\DateTime $datetimeStart): self
|
|
|
+ {
|
|
|
+ $this->datetimeStart = $datetimeStart;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return \DateTime
|
|
|
+ */
|
|
|
+ public function getDatetimeEnd(): \DateTime
|
|
|
+ {
|
|
|
+ return $this->datetimeEnd;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param \DateTime $datetimeEnd
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setDatetimeEnd(\DateTime $datetimeEnd): self
|
|
|
+ {
|
|
|
+ $this->datetimeEnd = $datetimeEnd;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getCity(): ?string
|
|
|
+ {
|
|
|
+ return $this->city;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $city
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setCity(?string $city): self
|
|
|
+ {
|
|
|
+ $this->city = $city;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getPostalCode(): ?string
|
|
|
+ {
|
|
|
+ return $this->postalCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $postalCode
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setPostalCode(?string $postalCode): self
|
|
|
+ {
|
|
|
+ $this->postalCode = $postalCode;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getStreetAddress(): ?string
|
|
|
+ {
|
|
|
+ return $this->streetAddress;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $streetAddress
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setStreetAddress(?string $streetAddress): self
|
|
|
+ {
|
|
|
+ $this->streetAddress = $streetAddress;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return float|null
|
|
|
+ */
|
|
|
+ public function getLongitude(): ?float
|
|
|
+ {
|
|
|
+ return $this->longitude;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param float|null $longitude
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setLongitude(?float $longitude): self
|
|
|
+ {
|
|
|
+ $this->longitude = $longitude;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return float|null
|
|
|
+ */
|
|
|
+ public function getLatitude(): ?float
|
|
|
+ {
|
|
|
+ return $this->latitude;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param float|null $latitude
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setLatitude(?float $latitude): self
|
|
|
+ {
|
|
|
+ $this->latitude = $latitude;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getRoomName(): ?string
|
|
|
+ {
|
|
|
+ return $this->roomName;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $roomName
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setRoomName(?string $roomName): self
|
|
|
+ {
|
|
|
+ $this->roomName = $roomName;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getRoomDescription(): ?string
|
|
|
+ {
|
|
|
+ return $this->roomDescription;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $roomDescription
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setRoomDescription(?string $roomDescription): self
|
|
|
+ {
|
|
|
+ $this->roomDescription = $roomDescription;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getRoomLocalisation(): ?string
|
|
|
+ {
|
|
|
+ return $this->roomLocalisation;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $roomLocalisation
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setRoomLocalisation(?string $roomLocalisation): self
|
|
|
+ {
|
|
|
+ $this->roomLocalisation = $roomLocalisation;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getRoomCapacity(): ?string
|
|
|
+ {
|
|
|
+ return $this->roomCapacity;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $roomCapacity
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setRoomCapacity(?string $roomCapacity): self
|
|
|
+ {
|
|
|
+ $this->roomCapacity = $roomCapacity;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getRoomFloorSize(): ?string
|
|
|
+ {
|
|
|
+ return $this->roomFloorSize;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $roomFloorSize
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setRoomFloorSize(?string $roomFloorSize): self
|
|
|
+ {
|
|
|
+ $this->roomFloorSize = $roomFloorSize;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return int|null
|
|
|
+ */
|
|
|
+ public function getImageId(): ?int
|
|
|
+ {
|
|
|
+ return $this->imageId;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param int|null $imageId
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setImageId(?int $imageId): self
|
|
|
+ {
|
|
|
+ $this->imageId = $imageId;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string|null
|
|
|
+ */
|
|
|
+ public function getCategories(): ?string
|
|
|
+ {
|
|
|
+ return $this->categories;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string|null $categories
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setCategories(?string $categories): self
|
|
|
+ {
|
|
|
+ $this->categories = $categories;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function getOrigin(): string
|
|
|
+ {
|
|
|
+ return $this->origin;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string $origin
|
|
|
+ * @return PublicEvent
|
|
|
+ */
|
|
|
+ public function setOrigin(string $origin): self
|
|
|
+ {
|
|
|
+ $this->origin = $origin;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+}
|