src/Entity/Place.php line 22

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of the ArtHotel Naquera website.
  5.  *
  6.  * For the full copyright and license information,
  7.  * please read the LICENSE.md file that was distributed with this source code.
  8.  *
  9.  * Copyright (c) 2023.
  10.  */
  11. namespace App\Entity;
  12. use App\Repository\PlaceRepository;
  13. use Doctrine\DBAL\Types\Types;
  14. use Doctrine\ORM\Mapping as ORM;
  15. use Gedmo\Mapping\Annotation as Gedmo;
  16. #[ORM\Entity(repositoryClassPlaceRepository::class)]
  17. class Place
  18. {
  19.     #[ORM\Id]
  20.     #[ORM\GeneratedValue]
  21.     #[ORM\Column]
  22.     private ?int $id null;
  23.     #[ORM\Column(length2)]
  24.     private ?string $language null;
  25.     #[ORM\Column(length255)]
  26.     private string $title '';
  27.     #[ORM\Column(length255)]
  28.     private string $image '';
  29.     #[ORM\Column(typeTypes::TEXT)]
  30.     private string $text '';
  31.     #[ORM\ManyToOne(targetEntityPlaceCategory::class)]
  32.     #[ORM\JoinColumn(name'category')]
  33.     private PlaceCategory $placeCategory;
  34.     #[Gedmo\Timestampable(on'create')]
  35.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  36.     private \DateTime $createdAt;
  37.     #[ORM\Column(length255)]
  38.     private string $slug '';
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getLanguage(): ?string
  44.     {
  45.         return $this->language;
  46.     }
  47.     public function setLanguage(string $language): self
  48.     {
  49.         $this->language $language;
  50.         return $this;
  51.     }
  52.     public function getTitle(): ?string
  53.     {
  54.         return $this->title;
  55.     }
  56.     public function setTitle(string $title): self
  57.     {
  58.         $this->title $title;
  59.         return $this;
  60.     }
  61.     public function getImage(): ?string
  62.     {
  63.         return $this->image;
  64.     }
  65.     public function setImage(string $image): self
  66.     {
  67.         $this->image $image;
  68.         return $this;
  69.     }
  70.     public function getText(): string
  71.     {
  72.         return $this->text;
  73.     }
  74.     public function setText(string $text): self
  75.     {
  76.         $this->text $text;
  77.         return $this;
  78.     }
  79.     public function getPlaceCategory(): PlaceCategory
  80.     {
  81.         return $this->placeCategory;
  82.     }
  83.     public function setPlaceCategory(PlaceCategory $placeCategory): void
  84.     {
  85.         $this->placeCategory $placeCategory;
  86.     }
  87.     public function getCreatedAt(): \DateTime
  88.     {
  89.         return $this->createdAt;
  90.     }
  91.     public function setCreatedAt(\DateTime $createdAt): void
  92.     {
  93.         $this->createdAt $createdAt;
  94.     }
  95.     public function getSlug(): string
  96.     {
  97.         return $this->slug;
  98.     }
  99.     public function setSlug(string $slug): void
  100.     {
  101.         $this->slug $slug;
  102.     }
  103. }