src/Entity/HomeSlider.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\HomeSliderRepository;
  5. #[ORM\Entity(repositoryClassHomeSliderRepository::class)]
  6. #[ORM\Table(name'home_slider')]
  7. class HomeSlider
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(targetEntityEvents::class)]
  14.     #[ORM\JoinColumn(nullablefalseonDelete'CASCADE')]
  15.     private ?Events $event null;
  16.     #[ORM\Column(type'integer')]
  17.     private int $position 0;
  18.     #[ORM\Column(type'boolean')]
  19.     private bool $enabled true;
  20.     public function getId(): ?int { return $this->id; }
  21.     public function getEvent(): ?Events { return $this->event; }
  22.     public function setEvent(Events $event): self $this->event $event; return $this; }
  23.     public function getPosition(): int { return $this->position; }
  24.     public function setPosition(int $position): self $this->position $position; return $this; }
  25.     public function isEnabled(): bool { return $this->enabled; }
  26.     public function setEnabled(bool $enabled): self $this->enabled $enabled; return $this; }
  27. }