src/Entity/Event.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\EventRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use JMS\Serializer\Annotation\Groups;
  8. #[ORM\Table(name"event")]
  9. #[ORM\Index(columns: ["title","description"], name"event",flags: ['fulltext'])]
  10. #[ORM\HasLifecycleCallbacks]
  11. #[ORM\Entity(repositoryClassEventRepository::class)]
  12. class Event
  13. {
  14.     use Timestampable;
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column]
  18.     #[Groups(['getEvent'])]
  19.     private ?int $id null;
  20.     #[ORM\Column(length255)]
  21.     #[Groups(['getEvent'])]
  22.     private ?string $title null;
  23.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  24.     #[Groups(['getEvent'])]
  25.     private ?string $description null;
  26.     #[ORM\Column(length255)]
  27.     #[Groups(['getEvent'])]
  28.     private ?string $dayDate null;
  29.     #[ORM\Column(length255)]
  30.     #[Groups(['getEvent'])]
  31.     private ?string $startTime null;
  32.     #[ORM\Column(length255)]
  33.     #[Groups(['getEvent'])]
  34.     private ?string $endTime null;
  35.     #[ORM\ManyToOne(inversedBy'event'cascade: ["persist"])]
  36.     #[Groups(['getEvent'])]
  37.     private ?CategoryEvent $categoryEvent null;
  38.     #[ORM\ManyToOne(inversedBy'events'cascade: ["persist"])]
  39.     private ?User $author null;
  40.     #[ORM\ManyToOne(inversedBy'eventsEdited'cascade: ["persist"])]
  41.     private ?User $editor null;
  42.     #[ORM\ManyToOne(inversedBy'events'cascade: ["persist"])]
  43.     private ?School $school null;
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getTitle(): ?string
  49.     {
  50.         return $this->title;
  51.     }
  52.     public function setTitle(string $title): static
  53.     {
  54.         $this->title $title;
  55.         return $this;
  56.     }
  57.     public function getDescription(): ?string
  58.     {
  59.         return $this->description;
  60.     }
  61.     public function setDescription(?string $description): static
  62.     {
  63.         $this->description $description;
  64.         return $this;
  65.     }
  66.     public function getDayDate(): ?string
  67.     {
  68.         return $this->dayDate;
  69.     }
  70.     public function setDayDate(string $dayDate): static
  71.     {
  72.         $this->dayDate $dayDate;
  73.         return $this;
  74.     }
  75.     public function getStartTime(): ?string
  76.     {
  77.         return $this->startTime;
  78.     }
  79.     public function setStartTime(string $startTime): static
  80.     {
  81.         $this->startTime $startTime;
  82.         return $this;
  83.     }
  84.     public function getEndTime(): ?string
  85.     {
  86.         return $this->endTime;
  87.     }
  88.     public function setEndTime(string $endTime): static
  89.     {
  90.         $this->endTime $endTime;
  91.         return $this;
  92.     }
  93.     public function getCategoryEvent(): ?CategoryEvent
  94.     {
  95.         return $this->categoryEvent;
  96.     }
  97.     public function setCategoryEvent(?CategoryEvent $categoryEvent): static
  98.     {
  99.         $this->categoryEvent $categoryEvent;
  100.         return $this;
  101.     }
  102.     public function getAuthor(): ?User
  103.     {
  104.         return $this->author;
  105.     }
  106.     public function setAuthor(?User $author): static
  107.     {
  108.         $this->author $author;
  109.         return $this;
  110.     }
  111.     public function getEditor(): ?User
  112.     {
  113.         return $this->editor;
  114.     }
  115.     public function setEditor(?User $editor): static
  116.     {
  117.         $this->editor $editor;
  118.         return $this;
  119.     }
  120.     public function getSchool(): ?School
  121.     {
  122.         return $this->school;
  123.     }
  124.     public function setSchool(?School $school): static
  125.     {
  126.         $this->school $school;
  127.         return $this;
  128.     }
  129. }