src/Entity/Event.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EventRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassEventRepository::class)]
  6. class Event
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue(strategy'AUTO')]
  10.     #[ORM\Column(type'integer'uniquetrue)]
  11.     #[Groups(['category''company'])]
  12.     private $id;
  13.     #[Groups(['category''company'])]
  14.     #[ORM\Column(type'string'length255)]
  15.     private $name;
  16.     #[Groups(['category''company'])]
  17.     #[ORM\Column(type'string'length255)]
  18.     private $description;
  19.     #[ORM\Column(type'date')]
  20.     #[Groups(['category''company'])]
  21.     private $starting_Date;
  22.     #[ORM\Column(type'date')]
  23.     #[Groups(['category''company'])]
  24.     private $finishDate;
  25.     #[ORM\Column(type'string'length255)]
  26.     #[Groups(['category''company'])]
  27.     private $place;
  28.     #[ORM\Column(type'string'length255)]
  29.     #[Groups(['category''company'])]
  30.     private $type;
  31.     #[ORM\ManyToOne(targetEntity'User')]
  32.     #[ORM\JoinColumn(nullablefalseonDelete'CASCADE')]
  33.     #[Groups(['category''company'])]
  34.     private $user;
  35.     #[ORM\OneToMany(targetEntity'EventFav'mappedBy'event')]
  36.     #[Groups(['category''company'])]
  37.     private $eventFavEvents;
  38.     /**
  39.      * @return mixed
  40.      */
  41.     public function getUser()
  42.     {
  43.         return $this->user;
  44.     }
  45.     /**
  46.      * @param mixed $user
  47.      */
  48.     public function setUser($user): void
  49.     {
  50.         $this->user $user;
  51.     }
  52.     #[ORM\Column(type'string'length255)]
  53.     private $image;
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getName(): ?string
  59.     {
  60.         return $this->name;
  61.     }
  62.     public function setName(string $name): self
  63.     {
  64.         $this->name $name;
  65.         return $this;
  66.     }
  67.     public function getDescription(): ?string
  68.     {
  69.         return $this->description;
  70.     }
  71.     public function setDescription(string $description): self
  72.     {
  73.         $this->description $description;
  74.         return $this;
  75.     }
  76.     public function getStarting_Date(): ?\DateTimeInterface
  77.     {
  78.         return $this->starting_Date;
  79.     }
  80.     public function setStarting_Date(\DateTimeInterface $starting_Date): self
  81.     {
  82.         $this->starting_Date $starting_Date;
  83.         return $this;
  84.     }
  85.     public function getFinishDate(): ?\DateTimeInterface
  86.     {
  87.         return $this->finishDate;
  88.     }
  89.     public function setFinishDate(\DateTimeInterface $finishDate): self
  90.     {
  91.         $this->finishDate $finishDate;
  92.         return $this;
  93.     }
  94.     public function getPlace(): ?string
  95.     {
  96.         return $this->place;
  97.     }
  98.     public function setPlace(string $place): self
  99.     {
  100.         $this->place $place;
  101.         return $this;
  102.     }
  103.     public function getType(): ?string
  104.     {
  105.         return $this->type;
  106.     }
  107.     public function setType(string $type): self
  108.     {
  109.         $this->type $type;
  110.         return $this;
  111.     }
  112.     public function getImage(): ?string
  113.     {
  114.         return $this->image;
  115.     }
  116.     public function setImage(string $image): self
  117.     {
  118.         $this->image $image;
  119.         return $this;
  120.     }
  121. }