src/Entity/Event.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use App\Repository\EventRepository;
  7. use Gedmo\Timestampable\Traits\TimestampableEntity;
  8. #[ORM\Entity(repositoryClassEventRepository::class)]
  9. class Event
  10. {
  11.     use TimestampableEntity;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  17.     private ?\DateTimeInterface $beginsAt null;
  18.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  19.     private ?\DateTimeInterface $endsAt null;
  20.     #[ORM\Column(length255)]
  21.     private ?string $title null;
  22.     #[ORM\Column(length255)]
  23.     #[Gedmo\Slug(fields: ['title'])]
  24.     private ?string $slug null;
  25.     #[ORM\Column(typeTypes::TEXT)]
  26.     private ?string $hours null;
  27.     #[ORM\Column(typeTypes::TEXT)]
  28.     private ?string $description null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $location null;
  31.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  32.     private ?Image $image null;
  33.     #[ORM\Column]
  34.     private ?bool $featured null;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getBeginsAt(): ?\DateTimeInterface
  40.     {
  41.         return $this->beginsAt;
  42.     }
  43.     public function setBeginsAt(\DateTimeInterface $beginsAt): self
  44.     {
  45.         $this->beginsAt $beginsAt;
  46.         return $this;
  47.     }
  48.     public function getEndsAt(): ?\DateTimeInterface
  49.     {
  50.         return $this->endsAt;
  51.     }
  52.     public function setEndsAt(\DateTimeInterface $endsAt): self
  53.     {
  54.         $this->endsAt $endsAt;
  55.         return $this;
  56.     }
  57.     public function getTitle(): ?string
  58.     {
  59.         return $this->title;
  60.     }
  61.     public function setTitle(string $title): self
  62.     {
  63.         $this->title $title;
  64.         return $this;
  65.     }
  66.     public function getSlug(): ?string
  67.     {
  68.         return $this->slug;
  69.     }
  70.     public function setSlug(string $slug): self
  71.     {
  72.         $this->slug $slug;
  73.         return $this;
  74.     }
  75.     public function getHours(): ?string
  76.     {
  77.         return $this->hours;
  78.     }
  79.     public function setHours(string $hours): self
  80.     {
  81.         $this->hours $hours;
  82.         return $this;
  83.     }
  84.     public function getDescription(): ?string
  85.     {
  86.         return $this->description;
  87.     }
  88.     public function setDescription(string $description): self
  89.     {
  90.         $this->description $description;
  91.         return $this;
  92.     }
  93.     public function getLocation(): ?string
  94.     {
  95.         return $this->location;
  96.     }
  97.     public function setLocation(?string $location): self
  98.     {
  99.         $this->location $location;
  100.         return $this;
  101.     }
  102.     public function getImage(): ?Image
  103.     {
  104.         return $this->image;
  105.     }
  106.     public function setImage(?Image $image): self
  107.     {
  108.         $this->image $image;
  109.         return $this;
  110.     }
  111.     public function isFeatured(): ?bool
  112.     {
  113.         return $this->featured;
  114.     }
  115.     public function setFeatured(bool $featured): self
  116.     {
  117.         $this->featured $featured;
  118.         return $this;
  119.     }
  120. }